From 81d01ac2ce2c9284c1834f5aae402a14a72ee9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Sat, 8 Oct 2005 13:07:27 +0000 Subject: [PATCH] Keep database and table selection over login, needed for RFE #1278312. --- ChangeLog | 2 ++ libraries/auth/cookie.auth.lib.php | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eefc86df9..5914bf159 100755 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,8 @@ $Source$ * scripts/find_unused_messages.sh: Simplify and addapt to current messages. * import.php: Do not show query in different charset (bug #1028634). + * libraries/auth/cookie.auth.lib.php: Keep database and table selection + over login, needed for RFE #1278312. 2005-10-07 Marc Delisle * libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 8047faff7..dfd63e14c 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -192,6 +192,14 @@ if (top != self) { ?>
+ ' . "\n"; + } + if (isset($GLOBALS['table'])) { + echo ' ' . "\n"; + } + ?> @@ -353,6 +361,9 @@ if (top != self) { if (isset($GLOBALS['db'])) { echo ' ' . "\n"; } + if (isset($GLOBALS['table'])) { + echo ' ' . "\n"; + } ?> @@ -595,11 +606,15 @@ function PMA_auth_set_user() } } // end if if (!empty($GLOBALS['SERVER_SOFTWARE']) && $GLOBALS['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') { - header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php?' . PMA_generate_common_url('', '', '&')); + header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php?' . + PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', + isset($GLOBALS['table']) ? $GLOBALS['table'] : '', + '&')); } else { header( 'Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php?' - . PMA_generate_common_url('', '', '&') . '&' . SID ); + . PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', + isset($GLOBALS['table']) ? $GLOBALS['table'] : '', '&') . '&' . SID ); } exit(); } // end if