cookies test
This commit is contained in:
@@ -269,7 +269,8 @@ if (uname.value == '') {
|
||||
|
||||
// The user wants to be logged out -> delete password cookie
|
||||
if (!empty($old_usr)) {
|
||||
setcookie('pma_cookie_password', '');
|
||||
setcookie('pma_cookie_password', '',0,
|
||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
||||
}
|
||||
|
||||
// The user just logged in
|
||||
@@ -358,9 +359,12 @@ if (uname.value == '') {
|
||||
// Set cookies if required (once per session)
|
||||
if (!$from_cookie) {
|
||||
// Duration = one month for username
|
||||
setcookie('pma_cookie_username', $cfgServer['user'], time() + (60 * 60 * 24 * 30));
|
||||
setcookie('pma_cookie_username', $cfgServer['user'],
|
||||
time() + (60 * 60 * 24 * 30),
|
||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
||||
// Duration = till the browser is closed for password
|
||||
setcookie('pma_cookie_password', $cfgServer['password']);
|
||||
setcookie('pma_cookie_password', $cfgServer['password'],0,
|
||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -377,7 +381,8 @@ if (uname.value == '') {
|
||||
function PMA_auth_fails()
|
||||
{
|
||||
// Deletes password cookie and displays the login form
|
||||
setcookie('pma_cookie_password', '');
|
||||
setcookie('pma_cookie_password', '',0,
|
||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
||||
PMA_auth();
|
||||
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user