diff options
author | Suhaib Khan <suhebjerk@gmail.com> | 2014-02-26 14:43:38 +0530 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-04-23 09:11:40 -0700 |
commit | 6ef4e4e7907b1ab4c50b53e62b50c014813594f7 (patch) | |
tree | bec4e6ca2832a23f4a97b5f9ca7f28eaebf662ae /phpBB/memberlist.php | |
parent | a74216527c42b9bcef876ab1df93185dc7f18889 (diff) | |
download | forums-6ef4e4e7907b1ab4c50b53e62b50c014813594f7.tar forums-6ef4e4e7907b1ab4c50b53e62b50c014813594f7.tar.gz forums-6ef4e4e7907b1ab4c50b53e62b50c014813594f7.tar.bz2 forums-6ef4e4e7907b1ab4c50b53e62b50c014813594f7.tar.xz forums-6ef4e4e7907b1ab4c50b53e62b50c014813594f7.zip |
[ticket/10737] Using UTF-8 aware alternatives in PHP code.
PHPBB3-10737
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index e6f1640691..0b10c123a1 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -983,18 +983,18 @@ switch ($mode) case 'livesearch': $username_chars = $request->variable('q', '', true); - $username_chars = strtolower($username_chars); + $username_chars = utf8_strtolower($username_chars); $sql = 'SELECT username, user_id FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)) . ' - AND LOWER(username) ' . $db->sql_like_expression($username_chars . $db->any_char); + AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->any_char); $result = $db->sql_query_limit($sql, 10); $user_list = array(); while ($row = $db->sql_fetchrow($result)) { - $user_list[] = array("id" => $row['user_id'], "name" => $row['username']); + $user_list[] = array('id' => $row['user_id'], 'name' => $row['username']); } $db->sql_freeresult($result); $json_response = new \phpbb\json_response(); |