Keep database and table selection over login, needed for RFE #1278312.

This commit is contained in:
Michal Čihař
2005-10-08 13:07:27 +00:00
parent ec1090e4f0
commit 81d01ac2ce
2 changed files with 19 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ $Source$
* scripts/find_unused_messages.sh: Simplify and addapt to current * scripts/find_unused_messages.sh: Simplify and addapt to current
messages. messages.
* import.php: Do not show query in different charset (bug #1028634). * 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 <lem9@users.sourceforge.net> 2005-10-07 Marc Delisle <lem9@users.sourceforge.net>
* libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a * libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a

View File

@@ -192,6 +192,14 @@ if (top != self) {
?> ?>
<!-- Language selection --> <!-- Language selection -->
<form method="post" action="index.php" target="_top"> <form method="post" action="index.php" target="_top">
<?php
if (isset($GLOBALS['db'])) {
echo ' <input type="hidden" name="db" value="' . htmlspecialchars($GLOBALS['db']) . '" />' . "\n";
}
if (isset($GLOBALS['table'])) {
echo ' <input type="hidden" name="table" value="' . htmlspecialchars($GLOBALS['table']) . '" />' . "\n";
}
?>
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<table border="0" cellpadding="3" cellspacing="0"> <table border="0" cellpadding="3" cellspacing="0">
<tr> <tr>
@@ -353,6 +361,9 @@ if (top != self) {
if (isset($GLOBALS['db'])) { if (isset($GLOBALS['db'])) {
echo ' <input type="hidden" name="db" value="' . htmlspecialchars($GLOBALS['db']) . '" />' . "\n"; echo ' <input type="hidden" name="db" value="' . htmlspecialchars($GLOBALS['db']) . '" />' . "\n";
} }
if (isset($GLOBALS['table'])) {
echo ' <input type="hidden" name="table" value="' . htmlspecialchars($GLOBALS['table']) . '" />' . "\n";
}
?> ?>
<input type="submit" value="<?php echo $GLOBALS['strLogin']; ?>" id="buttonYes" /> <input type="submit" value="<?php echo $GLOBALS['strLogin']; ?>" id="buttonYes" />
</td> </td>
@@ -595,11 +606,15 @@ function PMA_auth_set_user()
} }
} // end if } // end if
if (!empty($GLOBALS['SERVER_SOFTWARE']) && $GLOBALS['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') { 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 { else {
header( 'Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php?' 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(); exit();
} // end if } // end if