From 0a7036cfa14b81b8ba837ff30d3140f2bd0176b5 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 31 Oct 2005 13:39:33 +0000 Subject: do not display password No if this is not a real user definition --- server_privileges.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'server_privileges.php') diff --git a/server_privileges.php b/server_privileges.php index 7c2265a690..ffcbfa1d62 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" -- cgit v1.2.3