diff options
author | Marc Delisle <marc@infomarc.info> | 2005-10-31 16:39:33 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2005-10-31 16:39:33 +0300 |
commit | 0a7036cfa14b81b8ba837ff30d3140f2bd0176b5 (patch) | |
tree | d80648d85b2eab6c605d4d0c97aadaada6d96db1 /server_privileges.php | |
parent | e5d60f74e30e8cc2af0222a0085ca6a41c8f8f8a (diff) |
do not display password No if this is not a real user definition
Diffstat (limited to 'server_privileges.php')
-rw-r--r-- | server_privileges.php | 17 |
1 files changed, 15 insertions, 2 deletions
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)) { . ' <td><input type="checkbox" name="selected_usr[]" id="checkbox_sel_users_' . $i . '" value="' . str_replace( chr(27), '', htmlentities($host['User'] . $user_host_separator . $host['Host'] ) ) . '"' . (empty($GLOBALS['checkall']) ? '' : ' checked="checked"') . ' /></td>' . "\n" . ' <td><label for="checkbox_sel_users_' . $i . '">' . (empty($host['User']) ? '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>' : htmlspecialchars($host['User'])) . '</label></td>' . "\n" . ' <td>' . htmlspecialchars($host['Host']) . '</td>' . "\n"; - echo ' <td>' . ($host['Password'] == 'Y' ? $GLOBALS['strYes'] : '<span style="color: #FF0000">' . $GLOBALS['strNo'] . '</span>') . '</td>' . "\n" + echo ' <td>'; + switch ($host['Password']) { + case 'Y': + echo $GLOBALS['strYes']; + break; + case 'N': + echo '<span style="color: #FF0000">' . $GLOBALS['strNo'] . '</span>'; + 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 '</td>' . "\n" . ' <td><tt>' . "\n" . ' ' . implode( ',' . "\n" . ' ', $host['privs'] ) . "\n" . ' </tt></td>' . "\n" |