From 50f41d57f7a3fd557245be03e0bc54b37bd32da9 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 16 Jan 2010 11:15:06 +0000 Subject: [PATCH] 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 --- www/tagcommondescriptionedit.php | 20 ++++++++++++-------- 1 file 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); ?>