Fixed bug #3583343 - Incorrect page after expired session
This commit is contained in:
parent
9b6e2226c0
commit
ece1ae6b17
@ -106,11 +106,13 @@ class PMA_Footer
|
||||
{
|
||||
$db = ! empty($GLOBALS['db']) ? $GLOBALS['db'] : '';
|
||||
$table = ! empty($GLOBALS['table']) ? $GLOBALS['table'] : '';
|
||||
$target = ! empty($_REQUEST['target']) ? $_REQUEST['target'] : '';
|
||||
return basename(PMA_getenv('SCRIPT_NAME')) . PMA_generate_common_url(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'server' => $GLOBALS['server']
|
||||
'server' => $GLOBALS['server'],
|
||||
'target' => $target
|
||||
),
|
||||
$encoding
|
||||
);
|
||||
|
||||
@ -19,6 +19,12 @@ require_once 'libraries/plugins/AuthenticationPlugin.class.php';
|
||||
*/
|
||||
if (! empty($_REQUEST['target'])) {
|
||||
$GLOBALS['target'] = $_REQUEST['target'];
|
||||
} else if (PMA_getenv('SCRIPT_NAME')) {
|
||||
$GLOBALS['target'] = basename(PMA_getenv('SCRIPT_NAME'));
|
||||
// avoid "missing parameter: field" on re-entry
|
||||
if ('tbl_alter.php' == $GLOBALS['target']) {
|
||||
$GLOBALS['target'] = 'tbl_structure.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -581,14 +587,6 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
__('No activity within %s seconds; please log in again'),
|
||||
$GLOBALS['cfg']['LoginCookieValidity']
|
||||
);
|
||||
// Remember where we got timeout to return on same place
|
||||
if (PMA_getenv('SCRIPT_NAME')) {
|
||||
$GLOBALS['target'] = basename(PMA_getenv('SCRIPT_NAME'));
|
||||
// avoid "missing parameter: field" on re-entry
|
||||
if ('tbl_alter.php' == $GLOBALS['target']) {
|
||||
$GLOBALS['target'] = 'tbl_structure.php';
|
||||
}
|
||||
}
|
||||
} elseif (PMA_DBI_getError()) {
|
||||
$conn_error = '#' . $GLOBALS['errno'] . ' '
|
||||
. __('Cannot log in to the MySQL server');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user