aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-10-26 00:10:37 +0000
committerlpsolit%gmail.com <>2009-10-26 00:10:37 +0000
commit58351f83e321f24055d1a8aa4526de8d4935454f (patch)
tree6c827812f8e943c8b209687bcbd0a59f0be0a7a1
parentThe checkin of bug 520948 broke the docs build, because Chart::Base wasn't a ... (diff)
downloadbugzilla-58351f83e321f24055d1a8aa4526de8d4935454f.tar.gz
bugzilla-58351f83e321f24055d1a8aa4526de8d4935454f.tar.bz2
bugzilla-58351f83e321f24055d1a8aa4526de8d4935454f.zip
Bug 524395: Boolean charts And, Or, "add another chart" buttons do no work with JS turned off - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rwxr-xr-xbuglist.cgi25
1 files changed, 13 insertions, 12 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 641cbdb37..44fe1f075 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.