View | Details | Raw Unified | Return to bug 27680
Collapse All | Expand All

(-)a/Koha/REST/Plugin/Query.pm (-8 / +12 lines)
Lines 109-121 Generates the DBIC order_by attributes based on I<$params>, and merges into I<$a Link Here
109
            my @THE_order_by;
109
            my @THE_order_by;
110
110
111
            foreach my $order_by_param ( @order_by_params ) {
111
            foreach my $order_by_param ( @order_by_params ) {
112
                my $order_by = [ split(/,/, $order_by_param) ] if ( !reftype($order_by_param) && index(',',$order_by_param) == -1);
112
                my $order_by;
113
                if ( reftype($order_by) and reftype($order_by) eq 'ARRAY' ) {
113
                $order_by = [ split(/,/, $order_by_param) ]
114
                    my @order_by = map { _build_order_atom({ string => $_, result_set => $result_set }) } @{ $order_by };
114
                    if ( !reftype($order_by_param) && index(',',$order_by_param) == -1);
115
                    push( @THE_order_by, @order_by);
115
116
                }
116
                if ($order_by) {
117
                else {
117
                    if ( reftype($order_by) and reftype($order_by) eq 'ARRAY' ) {
118
                    push @THE_order_by, _build_order_atom({ string => $order_by, result_set => $result_set });
118
                        my @order_by = map { _build_order_atom({ string => $_, result_set => $result_set }) } @{ $order_by };
119
                        push( @THE_order_by, @order_by);
120
                    }
121
                    else {
122
                        push @THE_order_by, _build_order_atom({ string => $order_by, result_set => $result_set });
123
                    }
119
                }
124
                }
120
            }
125
            }
121
126
122
- 

Return to bug 27680