]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 442582: Use sql_iposition instead of sql_position(lc($var), LOWER($var)) in Bugzi...
authormkanat%bugzilla.org <>
Mon, 30 Jun 2008 02:59:56 +0000 (02:59 +0000)
committermkanat%bugzilla.org <>
Mon, 30 Jun 2008 02:59:56 +0000 (02:59 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit

Bugzilla/User.pm

index 5f9e2228c48cbb4f98c50dbd7998ac3478864643..3e609aef2aa58ced55b8f0e9d1ab7551c76d55d7 100644 (file)
@@ -1067,7 +1067,6 @@ sub match {
         && (Bugzilla->params->{'usermatchmode'} eq 'search')
         && (length($str) >= 3))
     {
-        $str = lc($str);
         trick_taint($str);
 
         my $query   = "SELECT DISTINCT login_name FROM profiles ";
@@ -1076,8 +1075,8 @@ sub match {
                                ON user_group_map.user_id = profiles.userid ";
         }
         $query     .= " WHERE (" .
-                $dbh->sql_position('?', 'LOWER(login_name)') . " > 0" . " OR " .
-                $dbh->sql_position('?', 'LOWER(realname)') . " > 0) ";
+                $dbh->sql_iposition('?', 'login_name') . " > 0" . " OR " .
+                $dbh->sql_iposition('?', 'realname') . " > 0) ";
         if (Bugzilla->params->{'usevisibilitygroups'}) {
             $query .= " AND isbless = 0" .
                       " AND group_id IN(" .