Bug 29570: Simplify for loop

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2022-02-08 17:35:27 +01:00 committed by Kyle Hall
parent 69bd39f9ca
commit dbf8c63cdd
1 changed files with 3 additions and 3 deletions

View File

@ -77,9 +77,9 @@ sub list {
if ( exists $reserved_params->{_order_by} ) {
# _order_by passed, fix if required
for ( my $i = 0; $i < scalar @{$reserved_params->{_order_by}}; $i++ ) {
$reserved_params->{_order_by}->[$i] =~ s|biblio\.|biblio\.biblioitem\.|g
if $reserved_params->{_order_by}->[$i] =~ m/.*(isbn|ean|publisher).*/;
for my $p ( @{$reserved_params->{_order_by}} ) {
$p =~ s|biblio\.|biblio\.biblioitem\.|g
if $p =~ m/.*(isbn|ean|publisher).*/;
}
}