https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212
--- Comment #126 from Jonathan Druart <[email protected]> --- 123 if ( exists $reserved_params->{query} and defined $reserved_params->{query} ) { 124 push @query_params_array, fix_query({ query => $reserved_params->{query} }); 125 } 126 if ( exists $reserved_params->{q} and defined $reserved_params->{q}) { 127 push @query_params_array, fix_query({ query => decode_json($reserved_params->{q}) }); 128 } 129 if ( exists $reserved_params->{'x-koha-query'} and defined $reserved_params->{'x-koha-query'} ) { 130 push @query_params_array, fix_query({ query => decode_json($reserved_params->{'x-koha-query'}) });; 131 } Cannot we replace it with a loop? 123 for my $q ( qw( query q x-koha-query ) ) { 124 next unless exists $reserved_params->{$q} or defined $reserved_params->{$q}; 125 push @query_params_array, fix_query({ query => decode_json $reserved_params->{$q} }); 126 } It's adding a decode_json for query, but I think it shouldn't hurt. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
