added an option to define whether previous login should be recalled or not in cookie auth. mode

This commit is contained in:
Loïc Chapeaux
2002-02-09 12:51:02 +00:00
parent 083dc0d6e9
commit 81b35af273
5 changed files with 39 additions and 11 deletions

View File

@@ -8,6 +8,12 @@ $Source$
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
working with Mozilla, for example). 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 <siusun at sourceforge.net> for the suggestion.
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.

View File

@@ -680,6 +680,13 @@
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLoginCookieRecall </b>boolean</dt>
<dd>
Define whether the previous login should be recalled or not in cookie
authentication mode.
<br /><br />
</dd>
<dt><b>$cfgShowStats </b>boolean</dt> <dt><b>$cfgShowStats </b>boolean</dt>
<dd> <dd>
Defines whether to display space usage and statistics about databases Defines whether to display space usage and statistics about databases

View File

@@ -106,6 +106,7 @@ $cfgSkipLockedTables = FALSE; // mark used tables, make possible to show
$cfgShowSQL = TRUE; // show SQL queries as run $cfgShowSQL = TRUE; // show SQL queries as run
$cfgAllowUserDropDatabase = FALSE; // show a 'Drop database' link to normal users $cfgAllowUserDropDatabase = FALSE; // show a 'Drop database' link to normal users
$cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' $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 $cfgShowStats = TRUE; // allow to display statistics and space usage in
// the pages about database details and table // the pages about database details and table
@@ -177,7 +178,7 @@ $cfgBgcolorOne = '#CCCCCC'; // table data row colour
$cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate $cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate
$cfgBrowsePointerColor = '#CCFFCC'; // color of the pointer in browse mode $cfgBrowsePointerColor = '#CCFFCC'; // color of the pointer in browse mode
// (blank for no pointer) // (blank for no pointer)
$cfgBrowseMarkRow = 0; // if set to 1, $cfgBrowseMarkRow = 1; // if set to 1,
// and $cfgBrowsePointerColor has a // and $cfgBrowsePointerColor has a
// value, you can click on rows to // value, you can click on rows to
// visually mark them with this color // visually mark them with this color

View File

@@ -52,7 +52,9 @@ if (!defined('PMA_COOKIE_AUTH_INCLUDED')) {
global $HTTP_COOKIE_VARS; global $HTTP_COOKIE_VARS;
// Tries to get the username from cookie whatever are the values of the // Tries to get the username from cookie whatever are the values of the
// 'register_globals' and the 'variables_order' directives // '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'])) { if (!empty($GLOBALS['pma_cookie_username'])) {
$default_user = $GLOBALS['pma_cookie_username']; $default_user = $GLOBALS['pma_cookie_username'];
} }
@@ -62,6 +64,12 @@ if (!defined('PMA_COOKIE_AUTH_INCLUDED')) {
else if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS['pma_cookie_username'])) { else if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS['pma_cookie_username'])) {
$default_user = $HTTP_COOKIE_VARS['pma_cookie_username']; $default_user = $HTTP_COOKIE_VARS['pma_cookie_username'];
} }
$autocomplete = '';
}
else {
$default_user = '';
$autocomplete = ' autocomplete="off"';
}
$cell_align = ($GLOBALS['text_dir'] == 'ltr') ? 'left' : 'right'; $cell_align = ($GLOBALS['text_dir'] == 'ltr') ? 'left' : 'right';
// Title // Title
@@ -130,7 +138,7 @@ h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo
<!-- Login form --> <!-- Login form -->
<form method="post" action="index.php3" name="login_form"> <form method="post" action="index.php3" name="login_form"<?php echo $autocomplete; ?>>
<table cellpadding="5"> <table cellpadding="5">
<tr> <tr>
<td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strLogUsername']; ?>&nbsp;</td> <td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strLogUsername']; ?>&nbsp;</td>

View File

@@ -73,6 +73,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
if (!isset($cfgShowStats)) { if (!isset($cfgShowStats)) {
$cfgShowStats = TRUE; $cfgShowStats = TRUE;
} }
if (!isset($cfgLoginCookieRecall)) {
$cfgLoginCookieRecall = TRUE;
}
if (!isset($cfgShowTooltip)) { if (!isset($cfgShowTooltip)) {
$cfgShowTooltip = TRUE; $cfgShowTooltip = TRUE;
} }
@@ -114,6 +117,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
if (!isset($cfgBrowsePointerColor)) { if (!isset($cfgBrowsePointerColor)) {
$cfgBrowsePointerColor = ''; $cfgBrowsePointerColor = '';
} }
if (!isset($cfgBrowseMarkRow)) {
$cfgBrowseMarkRow = 0;
}
if (!isset($cfgTextareaCols)) { if (!isset($cfgTextareaCols)) {
$cfgTextareaCols = 40; $cfgTextareaCols = 40;
} }