]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 275019 - The query page no longer selects the defaults when the only options
authorjake%bugzilla.org <>
Fri, 31 Dec 2004 15:04:17 +0000 (15:04 +0000)
committerjake%bugzilla.org <>
Fri, 31 Dec 2004 15:04:17 +0000 (15:04 +0000)
 passed via the URL are for the boolean charts.
r=mkanat, a=justdave

query.cgi

index 9c38831c36b556452ce328cc63932cc1449301bb..e02b0bfa8c1d9d6e5046f7bc8f50f0d66bfd095e 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -152,10 +152,18 @@ sub PrefillForm {
             $value = "";
         }
         
+        # If the name begins with field, type, or value, then it is part of
+        # the boolean charts. Because these are built different than the rest
+        # of the form, we don't need to save a default value. We do, however,
+        # need to indicate that we found something so the default query isn't
+        # added in if all we have are boolean chart items.
+        if ($name =~ m/^(?:field|type|value)/) {
+            $foundone = 1;
+        }
         # If the name ends in a number (which it does for the fields which
         # are part of the email searching), we use the array
         # positions to show the defaults for that number field.
-        if ($name =~ m/^(.+)(\d)$/ && defined($default{$1})) {
+        elsif ($name =~ m/^(.+)(\d)$/ && defined($default{$1})) {
             $foundone = 1;
             $default{$1}->[$2] = $value;
         }