From 8d7d14c7305c74df7708c842d659e923614ff523 Mon Sep 17 00:00:00 2001 From: madx666 Date: Mon, 16 Sep 2019 15:39:58 +0200 Subject: [PATCH] Fix return to list on page 1 When are on page 1 on any list and we go on an object, when return to the list, we are back on page 0 --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 014ca843236..1c0b86dff88 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -748,7 +748,7 @@ if (! defined('NOLOGIN')) $_SESSION['lastsearch_contextpage_'.$relativepathstring]=$_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]); } - if (! empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 1) + if (! empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 0) { $_SESSION['lastsearch_page_'.$relativepathstring]=$_SESSION['lastsearch_page_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_page_tmp_'.$relativepathstring]); @@ -2271,7 +2271,7 @@ if (! function_exists("llxFooter")) unset($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]); if (! empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]=$contextpage; - if (! empty($page) && $page > 1) $_SESSION['lastsearch_page_tmp_'.$relativepathstring]=$page; + if (! empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring]=$page; if (! empty($limit) && $limit != $conf->limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring]=$limit; unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]);