]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 399089: Remove the 'usermatchmode' parameter - Patch by Frédéric Buclin <LpSoli...
authorlpsolit%gmail.com <>
Tue, 31 Mar 2009 19:24:22 +0000 (19:24 +0000)
committerlpsolit%gmail.com <>
Tue, 31 Mar 2009 19:24:22 +0000 (19:24 +0000)
Bugzilla/Config/UserMatch.pm
Bugzilla/User.pm
template/en/default/admin/params/usermatch.html.tmpl
template/en/default/global/confirm-user-match.html.tmpl

index 819247e99bec0e7b708de13eca563e0141773e40..9e19f1d2bc4100752ef16f450922994bb0ee90e4 100644 (file)
@@ -46,13 +46,6 @@ sub get_param_list {
    default => '0'
   },
 
-  {
-   name => 'usermatchmode',
-   type => 's',
-   choices => ['off', 'wildcard', 'search'],
-   default => 'off'
-  },
-
   {
    name    => 'maxusermatches',
    type    => 't',
index d373f019dad040bae6548414e9653642153c48a7..1e20ef73d832c09eff38cc29081c3f5b5f73d0ee 100644 (file)
@@ -1012,11 +1012,7 @@ sub match {
     # first try wildcards
     my $wildstr = $str;
 
-    if ($wildstr =~ s/\*/\%/g # don't do wildcards if no '*' in the string
-        # or if we only want exact matches
-        && Bugzilla->params->{'usermatchmode'} ne 'off') 
-    {
-
+    if ($wildstr =~ s/\*/\%/g) { # don't do wildcards if no '*' in the string
         # Build the query.
         trick_taint($wildstr);
         my $query  = "SELECT DISTINCT login_name FROM profiles ";
@@ -1054,10 +1050,7 @@ sub match {
     }
 
     # then try substring search
-    if ((scalar(@users) == 0)
-        && (Bugzilla->params->{'usermatchmode'} eq 'search')
-        && (length($str) >= 3))
-    {
+    if (!scalar(@users) && length($str) >= 3) {
         trick_taint($str);
 
         my $query   = "SELECT DISTINCT login_name FROM profiles ";
index 178a728441b940451f3db6a861f8e80626032b3c..54f150900bc0f39ee0437d53d800ef4265b101df 100644 (file)
                      "needs to be selected. This option should not be enabled on " _
                      "sites where there are a large number of users.",
 
-  usermatchmode => "Allow match strings to be entered for user names when entering " _
-                   "and editing ${terms.bugs}.<p> " _
-                   "'off' disables matching,<br> " _
-                   "'wildcard' allows only wildcards,<br> " _
-                   "and 'search' allows both wildcards and substring (freetext) matches.",
-
   maxusermatches => "Search for no more than this many matches.<br> " _
                     "If set to '1', no users will be displayed on ambiguous matches. " _
                     "This is useful for user privacy purposes.<br> " _
index 5b209dfce8f558c0b6184fd66ebfebe3bd84b185..f961ee0b92026673cf9df28b89351d9b03f18d78 100644 (file)
                   <b>[% query.value.users.0.identity FILTER html %]</b>
                 [% END %]
             [% ELSE %]
-                [% IF (query.key.length < 3) && !(Param('emailsuffix'))
-                    && (Param('usermatchmode') == 'search') %]
+                [% IF (query.key.length < 3) && !Param('emailsuffix') %]
                   <font color="#FF0000">was too short for substring match
                   (minimum 3 characters)</font>
                 [% ELSE %]