Commit 13e5e494 authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge "Fix loop bug with back button on various view pages"

parents f1bd4df8 3b2ee711
......@@ -13,8 +13,8 @@
{foreach from=$microheaderlinks item=item}
<a class="btn" href="{$item.url}">{$item.name}</a>
{/foreach}
{elseif $backurl}<a class="btn" href="{$backurl}">{str tag=back}</a>
{/if}
<a class="btn nojs-hidden-inline" href="javascript:history.back()">{str tag=back}</a>
</div>
<div class="fl">
<a class="small-logo" href="{$WWWROOT}"><img src="{theme_url filename='images/site-logo-small.png'}" alt="{$sitename}"></a>
......
......@@ -298,9 +298,6 @@ if (get_config('viewmicroheaders')) {
);
$smarty->assign('microheaderlinks', $microheaderlinks);
}
if (isset($_SERVER['HTTP_REFERER'])) {
$smarty->assign('backurl', $_SERVER['HTTP_REFERER']);
}
}
else {
if ($loggedinid && $loggedinid == $userid) {
......
......@@ -164,14 +164,6 @@ $smarty->assign('INLINEJAVASCRIPT', $inlinejavascript);
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
if ($USER->is_logged_in()) {
if (!empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/artefact.php?id=' . $artefactid . '&view=' . $viewid;
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty->assign('backurl', $_SERVER['HTTP_REFERER']);
}
}
}
}
$smarty->assign('viewid', $viewid);
......
......@@ -237,14 +237,6 @@ if (get_config('viewmicroheaders')) {
$smarty->assign('microheaderlinks', $microheaderlinks);
}
if ($USER->is_logged_in()) {
if (!empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/view.php?id=' . $viewid . ($new ? '&new=1' : '');
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty->assign('backurl', $_SERVER['HTTP_REFERER']);
}
}
}
}
else if ($can_edit) {
$smarty->assign('editurl', get_config('wwwroot') . 'view/blocks.php?id=' . $viewid . ($new ? '&new=1' : ''));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment