Bug 27680: Allow traditional multi-params to work
This patch allows the preceeding test to pass. Strictly, we want a comma
delimited string for our _order_by parameter, but we cannot easily block
a traditional multi-passed parameter. As such the 'nice' thing to do is
handle it when such a thing is passed as it will pass through validation
regardless.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc23981b46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
5191ed911d
commit
30f02bee8a
|
|
@ -92,7 +92,7 @@ Generates the DBIC order_by attributes based on I<$params>, and merges into I<$a
|
|||
|
||||
if ( defined $args->{params}->{_order_by} ) {
|
||||
my $order_by = $args->{params}->{_order_by};
|
||||
$order_by = [ split(/,/, $order_by) ] if ( index(',',$order_by) == -1);
|
||||
$order_by = [ split(/,/, $order_by) ] if ( !reftype($order_by) && index(',',$order_by) == -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 };
|
||||
|
|
|
|||
Loading…
Reference in New Issue