]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 581327: The patch to allow commas in Product (etc.) names broke the
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Sun, 1 Aug 2010 22:50:26 +0000 (15:50 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Sun, 1 Aug 2010 22:50:26 +0000 (15:50 -0700)
entering of comma-separated values in other search fields, like bug_id.
So now we split on commas in text fields, but not for <select> fields.
r=LpSolit, a=LpSolit

Bugzilla/Search.pm

index c99fcde282115d941142b9da6e70060eaba496b9..f93743e2a2c682cc6acf504b5e56880e5f14529a 100644 (file)
@@ -564,7 +564,8 @@ sub init {
     }
 
     foreach my $field ($params->param()) {
-        if (grep { $_->name eq $field } @legal_fields) {
+        my ($field_obj) = grep { $_->name eq $field } @legal_fields;
+        if ($field_obj) {
             my $type = $params->param("${field}_type");
             my @values = $params->param($field);
             if (!$type) {
@@ -577,7 +578,10 @@ sub init {
             }
             $type = 'matches' if $field eq 'content';
             my $send_value = join(',', @values);
-            if ($type eq 'anyexact') {
+            if ( $type eq 'anyexact'
+                 and ($field_obj->is_select or $field eq 'version'
+                      or $field eq 'target_milestone') )
+            {
                 $send_value = \@values;
             }
             push(@specialchart, [$field, $type, $send_value]);