From 0a7036cfa14b81b8ba837ff30d3140f2bd0176b5 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 31 Oct 2005 13:39:33 +0000 Subject: [PATCH] do not display password No if this is not a real user definition --- ChangeLog | 4 ++++ server_privileges.php | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d59a0d984..67a48f1c1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-10-31 Marc Delisle + * server_privileges.php: do not display No under the Password column + if this is not a "real user" definition + 2005-10-31 Michal Čihař * libraries/select_lang.lib.php: Simplify code. * libraries/common.lib.php: Allow collation change for ENUM and SET diff --git a/server_privileges.php b/server_privileges.php index 7c2265a69..ffcbfa1d6 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1322,7 +1322,7 @@ if (empty($adduser) && empty($checkprivs)) { $user_defaults = array( 'User' => '', 'Host' => '%', - 'Password' => 'N', + 'Password' => '?', 'Grant_priv' => 'N', 'privs' => array( 'USAGE' ), ); @@ -1427,7 +1427,20 @@ if (empty($adduser) && empty($checkprivs)) { . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($host['Host']) . '' . "\n"; - echo ' ' . ($host['Password'] == 'Y' ? $GLOBALS['strYes'] : '' . $GLOBALS['strNo'] . '') . '' . "\n" + echo ' '; + switch ($host['Password']) { + case 'Y': + echo $GLOBALS['strYes']; + break; + case 'N': + echo '' . $GLOBALS['strNo'] . ''; + break; + // this happens if this is a definition not coming from mysql.user + default: + echo '--'; // in future version, replace by "not present" + break; + } // end switch + echo '' . "\n" . ' ' . "\n" . ' ' . implode( ',' . "\n" . ' ', $host['privs'] ) . "\n" . ' ' . "\n"