From c4c683bb643d39771541cabdbe2d83aa6342fda3 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 21 Sep 2008 13:02:41 +0000 Subject: [PATCH] bug #2113848 [navi] Page number after database switching --- ChangeLog | 1 + libraries/db_info.inc.php | 3 ++- navigation.php | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff7416759..c646886e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -109,6 +109,7 @@ danbarry contains accents + [lang] Spanish update, thanks to Daniel Hinostroza + [lang] Hungarian update, thanks to Jozsef Tamas Herczeg - dodika +- bug #2113848 [navi] Page number after database switching 2.11.9.1 (2008-09-15) - [security] Code execution vulnerability, thanks to Norman Hippert diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php index 8ae3b7147..d76f0442e 100644 --- a/libraries/db_info.inc.php +++ b/libraries/db_info.inc.php @@ -45,8 +45,9 @@ require_once './libraries/common.inc.php'; /** * limits for table list */ -if (! isset($_SESSION['userconf']['table_limit_offset'])) { +if (! isset($_SESSION['userconf']['table_limit_offset']) || $_SESSION['userconf']['table_limit_offset_db'] != $db) { $_SESSION['userconf']['table_limit_offset'] = 0; + $_SESSION['userconf']['table_limit_offset_db'] = $db; } if (isset($_REQUEST['pos'])) { $_SESSION['userconf']['table_limit_offset'] = (int) $_REQUEST['pos']; diff --git a/navigation.php b/navigation.php index 49e266280..70928a0bd 100644 --- a/navigation.php +++ b/navigation.php @@ -63,8 +63,9 @@ function PMA_exitNavigationFrame() if (! isset($_SESSION['userconf']['navi_limit_offset'])) { $_SESSION['userconf']['navi_limit_offset'] = 0; } -if (! isset($_SESSION['userconf']['table_limit_offset'])) { - $_SESSION['userconf']['table_limit_offset'] = 0; +if (! isset($_SESSION['userconf']['table_limit_offset']) || $_SESSION['userconf']['table_limit_offset_db'] != $db) { + $_SESSION['userconf']['table_limit_offset'] = 0; + $_SESSION['userconf']['table_limit_offset_db'] = $db; } if (isset($_REQUEST['pos'])) { if (isset($_REQUEST['tpos'])) {