diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 1d3f1d4e5c..25efd6cfdd 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -498,7 +498,7 @@ class baseHTML $tab = $_COOKIE['openApp']; $misc .= "data-app='{$tab}'"; - $referer = $_SERVER['HTTP_REFERER']; + $referer = strtolower($_SERVER['HTTP_REFERER']); $refererParts = parse_url($referer); $refererLink = $config->requestType == 'PATH_INFO' ? $refererParts['path'] : $refererParts['query']; $currentModule = $app->getModuleName(); @@ -507,7 +507,7 @@ class baseHTML $gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : ''; /* If the link of the referer is not the link of the current page or the link of the index, the cookie and gobackLink will be updated. */ - if(!preg_match("/(m=|\/)(index|$currentModule)(&f=|-)(index|$currentMethod)(&|-|\.)?/", $refererLink)) + if(!preg_match("/(m=|\/)(index|search|$currentModule)(&f=|-)(index|buildquery|$currentMethod)(&|-|\.)?/", $refererLink)) { $gobackList[$tab] = $referer; $gobackLink = $referer; diff --git a/module/testsuite/view/linkcase.html.php b/module/testsuite/view/linkcase.html.php index e70bb6b157..1324d49758 100644 --- a/module/testsuite/view/linkcase.html.php +++ b/module/testsuite/view/linkcase.html.php @@ -15,7 +15,7 @@ global->flow);?>