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.
git-svn-id: svn://10.0.0.236/trunk@167132 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user