From: bbaetz%acm.org <> Date: Sat, 22 Nov 2003 11:32:51 +0000 (+0000) Subject: Bug 220642 - Setting pref 'maxusermatches' to '0' does not search for all X-Git-Tag: bugzilla-2.17.7~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63790559f094b702688365ed12242526ce3ff969;p=thirdparty%2Fbugzilla.git Bug 220642 - Setting pref 'maxusermatches' to '0' does not search for all possibilities. Patch by Andreas Ho¶fle, r=bbaetz, a=myk --- diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 32e624913d..e75976e598 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -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