From 46ca3d17bfde8b470c1910b7c4b7f7f7140d823c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sun, 17 Mar 2002 14:51:00 +0000 Subject: [PATCH] In the "GRANTS" part, do not define a default db name if a db is aleady selected --- ChangeLog | 9 +++++++-- user_details.php3 | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a93ad6eab..4961b9fe8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,8 +6,13 @@ $Id$ $Source$ 2002-03-17 Loïc Chapeaux - * user_details.php3; user_password.php3: no long displays the true password - on screen. + * user_details.php3: + - no long displays the true password on screen; + - in the "GRANTS" part, do not define a default db name if a db is aleady + selected. + * user_password.php3: + - no long displays the true password on screen; + - fixed a warning. * tbl_change.php3: patch from Thomas Bähr - tabindex order. * german.inc.php3: updated thanks to Alexander M. Turek. diff --git a/user_details.php3 b/user_details.php3 index c59a52704..815389fed 100644 --- a/user_details.php3 +++ b/user_details.php3 @@ -503,10 +503,14 @@ function PMA_grantOperations($grants) // echo ' '; // echo '' . "\n"; // } - $result = mysql_query('SHOW DATABASES'); + $is_selected_db = FALSE; + $result = mysql_query('SHOW DATABASES'); if (@mysql_num_rows($result)) { while ($row = mysql_fetch_row($result)) { - $selected = (($row[0] == $dbgrant) ? ' selected="selected"' : ''); + $selected = (($row[0] == $dbgrant) ? ' selected="selected"' : ''); + if (!empty($selected)) { + $is_selected_db = TRUE; + } echo ' '; echo '' . $row[0] . '' . "\n"; } // end while @@ -602,7 +606,7 @@ function PMA_grantOperations($grants)   - +