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

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

Return to bug 19278