Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.814 diff -u -p -r1.814 comment.module --- modules/comment/comment.module 4 Dec 2009 16:49:46 -0000 1.814 +++ modules/comment/comment.module 9 Dec 2009 21:43:56 -0000 @@ -1940,7 +1940,7 @@ function comment_form_validate($form, &$ $query = db_select('users', 'u'); $query->addField('u', 'uid', 'uid'); $taken = $query - ->where('LOWER(name) = :name', array(':name' => $form_state['values']['name'])) + ->condition('name', $form_state['values']['name'], 'LIKE') ->countQuery() ->execute() ->fetchField(); Index: modules/profile/profile.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v retrieving revision 1.36 diff -u -p -r1.36 profile.admin.inc --- modules/profile/profile.admin.inc 2 Dec 2009 14:56:32 -0000 1.36 +++ modules/profile/profile.admin.inc 9 Dec 2009 21:43:56 -0000 @@ -419,7 +419,7 @@ function profile_field_delete_submit($fo */ function profile_admin_settings_autocomplete($string) { $matches = array(); - $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", 0, 10, array(':category' => $string . '%')); + $result = db_query_range("SELECT category FROM {profile_field} WHERE category LIKE :category", 0, 10, array(':category' => $string . '%')); foreach ($result as $data) { $matches[$data->category] = check_plain($data->category); } Index: modules/profile/profile.module =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v retrieving revision 1.283 diff -u -p -r1.283 profile.module --- modules/profile/profile.module 6 Dec 2009 18:24:29 -0000 1.283 +++ modules/profile/profile.module 9 Dec 2009 21:43:56 -0000 @@ -611,8 +611,7 @@ function _profile_get_fields($category, $query->condition('register', 1); } else { - // Use LOWER(:category) instead of PHP's strtolower() to avoid UTF-8 conversion issues. - $query->where('LOWER(category) = LOWER(:category)', array(':category' => $category)); + $query->condition('category', $category, 'LIKE'); } if (!user_access('administer users')) { $query->condition('visibility', PROFILE_HIDDEN, '<>'); Index: modules/profile/profile.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v retrieving revision 1.21 diff -u -p -r1.21 profile.pages.inc --- modules/profile/profile.pages.inc 9 Oct 2009 01:00:02 -0000 1.21 +++ modules/profile/profile.pages.inc 9 Dec 2009 21:43:56 -0000 @@ -125,7 +125,7 @@ function profile_autocomplete($field, $s $matches = array(); $autocomplete_field = (bool) db_query_range("SELECT 1 FROM {profile_field} WHERE fid = :fid AND autocomplete = 1", 0, 1, array(':fid' => $field))->fetchField(); if ($autocomplete_field) { - $values = db_query_range("SELECT value FROM {profile_value} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", 0, 10, array( + $values = db_query_range("SELECT value FROM {profile_value} WHERE fid = :fid AND value LIKE :value GROUP BY value ORDER BY value ASC", 0, 10, array( ':fid' => $field, ':value' => $string . '%', ))->fetchCol(); Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.1089 diff -u -p -r1.1089 user.module --- modules/user/user.module 7 Dec 2009 03:45:16 -0000 1.1089 +++ modules/user/user.module 9 Dec 2009 21:43:57 -0000 @@ -755,9 +755,12 @@ function user_access($string, $account = * @return boolean TRUE for blocked users, FALSE for active. */ function user_is_blocked($name) { - $deny = db_query("SELECT name FROM {users} WHERE status = 0 AND name = LOWER(:name)", array(':name' => $name))->fetchObject(); - - return $deny; + return db_select('users') + ->fields('users', array('name')) + ->condition('name', $name, 'LIKE') + ->condition('status', 0) + ->execute() + ->fetchObject(); } /** Index: modules/user/user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.62 diff -u -p -r1.62 user.pages.inc --- modules/user/user.pages.inc 1 Dec 2009 16:03:35 -0000 1.62 +++ modules/user/user.pages.inc 9 Dec 2009 21:43:57 -0000 @@ -12,7 +12,7 @@ function user_autocomplete($string = '') { $matches = array(); if ($string) { - $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", 0, 10, array(':name' => $string . '%')); + $result = db_query_range("SELECT name FROM {users} WHERE name LIKE :name", 0, 10, array(':name' => $string . '%')); foreach ($result as $user) { $matches[$user->name] = check_plain($user->name); }