@@ -, +, @@ - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/Koha/REST/Plugin/Pagination.t - Apply this patch - Run: k$ prove t/Koha/REST/Plugin/Pagination.t - Sign off :-D --- Koha/REST/Plugin/Pagination.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/Koha/REST/Plugin/Pagination.pm +++ a/Koha/REST/Plugin/Pagination.pm @@ -57,7 +57,11 @@ It also adds X-Total-Count, containing the total results count. my $total = $args->{total}; my $req_page = $args->{params}->{page}; - my $per_page = $args->{params}->{per_page}; + my $per_page = $args->{params}->{per_page} // + C4::Context->preference('RESTdefaultPageSize'); + + # do we need to paginate? + return $c unless $req_page; my $pages = int $total / $per_page; $pages++ --