Lines 92-100
Generates the DBIC order_by attributes based on I<$params>, and merges into I<$a
Link Here
|
92 |
|
92 |
|
93 |
if ( defined $args->{params}->{_order_by} ) { |
93 |
if ( defined $args->{params}->{_order_by} ) { |
94 |
my $order_by = $args->{params}->{_order_by}; |
94 |
my $order_by = $args->{params}->{_order_by}; |
|
|
95 |
$order_by = [ split(/,/, $order_by) ] if ( index(',',$order_by) == -1); |
95 |
if ( reftype($order_by) and reftype($order_by) eq 'ARRAY' ) { |
96 |
if ( reftype($order_by) and reftype($order_by) eq 'ARRAY' ) { |
96 |
my @order_by = map { _build_order_atom({ string => $_, result_set => $result_set }) } |
97 |
my @order_by = map { _build_order_atom({ string => $_, result_set => $result_set }) } |
97 |
@{ $args->{params}->{_order_by} }; |
98 |
@{ $order_by }; |
98 |
$attributes->{order_by} = \@order_by; |
99 |
$attributes->{order_by} = \@order_by; |
99 |
} |
100 |
} |
100 |
else { |
101 |
else { |