improved patch #495360
This commit is contained in:
@@ -6,9 +6,9 @@ $Id$
|
|||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
2002-02-09 Marc Delisle <lem9@users.sourceforge.net>
|
2002-02-09 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* main.php3, libraries/auth/cookie.auth.lib.php3, Patch
|
* main.php3, libraries/auth/cookie.auth.lib.php3, Patch
|
||||||
495360 (cookie with domain), experimental, thanks to
|
495360 (cookie with domain), experimental, thanks to
|
||||||
Piotr Roszatycki (d3xter) and Christoph (certelt)
|
Piotr Roszatycki (d3xter) and Christoph (certelt).
|
||||||
|
|
||||||
2002-02-09 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2002-02-09 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/functions.js: improved the "mark row" feature (it wasn't
|
* libraries/functions.js: improved the "mark row" feature (it wasn't
|
||||||
@@ -22,6 +22,8 @@ $Source$
|
|||||||
* tbl_properties.php3, line 573: fixed an xhtml error.
|
* tbl_properties.php3, line 573: fixed an xhtml error.
|
||||||
* header.inc.php3, lines 53-57; left.php3, line 67: patch #515199 - Problem
|
* header.inc.php3, lines 53-57; left.php3, line 67: patch #515199 - Problem
|
||||||
with <base href=""> thanks to Alexander M. Turek.
|
with <base href=""> thanks to Alexander M. Turek.
|
||||||
|
* main.php3, lines 11-14; libraries/grab_globals.lib.php3, lines 27-32;
|
||||||
|
libraries/auth/cookie.auth.lib.php3: improved patch #495360.
|
||||||
|
|
||||||
2002-02-08 Marc Delisle <lem9@users.sourceforge.net>
|
2002-02-08 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* ukrainian updates thanks to Markijan Baran.
|
* ukrainian updates thanks to Markijan Baran.
|
||||||
|
@@ -11,6 +11,9 @@
|
|||||||
if (!defined('PMA_COOKIE_AUTH_INCLUDED')) {
|
if (!defined('PMA_COOKIE_AUTH_INCLUDED')) {
|
||||||
define('PMA_COOKIE_AUTH_INCLUDED', 1);
|
define('PMA_COOKIE_AUTH_INCLUDED', 1);
|
||||||
|
|
||||||
|
// Defines the cookie path
|
||||||
|
$cookiePath = substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/'));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sorts available languages by their true names
|
* Sorts available languages by their true names
|
||||||
*
|
*
|
||||||
@@ -269,8 +272,7 @@ if (uname.value == '') {
|
|||||||
|
|
||||||
// The user wants to be logged out -> delete password cookie
|
// The user wants to be logged out -> delete password cookie
|
||||||
if (!empty($old_usr)) {
|
if (!empty($old_usr)) {
|
||||||
setcookie('pma_cookie_password', '',0,
|
setcookie('pma_cookie_password', '', 0, $GLOBALS['cookiePath']);
|
||||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The user just logged in
|
// The user just logged in
|
||||||
@@ -359,12 +361,11 @@ if (uname.value == '') {
|
|||||||
// Set cookies if required (once per session)
|
// Set cookies if required (once per session)
|
||||||
if (!$from_cookie) {
|
if (!$from_cookie) {
|
||||||
// Duration = one month for username
|
// Duration = one month for username
|
||||||
setcookie('pma_cookie_username', $cfgServer['user'],
|
setcookie('pma_cookie_username', $cfgServer['user'],
|
||||||
time() + (60 * 60 * 24 * 30),
|
time() + (60 * 60 * 24 * 30),
|
||||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
$GLOBALS['cookiePath']);
|
||||||
// Duration = till the browser is closed for password
|
// Duration = till the browser is closed for password
|
||||||
setcookie('pma_cookie_password', $cfgServer['password'],0,
|
setcookie('pma_cookie_password', $cfgServer['password'], 0, $GLOBALS['cookiePath']);
|
||||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -381,8 +382,7 @@ if (uname.value == '') {
|
|||||||
function PMA_auth_fails()
|
function PMA_auth_fails()
|
||||||
{
|
{
|
||||||
// Deletes password cookie and displays the login form
|
// Deletes password cookie and displays the login form
|
||||||
setcookie('pma_cookie_password', '',0,
|
setcookie('pma_cookie_password', '', 0, $GLOBALS['cookiePath']);
|
||||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')));
|
|
||||||
PMA_auth();
|
PMA_auth();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -8,8 +8,10 @@
|
|||||||
require('./libraries/grab_globals.lib.php3');
|
require('./libraries/grab_globals.lib.php3');
|
||||||
require('./libraries/common.lib.php3');
|
require('./libraries/common.lib.php3');
|
||||||
// Puts the language to use in a cookie that will expire in 30 days
|
// Puts the language to use in a cookie that will expire in 30 days
|
||||||
setcookie('lang', $lang, time() + 60*60*24*30,
|
if (!isset($cookiePath)) {
|
||||||
substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')) );
|
$cookiePath = substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/'));
|
||||||
|
}
|
||||||
|
setcookie('lang', $lang, time() + 60*60*24*30, $cookiePath);
|
||||||
// Defines the "item" image depending on text direction
|
// Defines the "item" image depending on text direction
|
||||||
$item_img = 'images/item_' . $text_dir . '.gif';
|
$item_img = 'images/item_' . $text_dir . '.gif';
|
||||||
// Handles some variables that may have been sent by the calling script
|
// Handles some variables that may have been sent by the calling script
|
||||||
|
Reference in New Issue
Block a user