This commit is contained in:
Laurent Destailleur
2018-12-14 10:31:09 +01:00
parent e5b8b649aa
commit c1ce902f91
3 changed files with 33 additions and 11 deletions

View File

@@ -321,13 +321,18 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu
}
}
}
if (! empty($_SESSION['lastsearch_contextpage_'.$relativepathstring])) // If there is saved contextpage
// If there is saved contextpage, page or limit
if ($paramname == 'contextpage' && ! empty($_SESSION['lastsearch_contextpage_'.$relativepathstring]))
{
if ($paramname == 'contextpage')
{
$out = $_SESSION['lastsearch_contextpage_'.$relativepathstring];
//var_dump($paramname.' '.$out);
}
$out = $_SESSION['lastsearch_contextpage_'.$relativepathstring];
}
elseif ($paramname == 'page' && ! empty($_SESSION['lastsearch_page_'.$relativepathstring]))
{
$out = $_SESSION['lastsearch_page_'.$relativepathstring];
}
elseif ($paramname == 'limit' && ! empty($_SESSION['lastsearch_limit_'.$relativepathstring]))
{
$out = $_SESSION['lastsearch_limit_'.$relativepathstring];
}
}
// Else, retreive default values if we are not doing a sort