summaryrefslogtreecommitdiffstats
path: root/whine.pl
diff options
context:
space:
mode:
authorTeemu Mannermaa <wicked@sci.fi>2011-12-07 01:23:19 +0100
committerTeemu Mannermaa <wicked@sci.fi>2011-12-07 01:23:19 +0100
commit65b467bd089fd3d2b2bc5343093f0e73a98e580e (patch)
treee4946ecfd309e32ae0df4ecd0190ec0a05fbf0ad /whine.pl
parent5c90b7dc1ca576328de2e673f76717c87ba3cf8a (diff)
downloadbugzilla-65b467bd089fd3d2b2bc5343093f0e73a98e580e.tar.gz
bugzilla-65b467bd089fd3d2b2bc5343093f0e73a98e580e.tar.xz
Bug 366793: Use sort order param from a saved search when whining
r=mkanat, a=LpSolit
Diffstat (limited to 'whine.pl')
-rwxr-xr-xwhine.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/whine.pl b/whine.pl
index ad6067228..578a31a7c 100755
--- a/whine.pl
+++ b/whine.pl
@@ -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 };