View | Details | Raw Unified | Return to bug 19278
Collapse All | Expand All

(-)a/Koha/REST/Plugin/Pagination.pm (-2 / +5 lines)
Lines 60-66 It also adds X-Total-Count, containing the total results count. Link Here
60
60
61
            my $total    = $args->{total};
61
            my $total    = $args->{total};
62
            my $req_page = $args->{params}->{_page};
62
            my $req_page = $args->{params}->{_page};
63
            my $per_page = $args->{params}->{_per_page};
63
            my $per_page = $args->{params}->{_per_page} //
64
                            C4::Context->preference('RESTdefaultPageSize');
65
66
            # do we need to paginate?
67
            return $c unless $req_page;
64
68
65
            my $pages = int $total / $per_page;
69
            my $pages = int $total / $per_page;
66
            $pages++
70
            $pages++
67
- 

Return to bug 19278