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

(-)a/Koha/REST/Plugin/Pagination.pm (-1 / +26 lines)
Lines 107-112 It also adds X-Total-Count, containing the total results count. Link Here
107
            return $c;
107
            return $c;
108
        }
108
        }
109
    );
109
    );
110
111
=head3 dbic_merge_pagination
112
113
    $filter = $c->dbic_merge_pagination({
114
        filter => $filter,
115
        params => {
116
            page     => $params->{_page},
117
            per_page => $params->{_per_page}
118
        }
119
    });
120
121
Adds I<page> and I<rows> elements to the filter parameter.
122
123
=cut
124
125
    $app->helper(
126
        'dbic_merge_pagination' => sub {
127
            my ( $c, $args ) = @_;
128
            my $filter = $args->{filter};
129
130
            $filter->{page} = $args->{params}->{_page};
131
            $filter->{rows} = $args->{params}->{_per_page};
132
133
            return $filter;
134
        }
135
    );
110
}
136
}
111
137
112
=head2 Internal methods
138
=head2 Internal methods
113
- 

Return to bug 19369