summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-09-20 06:05:14 +0200
committergerv%gerv.net <>2002-09-20 06:05:14 +0200
commit50b24dac9f8fb9401d0a053164c1f9247153dc01 (patch)
tree506f0ab32fe94a36f997a13b7de663158638e01a
parent2f9bd287a04393c37982ee4c2a376a23d3268350 (diff)
downloadbugzilla-50b24dac9f8fb9401d0a053164c1f9247153dc01.tar.gz
bugzilla-50b24dac9f8fb9401d0a053164c1f9247153dc01.tar.xz
160476 - boolean chart addition doesn't keep query template format. Patch by gerv; r=myk.
-rwxr-xr-xquery.cgi9
-rw-r--r--template/en/default/search/search-advanced.html.tmpl4
-rw-r--r--template/en/default/search/search.html.tmpl4
3 files changed, 14 insertions, 3 deletions
diff --git a/query.cgi b/query.cgi
index 89c63073b..e038d98ae 100755
--- a/query.cgi
+++ b/query.cgi
@@ -362,8 +362,15 @@ $default{'querytype'} = $deforder || 'Importance';
# Add in the defaults.
$vars->{'default'} = \%default;
+$vars->{'format'} = $::FORM{'format'};
+
# Generate and return the UI (HTML page) from the appropriate template.
-my $format = GetFormat("search/search", $::FORM{'format'}, $::FORM{'ctype'});
+# If we submit back to ourselves (for e.g. boolean charts), we need to
+# preserve format information; hence query_format taking priority over
+# format.
+my $format = GetFormat("search/search",
+ $::FORM{'query_format'} || $::FORM{'format'},
+ $::FORM{'ctype'});
print "Content-Type: $format->{'ctype'}\n\n";
$template->process($format->{'template'}, $vars)
|| ThrowTemplateError($template->error());
diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl
index 09e83add8..d1614ae3a 100644
--- a/template/en/default/search/search-advanced.html.tmpl
+++ b/template/en/default/search/search-advanced.html.tmpl
@@ -33,7 +33,9 @@
[% button_name = "Search" %]
<form method="get" action="buglist.cgi" name="queryform">
-
+ [%# If we resubmit to ourselves, we need to know if we are using a format. %]
+ <input type="hidden" name="query_format" value="[% format %]">
+
[% PROCESS search/form.html.tmpl %]
[% PROCESS search/knob.html.tmpl %]
diff --git a/template/en/default/search/search.html.tmpl b/template/en/default/search/search.html.tmpl
index 09e83add8..d1614ae3a 100644
--- a/template/en/default/search/search.html.tmpl
+++ b/template/en/default/search/search.html.tmpl
@@ -33,7 +33,9 @@
[% button_name = "Search" %]
<form method="get" action="buglist.cgi" name="queryform">
-
+ [%# If we resubmit to ourselves, we need to know if we are using a format. %]
+ <input type="hidden" name="query_format" value="[% format %]">
+
[% PROCESS search/form.html.tmpl %]
[% PROCESS search/knob.html.tmpl %]