Commit 65b467bd authored by Teemu Mannermaa's avatar Teemu Mannermaa

Bug 366793: Use sort order param from a saved search when whining

r=mkanat, a=LpSolit
parent 5c90b7dc
......@@ -447,10 +447,12 @@ sub run_queries {
# Bugzilla::Search to execute a saved query. It's exceedingly weird,
# but that's how it works.
my $searchparams = new Bugzilla::CGI($savedquery);
my @orderstrings = split(/,\s*/, $searchparams->param('order'));
my $search = new Bugzilla::Search(
'fields' => \@searchfields,
'params' => scalar $searchparams->Vars,
'user' => $args->{'recipient'}, # the search runs as the recipient
'order' => \@orderstrings
);
# If a query fails for whatever reason, it shouldn't kill the script.
my $sqlquery = eval { $search->sql };
......
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