From 50b24dac9f8fb9401d0a053164c1f9247153dc01 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Fri, 20 Sep 2002 04:05:14 +0000 Subject: 160476 - boolean chart addition doesn't keep query template format. Patch by gerv; r=myk. --- query.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'query.cgi') 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()); -- cgit v1.2.3-24-g4f1b