diff options
author | jake%bugzilla.org <> | 2004-12-23 17:54:18 +0000 |
---|---|---|
committer | jake%bugzilla.org <> | 2004-12-23 17:54:18 +0000 |
commit | 16a4553913f69fa9da5e6c816c6c747514630aa2 (patch) | |
tree | df19248128ff481c4aa0a69ec119f72f735778c6 /userprefs.cgi | |
parent | 298360bc7d0412a97205558168652e6aeb8c7526 (diff) | |
download | bugs-16a4553913f69fa9da5e6c816c6c747514630aa2.tar bugs-16a4553913f69fa9da5e6c816c6c747514630aa2.tar.gz bugs-16a4553913f69fa9da5e6c816c6c747514630aa2.tar.bz2 bugs-16a4553913f69fa9da5e6c816c6c747514630aa2.tar.xz bugs-16a4553913f69fa9da5e6c816c6c747514630aa2.zip |
Bug 274397 - Editing a saved search should now work even after clicking "Show List" from a bug.
Patch by Colin S. Ogilvie <colin.ogilvie@gmail.com>
r=wurblzap, a=justdave
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index f71fdec02..f8de9915d 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -298,8 +298,23 @@ sub DoPermissions { sub DoSavedSearches() { + # 2004-12-13 - colin.ogilvie@gmail.com, bug 274397 + # Need to work around the possibly missing query_format=advanced $vars->{'user'} = Bugzilla->user; - $vars->{'queries'} = Bugzilla->user->queries; + my @queries = @{Bugzilla->user->queries}; + my @newqueries; + foreach my $q (@queries) { + if ($q->{'query'} !~ /query_format=(advanced|specific)/) { + if ($q->{'query'} =~ /query_format=&/) { + $q->{'query'} =~ s/query_format=&/query_format=advanced&/; + } + else { + $q->{'query'} .= '&query_format=advanced'; + } + } + push @newqueries, $q; + } + $vars->{'queries'} = \@newqueries; } sub SaveSavedSearches() { |