Bugzilla – Attachment 117394 Details for
Bug 27680
API DataTables Wrapper fails for ordering on multi-data-field columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27680: (QA follow-up) Minor perlcritic issue
Bug-27680-QA-follow-up-Minor-perlcritic-issue.patch (text/plain), 1.97 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-02-26 18:10:07 UTC
(
hide
)
Description:
Bug 27680: (QA follow-up) Minor perlcritic issue
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-02-26 18:10:07 UTC
Size:
1.97 KB
patch
obsolete
>From 903406932fe1c955d12a9202a4f0d0d25be4b316 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 26 Feb 2021 15:08:46 -0300 >Subject: [PATCH] Bug 27680: (QA follow-up) Minor perlcritic issue > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/Plugin/Query.pm | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/Koha/REST/Plugin/Query.pm b/Koha/REST/Plugin/Query.pm >index 25e66fc4725..ef70c9b55ab 100644 >--- a/Koha/REST/Plugin/Query.pm >+++ b/Koha/REST/Plugin/Query.pm >@@ -109,13 +109,18 @@ Generates the DBIC order_by attributes based on I<$params>, and merges into I<$a > my @THE_order_by; > > foreach my $order_by_param ( @order_by_params ) { >- my $order_by = [ split(/,/, $order_by_param) ] if ( !reftype($order_by_param) && index(',',$order_by_param) == -1); >- if ( reftype($order_by) and reftype($order_by) eq 'ARRAY' ) { >- my @order_by = map { _build_order_atom({ string => $_, result_set => $result_set }) } @{ $order_by }; >- push( @THE_order_by, @order_by); >- } >- else { >- push @THE_order_by, _build_order_atom({ string => $order_by, result_set => $result_set }); >+ my $order_by; >+ $order_by = [ split(/,/, $order_by_param) ] >+ if ( !reftype($order_by_param) && index(',',$order_by_param) == -1); >+ >+ if ($order_by) { >+ if ( reftype($order_by) and reftype($order_by) eq 'ARRAY' ) { >+ my @order_by = map { _build_order_atom({ string => $_, result_set => $result_set }) } @{ $order_by }; >+ push( @THE_order_by, @order_by); >+ } >+ else { >+ push @THE_order_by, _build_order_atom({ string => $order_by, result_set => $result_set }); >+ } > } > } > >-- >2.30.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27680
:
116794
|
116795
|
116796
|
116829
|
116831
|
116832
|
116833
|
116834
|
116843
|
116844
|
116845
|
116846
|
117335
|
117336
|
117337
|
117338
|
117339
|
117340
|
117341
|
117375
|
117388
|
117389
|
117390
|
117391
|
117392
|
117393
|
117394
|
117438
|
117439
|
117440
|
117441
|
117442
|
117476