Commit a90fb5f0 authored by wicked%sci.fi's avatar wicked%sci.fi

Bug 448690: Changing columns after editing a saved search forgets edits - Patch…

Bug 448690: Changing columns after editing a saved search forgets edits - Patch by Teemu Mannermaa <wicked@sci.fi> r/a=LpSolit
parent 6470da7d
......@@ -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);
}
}
}
......
......@@ -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.
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment