summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-08-10 18:47:58 +0200
committerlpsolit%gmail.com <>2005-08-10 18:47:58 +0200
commit6feae3e22d8de4aa89af6fbbc24ef69ded4ecfff (patch)
treebfe95761e24a12e8d077852bf077a8eb190bd742
parent37e00b47795f1075db5f09a4217955fa96e81a6d (diff)
downloadbugzilla-6feae3e22d8de4aa89af6fbbc24ef69ded4ecfff.tar.gz
bugzilla-6feae3e22d8de4aa89af6fbbc24ef69ded4ecfff.tar.xz
Bug 277466: saved search's old name is used when running a search - Patch by Rob Siklos <robzilla@siklos.ca> r=LpSolit,joel a=justdave
-rwxr-xr-xbuglist.cgi11
-rw-r--r--template/en/default/account/prefs/saved-searches.html.tmpl2
-rw-r--r--template/en/default/list/list.html.tmpl3
3 files changed, 8 insertions, 8 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 6bc3af291..9846d6a3c 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -934,12 +934,11 @@ $vars->{'closedstates'} = ['CLOSED', 'VERIFIED', 'RESOLVED'];
# The list of query fields in URL query string format, used when creating
# URLs to the same query results page with different parameters (such as
# a different sort order or when taking some action on the set of query
-# results). To get this string, we start with the raw URL query string
-# buffer that was created when we initially parsed the URL on script startup,
-# then we remove all non-query fields from it, f.e. the sort order (order)
-# and command type (cmdtype) fields.
-$vars->{'urlquerypart'} = $buffer;
-$vars->{'urlquerypart'} =~ s/(order|cmdtype)=[^&]*&?//g;
+# results). To get this string, we call the Bugzilla::CGI::canoncalise_query
+# function with a list of elements to be removed from the URL.
+$vars->{'urlquerypart'} = $params->canonicalise_query('order',
+ 'cmdtype',
+ 'query_based_on');
$vars->{'order'} = $order;
# The user's login account name (i.e. email address).
diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl
index 8827a89ba..741facc17 100644
--- a/template/en/default/account/prefs/saved-searches.html.tmpl
+++ b/template/en/default/account/prefs/saved-searches.html.tmpl
@@ -64,7 +64,7 @@
<tr>
<td>[% q.name FILTER html %]</td>
<td>
- <a href="buglist.cgi?[% q.query FILTER html %]">Run</a>
+ <a href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% q.name FILTER url_quote %]">Run</a>
</td>
<td>
<a href="query.cgi?[% q.query FILTER html %]&amp;known_name=[% q.name FILTER url_quote %]">Edit</a>
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index 9961bb1b3..a7b2b344c 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -159,7 +159,8 @@
<a href="buglist.cgi?
[% urlquerypart FILTER html %]&amp;ctype=ics">iCalendar</a> |
<a href="colchange.cgi?
- [% urlquerypart FILTER html %]">Change&nbsp;Columns</a> |
+ [% urlquerypart FILTER html %]&amp;query_based_on=
+ [% defaultsavename OR searchname FILTER html %]">Change&nbsp;Columns</a> |
[% IF bugs.size > 1 && caneditbugs && !dotweak %]
<a href="buglist.cgi?[% urlquerypart FILTER html %]