summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcolchange.cgi21
-rwxr-xr-xquery.cgi1
-rw-r--r--template/en/default/search/knob.html.tmpl4
3 files changed, 12 insertions, 14 deletions
diff --git a/colchange.cgi b/colchange.cgi
index 532bfd4b6..a521ee168 100755
--- a/colchange.cgi
+++ b/colchange.cgi
@@ -141,14 +141,12 @@ if (defined $cgi->param('rememberedquery')) {
$params->param('columnlist', join(",", @collist));
$search->set_url($params->query_string());
$search->update();
- $vars->{'redirect_url'} = "buglist.cgi?".$cgi->param('rememberedquery');
- }
- else {
- my $params = new Bugzilla::CGI($cgi->param('rememberedquery'));
- $params->param('columnlist', join(",", @collist));
- $vars->{'redirect_url'} = "buglist.cgi?".$params->query_string();
}
+ my $params = new Bugzilla::CGI($cgi->param('rememberedquery'));
+ $params->param('columnlist', join(",", @collist));
+ $vars->{'redirect_url'} = "buglist.cgi?".$params->query_string();
+
# If we're running on Microsoft IIS, using cgi->redirect discards
# the Set-Cookie lines -- workaround is to use the old-fashioned
@@ -168,7 +166,9 @@ if (defined $cgi->param('rememberedquery')) {
exit;
}
-if (defined $cgi->cookie('COLUMNLIST')) {
+if (defined $cgi->param('columnlist')) {
+ @collist = split(/[ ,]+/, $cgi->param('columnlist'));
+} elsif (defined $cgi->cookie('COLUMNLIST')) {
@collist = split(/ /, $cgi->cookie('COLUMNLIST'));
} else {
@collist = DEFAULT_COLUMN_LIST;
@@ -186,13 +186,6 @@ if (defined $cgi->param('query_based_on')) {
if ($search) {
$vars->{'saved_search'} = $search;
- $vars->{'buffer'} = "cmdtype=runnamed&namedcmd=". url_quote($search->name);
-
- my $params = new Bugzilla::CGI($search->url);
- if ($params->param('columnlist')) {
- my @collist = split(',', $params->param('columnlist'));
- $vars->{'collist'} = \@collist if scalar (@collist);
- }
}
}
diff --git a/query.cgi b/query.cgi
index a3e3445b8..eed492114 100755
--- a/query.cgi
+++ b/query.cgi
@@ -359,6 +359,7 @@ if ($cgi->param('format') && $cgi->param('format') =~ /^report-(table|graph)$/)
}
$vars->{'known_name'} = $cgi->param('known_name');
+$vars->{'columnlist'} = $cgi->param('columnlist');
# Add in the defaults.
diff --git a/template/en/default/search/knob.html.tmpl b/template/en/default/search/knob.html.tmpl
index d0381e1a4..17ff63a10 100644
--- a/template/en/default/search/knob.html.tmpl
+++ b/template/en/default/search/knob.html.tmpl
@@ -62,6 +62,10 @@
[%# The name of the existing query will be passed to buglist.cgi. %]
<input type="hidden" name="query_based_on" value="[% known_name FILTER html %]">
[% END %]
+ [%# Preserve any custom column list that might be set. %]
+ [% IF columnlist %]
+ <input type="hidden" name="columnlist" value="[% columnlist FILTER html %]">
+ [% END %]
</p>
<p>