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
This commit is contained in:
parent
9340fde0fa
commit
50f41d57f7
1 changed files with 12 additions and 8 deletions
|
@ -60,19 +60,23 @@ if (POST_CONFIRM) {
|
||||||
&& $cdservice->addTagDescription($tag, stripslashes(POST_DESCRIPTION), $currentUser->getId(), time())
|
&& $cdservice->addTagDescription($tag, stripslashes(POST_DESCRIPTION), $currentUser->getId(), time())
|
||||||
) {
|
) {
|
||||||
$tplVars['msg'] = T_('Tag common description updated');
|
$tplVars['msg'] = T_('Tag common description updated');
|
||||||
header('Location: '. POST_REFERRER);
|
if (POST_REFERRER) {
|
||||||
|
header('Location: '. POST_REFERRER);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$tplVars['error'] = T_('Failed to update the tag common description');
|
$tplVars['error'] = T_('Failed to update the tag common description');
|
||||||
$template = 'error.500.tpl';
|
$template = 'error.500.tpl';
|
||||||
}
|
}
|
||||||
} else if (POST_CANCEL) {
|
} else if (POST_CANCEL) {
|
||||||
header('Location: '. POST_REFERRER);
|
if (POST_REFERRER) {
|
||||||
} else {
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$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);
|
$templateservice->loadTemplate($template, $tplVars);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue