From 6a9c0150812be8c4e7da87a1c81814ac202b52a5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 25 Jun 2020 10:09:46 +0200 Subject: [PATCH] Bug 25570: Allow "all", -1 --- Koha/REST/Plugin/Objects.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Koha/REST/Plugin/Objects.pm b/Koha/REST/Plugin/Objects.pm index c743e9da17..3c83020fba 100644 --- a/Koha/REST/Plugin/Objects.pm +++ b/Koha/REST/Plugin/Objects.pm @@ -69,6 +69,11 @@ sub register { $reserved_params->{_per_page} //= C4::Context->preference('RESTdefaultPageSize'); $reserved_params->{_page} //= 1; + if ( $reserved_params->{_per_page} == -1 ) { + delete $reserved_params->{_per_page}; + delete $reserved_params->{_page}; + } + # Merge pagination into query attributes $c->dbic_merge_pagination( { -- 2.20.1