Bug 19564: Fix extraction of sort order from sort condition name
Currently sort order is extracted from sort condition by splitting the field, instead use regular expression to extract the last part preceded by underscore. Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
16dfb0309b
commit
ecadc62eb4
|
|
@ -491,7 +491,7 @@ sub _convert_sort_fields {
|
|||
|
||||
# Convert the fields and orders, drop anything we don't know about.
|
||||
grep { $_->{field} } map {
|
||||
my ( $f, $d ) = split /_/;
|
||||
my ( $f, $d ) = /(.+)_(.+)/;
|
||||
{
|
||||
field => $sort_field_convert{$f},
|
||||
direction => $sort_order_convert{$d}
|
||||
|
|
|
|||
Loading…
Reference in New Issue