diff --git a/ChangeLog b/ChangeLog index 08adffc295..1b26437dec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.2.9.0 (not yet released) - bug ajax.js responseHandler: cannot read property of null - bug sql.js: str is undefined +- bug #4524 Allow for direct selection of "0" on the "user overview" page 4.2.8.0 (2014-08-31) - bug #4516 Odd export behavior diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index db3605f546..1bf7b6e07b 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -78,14 +78,15 @@ function PMA_rangeOfUsers($initial = '') { // strtolower() is used because the User field // might be BINARY, so LIKE would be case sensitive - if (! empty($initial)) { - $ret = " WHERE `User` LIKE '" - . PMA_Util::sqlAddSlashes($initial, true) . "%'" - . " OR `User` LIKE '" - . PMA_Util::sqlAddSlashes(strtolower($initial), true) . "%'"; - } else { - $ret = ''; + if ($initial === null || $initial === '') { + return ''; } + + $ret = " WHERE `User` LIKE '" + . PMA_Util::sqlAddSlashes($initial, true) . "%'" + . " OR `User` LIKE '" + . PMA_Util::sqlAddSlashes(strtolower($initial), true) . "%'"; + return $ret; } // end function @@ -3200,22 +3201,25 @@ function PMA_getHtmlForInitials($array_initials) $html_output = '
| ' - . '' . $tmp_initial - . '' - . ' | ' . "\n"; - } else { - $html_output .= '' . $tmp_initial . ' | '; - } + if ($tmp_initial === null) { + continue; } + + if (!$initial_was_found) { + $html_output .= '' . $tmp_initial . ' | '; + continue; + } + + $html_output .= '' + . '' . $tmp_initial + . '' + . ' | ' . "\n"; } $html_output .= '' . ' |