From: bugreport%peshkin.net <> Date: Mon, 12 Jul 2004 12:07:33 +0000 (+0000) Subject: Bug 250881: Do not set DEFAULT-FORMAT unless standard search is being used X-Git-Tag: bugzilla-2.18rc2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5414dfb90d011ce314bb04e7363a931cb4558291;p=thirdparty%2Fbugzilla.git Bug 250881: Do not set DEFAULT-FORMAT unless standard search is being used patch by glob r,a=justdave --- diff --git a/query.cgi b/query.cgi index cf601b7166..bd60e5b670 100755 --- 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");