From 58351f83e321f24055d1a8aa4526de8d4935454f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 26 Oct 2009 00:10:37 +0000 Subject: [PATCH] =?utf8?q?Bug=20524395:=20Boolean=20charts=20And,=20Or,=20?= =?utf8?q?"add=20another=20chart"=20buttons=20do=20no=20work=20with=20JS?= =?utf8?q?=20turned=20off=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ri?= =?utf8?q?c=20Buclin=20=20r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- buglist.cgi | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/buglist.cgi b/buglist.cgi index 641cbdb37c..44fe1f075d 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -67,7 +67,19 @@ if (length($buffer) == 0) { ThrowUserError("buglist_parameters_required"); } -# +# If a parameter starts with cmd-, this means the And or Or button has been +# pressed in the advanced search page with JS turned off. +if (grep { $_ =~ /^cmd\-/ } $cgi->param()) { + my $url = "query.cgi?$buffer#chart"; + print $cgi->redirect(-location => $url); + # Generate and return the UI (HTML page) from the appropriate template. + $vars->{'message'} = "buglist_adding_field"; + $vars->{'url'} = $url; + $template->process("global/message.html.tmpl", $vars) + || ThrowTemplateError($template->error()); + exit; +} + # If query was POSTed, clean the URL from empty parameters and redirect back to # itself. This will make advanced search URLs more tolerable. # @@ -184,17 +196,6 @@ if (defined $cgi->param('regetlastlist')) { }); } -if ($buffer =~ /&cmd-/) { - my $url = "query.cgi?$buffer#chart"; - print $cgi->redirect(-location => $url); - # Generate and return the UI (HTML page) from the appropriate template. - $vars->{'message'} = "buglist_adding_field"; - $vars->{'url'} = $url; - $template->process("global/message.html.tmpl", $vars) - || ThrowTemplateError($template->error()); - exit; -} - # Figure out whether or not the user is doing a fulltext search. If not, # we'll remove the relevance column from the lists of columns to display # and order by, since relevance only exists when doing a fulltext search. -- 2.47.3