]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 366793: Use sort order param from a saved search when whining
authorTeemu Mannermaa <wicked@sci.fi>
Wed, 7 Dec 2011 00:23:19 +0000 (16:23 -0800)
committerTeemu Mannermaa <wicked@sci.fi>
Wed, 7 Dec 2011 00:23:19 +0000 (16:23 -0800)
r=mkanat, a=LpSolit

whine.pl

index ad60672283f236afb749dc2e614419823d5c1969..578a31a7cd3ed55ac83aad1343ba49b3a76d2f39 100755 (executable)
--- 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 };