From: jake%bugzilla.org <> Date: Fri, 31 Dec 2004 15:04:17 +0000 (+0000) Subject: Bug 275019 - The query page no longer selects the defaults when the only options X-Git-Tag: bugzilla-2.16.8~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc33763e078329b0363760d1250f7bb52b439971;p=thirdparty%2Fbugzilla.git Bug 275019 - The query page no longer selects the defaults when the only options passed via the URL are for the boolean charts. r=mkanat, a=justdave --- diff --git a/query.cgi b/query.cgi index 9c38831c36..e02b0bfa8c 100755 --- 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; }