aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-06-13 20:14:01 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-06-13 20:14:01 -0700
commit79542d43011ee798f0b9b72976b6cb0ef033b84f (patch)
tree061c2aad27ba71bb2a7a881e044fd4de298e03ba /query.cgi
parentBug 663696: Remove 'config' hook example from the Example extension (diff)
downloadbugzilla-79542d43011ee798f0b9b72976b6cb0ef033b84f.tar.gz
bugzilla-79542d43011ee798f0b9b72976b6cb0ef033b84f.tar.bz2
bugzilla-79542d43011ee798f0b9b72976b6cb0ef033b84f.zip
Bug 660866: Allow editing of old "boolean chart" searches using the new
"custom search" UI controls on the advanced search form. r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi10
1 files changed, 10 insertions, 0 deletions
diff --git a/query.cgi b/query.cgi
index 097701b63..93de62b63 100755
--- a/query.cgi
+++ b/query.cgi
@@ -80,6 +80,16 @@ sub PrefillForm {
$buf = new Bugzilla::CGI($buf);
my $foundone = 0;
+ # If there are old-style boolean charts in the URL (from an old saved
+ # search or from an old link on the web somewhere) then convert them
+ # to the new "custom search" format so that the form is populated
+ # properly.
+ my $any_boolean_charts = grep { /^field-?\d+/ } $buf->param();
+ if ($any_boolean_charts) {
+ my $search = new Bugzilla::Search(params => scalar $buf->Vars);
+ $search->boolean_charts_to_custom_search($buf);
+ }
+
# Query parameters that don't represent form fields on this page.
my @skip = qw(format query_format list_id columnlist);