summaryrefslogtreecommitdiff
path: root/www/tagcommondescriptionedit.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-01-16 11:15:06 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-01-16 11:15:06 +0000
commit50f41d57f7a3fd557245be03e0bc54b37bd32da9 (patch)
treed9f73e772a68557ff334f660eb63df2e990fc6cb /www/tagcommondescriptionedit.php
parent9340fde0faefa1f8ce64320f194829761c9b7262 (diff)
downloadsemanticscuttle-50f41d57f7a3fd557245be03e0bc54b37bd32da9.tar.gz
semanticscuttle-50f41d57f7a3fd557245be03e0bc54b37bd32da9.tar.bz2
make common description editor work even when no referer is set
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@597 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'www/tagcommondescriptionedit.php')
-rw-r--r--www/tagcommondescriptionedit.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/www/tagcommondescriptionedit.php b/www/tagcommondescriptionedit.php
index f6e4592..0616740 100644
--- a/www/tagcommondescriptionedit.php
+++ b/www/tagcommondescriptionedit.php
@@ -60,19 +60,23 @@ if (POST_CONFIRM) {
&& $cdservice->addTagDescription($tag, stripslashes(POST_DESCRIPTION), $currentUser->getId(), time())
) {
$tplVars['msg'] = T_('Tag common description updated');
- header('Location: '. POST_REFERRER);
+ if (POST_REFERRER) {
+ header('Location: '. POST_REFERRER);
+ }
} else {
$tplVars['error'] = T_('Failed to update the tag common description');
$template = 'error.500.tpl';
}
} else if (POST_CANCEL) {
- header('Location: '. POST_REFERRER);
-} else {
- $tplVars['subtitle'] = T_('Edit Tag Common Description') .': '. $tag;
- $tplVars['formaction'] = $_SERVER['SCRIPT_NAME'] .'/'. $tag;
- $tplVars['referrer'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
- $tplVars['tag'] = $tag;
- $tplVars['description'] = $cdservice->getLastTagDescription($tag);
+ if (POST_REFERRER) {
+ header('Location: '. POST_REFERRER);
+ }
}
+
+$tplVars['subtitle'] = T_('Edit Tag Common Description') .': '. $tag;
+$tplVars['formaction'] = $_SERVER['SCRIPT_NAME'] .'/'. $tag;
+$tplVars['referrer'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
+$tplVars['tag'] = $tag;
+$tplVars['description'] = $cdservice->getLastTagDescription($tag);
$templateservice->loadTemplate($template, $tplVars);
?>