]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 220642 - Setting pref 'maxusermatches' to '0' does not search for all
authorbbaetz%acm.org <>
Sat, 22 Nov 2003 11:32:51 +0000 (11:32 +0000)
committerbbaetz%acm.org <>
Sat, 22 Nov 2003 11:32:51 +0000 (11:32 +0000)
possibilities.
Patch by Andreas Ho¶fle, r=bbaetz, a=myk

Bugzilla/User.pm

index 32e624913db5e32a2e36a0b9954f79dcca02d830..e75976e598c62b244338bc7a5a6822011043b173 100644 (file)
@@ -558,12 +558,17 @@ sub match_field {
                            });
         }
 
+        my $limit = 0;
+        if (&::Param('maxusermatches')) {
+            $limit = &::Param('maxusermatches') + 1;
+        }
+
         for my $query (@queries) {
 
             my $users = match(
-                $query,                                 # match string
-                (&::Param('maxusermatches') || 0) + 1,  # match limit
-                1                                       # exclude_disabled
+                $query,   # match string
+                $limit,   # match limit
+                1         # exclude_disabled
             );
 
             # skip confirmation for exact matches