diff --git a/ChangeLog b/ChangeLog index baf9367ba..dba7d46cd 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,12 @@ $Source$ 2002-02-09 Loïc Chapeaux * libraries/functions.js: improved the "mark row" feature (it wasn't working with Mozilla, for example). + * libraries/common.lib.php3, lines 76-78 & 117-119: ensured compatibility + with old configuration files. + * config.inc.php3, line 109; libraries/auth/cookies.auth.lib.php3; + Documentation.html, lines 683-689: added an option to define whether + previous login should be recalled or not in cookie auth. mode. Thanks to + Siu Sun for the suggestion. 2002-02-08 Marc Delisle * ukrainian updates thanks to Markijan Baran. diff --git a/Documentation.html b/Documentation.html index f8c5ee246..35db0e3fc 100755 --- a/Documentation.html +++ b/Documentation.html @@ -680,6 +680,13 @@

+
$cfgLoginCookieRecall boolean
+
+ Define whether the previous login should be recalled or not in cookie + authentication mode. +

+
+
$cfgShowStats boolean
Defines whether to display space usage and statistics about databases diff --git a/config.inc.php3 b/config.inc.php3 index be863fff1..9d3b4f34d 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -106,6 +106,7 @@ $cfgSkipLockedTables = FALSE; // mark used tables, make possible to show $cfgShowSQL = TRUE; // show SQL queries as run $cfgAllowUserDropDatabase = FALSE; // show a 'Drop database' link to normal users $cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' +$cfgLoginCookieRecall = TRUE; // recall previous login in cookie auth. mode or not $cfgShowStats = TRUE; // allow to display statistics and space usage in // the pages about database details and table @@ -177,8 +178,8 @@ $cfgBgcolorOne = '#CCCCCC'; // table data row colour $cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate $cfgBrowsePointerColor = '#CCFFCC'; // color of the pointer in browse mode // (blank for no pointer) -$cfgBrowseMarkRow = 0; // if set to 1, - // and $cfgBrowsePointerColor has a +$cfgBrowseMarkRow = 1; // if set to 1, + // and $cfgBrowsePointerColor has a // value, you can click on rows to // visually mark them with this color $cfgTextareaCols = 40; // textarea size (columns) in edit mode diff --git a/libraries/auth/cookie.auth.lib.php3 b/libraries/auth/cookie.auth.lib.php3 index ca32de7d0..1040a1c05 100644 --- a/libraries/auth/cookie.auth.lib.php3 +++ b/libraries/auth/cookie.auth.lib.php3 @@ -52,15 +52,23 @@ if (!defined('PMA_COOKIE_AUTH_INCLUDED')) { global $HTTP_COOKIE_VARS; // Tries to get the username from cookie whatever are the values of the - // 'register_globals' and the 'variables_order' directives - if (!empty($GLOBALS['pma_cookie_username'])) { - $default_user = $GLOBALS['pma_cookie_username']; + // 'register_globals' and the 'variables_order' directives if last login + // should be recalled, else skip the IE autocomplete feature. + if ($GLOBALS['cfgLoginCookieRecall']) { + if (!empty($GLOBALS['pma_cookie_username'])) { + $default_user = $GLOBALS['pma_cookie_username']; + } + else if (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_username'])) { + $default_user = $_COOKIE['pma_cookie_username']; + } + else if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS['pma_cookie_username'])) { + $default_user = $HTTP_COOKIE_VARS['pma_cookie_username']; + } + $autocomplete = ''; } - else if (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_username'])) { - $default_user = $_COOKIE['pma_cookie_username']; - } - else if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS['pma_cookie_username'])) { - $default_user = $HTTP_COOKIE_VARS['pma_cookie_username']; + else { + $default_user = ''; + $autocomplete = ' autocomplete="off"'; } $cell_align = ($GLOBALS['text_dir'] == 'ltr') ? 'left' : 'right'; @@ -130,7 +138,7 @@ h1 {font-family: ; font-size: -
+> diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 29dea71f1..574783976 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -73,6 +73,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ if (!isset($cfgShowStats)) { $cfgShowStats = TRUE; } + if (!isset($cfgLoginCookieRecall)) { + $cfgLoginCookieRecall = TRUE; + } if (!isset($cfgShowTooltip)) { $cfgShowTooltip = TRUE; } @@ -114,6 +117,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ if (!isset($cfgBrowsePointerColor)) { $cfgBrowsePointerColor = ''; } + if (!isset($cfgBrowseMarkRow)) { + $cfgBrowseMarkRow = 0; + } if (!isset($cfgTextareaCols)) { $cfgTextareaCols = 40; }