From 5414dfb90d011ce314bb04e7363a931cb4558291 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Mon, 12 Jul 2004 12:07:33 +0000 Subject: Bug 250881: Do not set DEFAULT-FORMAT unless standard search is being used patch by glob r,a=justdave --- query.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index cf601b716..bd60e5b67 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"); -- cgit v1.2.3-24-g4f1b