From 28055c618d39d62ea81e33c3d30cde91eb7117b7 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Fri, 31 Dec 2004 16:00:50 +0000 Subject: Patch for bug 275788: Provide a line of code that defines legal query formats for other scripts to use; patch by Colin S. Ogilvie , r=vladd, a=justdave. --- query.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index 6f008e9b6..0faf156cb 100755 --- a/query.cgi +++ b/query.cgi @@ -30,6 +30,7 @@ use lib "."; require "CGI.pl"; use Bugzilla::Constants; +use Bugzilla::Search; use vars qw( @CheckOptionValues @@ -439,7 +440,7 @@ if (!($cgi->param('query_format') || $cgi->param('format'))) { # Set cookie to current format as default, but only if the format # one that we should remember. -if (grep { $_ eq $vars->{'format'} } qw(specific advanced)) { +if (IsValidQueryType($vars->{'format'})) { $cgi->send_cookie(-name => 'DEFAULTFORMAT', -value => $vars->{'format'}, -expires => "Fri, 01-Jan-2038 00:00:00 GMT"); -- cgit v1.2.3-24-g4f1b