From: Teemu Mannermaa Date: Wed, 7 Dec 2011 00:23:19 +0000 (-0800) Subject: Bug 366793: Use sort order param from a saved search when whining X-Git-Tag: bugzilla-4.3.1~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65b467bd089fd3d2b2bc5343093f0e73a98e580e;p=thirdparty%2Fbugzilla.git Bug 366793: Use sort order param from a saved search when whining r=mkanat, a=LpSolit --- diff --git a/whine.pl b/whine.pl index ad60672283..578a31a7cd 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 };