fix bug #2834293: Patch for E_NOTICE when referer is missing

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@346 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2009-09-17 12:31:53 +00:00
parent 14f617d641
commit bf02d85a46
2 changed files with 8 additions and 2 deletions

View file

@ -207,7 +207,10 @@ if ($templatename == 'editbookmark.tpl') {
} }
$title = T_('Add a Bookmark'); $title = T_('Add a Bookmark');
$tplVars['referrer'] = $_SERVER['HTTP_REFERER']; $tplVars['referrer'] = '';;
if (isset($_SERVER['HTTP_REFERER'])) {
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];
}
$tplVars['pagetitle'] = $title; $tplVars['pagetitle'] = $title;
$tplVars['subtitle'] = $title; $tplVars['subtitle'] = $title;
$tplVars['btnsubmit'] = T_('Add Bookmark'); $tplVars['btnsubmit'] = T_('Add Bookmark');

View file

@ -112,7 +112,10 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
$tplVars['formaction'] = createURL('edit', $bookmark); $tplVars['formaction'] = createURL('edit', $bookmark);
$tplVars['btnsubmit'] = T_('Save Changes'); $tplVars['btnsubmit'] = T_('Save Changes');
$tplVars['showdelete'] = true; $tplVars['showdelete'] = true;
$tplVars['referrer'] = $_SERVER['HTTP_REFERER']; $tplVars['referrer'] = '';
if (isset($_SERVER['HTTP_REFERER'])) {
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];
}
$templateservice->loadTemplate('editbookmark.tpl', $tplVars); $templateservice->loadTemplate('editbookmark.tpl', $tplVars);
} }
?> ?>