summaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-12-31 17:00:50 +0100
committerjocuri%softhome.net <>2004-12-31 17:00:50 +0100
commit28055c618d39d62ea81e33c3d30cde91eb7117b7 (patch)
treee0394bdf422efd920e17314e4b9b8476eea3d609 /query.cgi
parent7f51d13817aecceac6e9a79155af37fc7614b683 (diff)
downloadbugzilla-28055c618d39d62ea81e33c3d30cde91eb7117b7.tar.gz
bugzilla-28055c618d39d62ea81e33c3d30cde91eb7117b7.tar.xz
Patch for bug 275788: Provide a line of code that defines legal query formats for other scripts to use; patch by Colin S. Ogilvie <colin.ogilvie@gmail.com>, r=vladd, a=justdave.
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi3
1 files changed, 2 insertions, 1 deletions
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");