]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 658929 - User autocomplete is very slow when there are lots of users in the profi...
authorDavid Lawrence <dlawrence@mozilla.com>
Tue, 5 Jul 2011 21:12:45 +0000 (17:12 -0400)
committerDavid Lawrence <dlawrence@mozilla.com>
Tue, 5 Jul 2011 21:12:45 +0000 (17:12 -0400)
Reverted patch that changed disabledtext = '' to LENGTH(disabledtext) = 0 as gave no real improvement.

Bugzilla/User.pm

index 4aa05224fbc4d216046055120b5dadf283d308f2..f81ed2b2f2643006af048958beb8dddfb5f48748 100644 (file)
@@ -1243,7 +1243,7 @@ sub match {
                       "AND group_id IN(" .
                       join(', ', (-1, @{$user->visible_groups_inherited})) . ") ";
         }
-        $query    .= " AND LENGTH(disabledtext) = 0 " if $exclude_disabled;
+        $query    .= " AND disabledtext = '' " if $exclude_disabled;
         $query    .= $dbh->sql_limit($limit) if $limit;
 
         # Execute the query, retrieve the results, and make them into
@@ -1278,7 +1278,7 @@ sub match {
                       " AND group_id IN(" .
                 join(', ', (-1, @{$user->visible_groups_inherited})) . ") ";
         }
-        $query     .= " AND LENGTH(disabledtext) = 0 " if $exclude_disabled;
+        $query     .= " AND disabledtext = '' " if $exclude_disabled;
         $query     .= $dbh->sql_limit($limit) if $limit;
         my $user_ids = $dbh->selectcol_arrayref($query, undef, ($str, $str));
         @users = @{Bugzilla::User->new_from_list($user_ids)};
@@ -1696,7 +1696,7 @@ sub get_userlist {
                   "AND group_id IN(" .
                   join(', ', (-1, @{$self->visible_groups_inherited})) . ")";
     }
-    $query    .= " WHERE LENGTH(disabledtext) = 0 ";
+    $query    .= " WHERE disabledtext = '' ";
     $query    .= $dbh->sql_group_by('userid', 'login_name, realname');
 
     my $sth = $dbh->prepare($query);