]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 250881: Do not set DEFAULT-FORMAT unless standard search is being used
authorbugreport%peshkin.net <>
Mon, 12 Jul 2004 12:07:33 +0000 (12:07 +0000)
committerbugreport%peshkin.net <>
Mon, 12 Jul 2004 12:07:33 +0000 (12:07 +0000)
patch by glob
r,a=justdave

query.cgi

index cf601b7166a4cfb1baf316854deccdc5a9223bc1..bd60e5b6703f20b0daa0461139526e79157cb7b4 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -410,8 +410,9 @@ if (!($cgi->param('query_format') || $cgi->param('format'))) {
     }
 }
 
-# Set cookie from format unless it's a report
-if ($vars->{'format'} !~ /^report-/i) {
+# 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)) {
     $cgi->send_cookie(-name => 'DEFAULTFORMAT',
                       -value => $vars->{'format'},
                       -expires => "Fri, 01-Jan-2038 00:00:00 GMT");