]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
make common description editor work even when no referer is set
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 16 Jan 2010 11:15:06 +0000 (11:15 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 16 Jan 2010 11:15:06 +0000 (11:15 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@597 b3834d28-1941-0410-a4f8-b48e95affb8f

www/tagcommondescriptionedit.php

index f6e4592771c0c52fb8bc7e56285140d72650776d..06167403dc566aedfc1d3e631abe82cd61951a71 100644 (file)
@@ -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);
 ?>