Tomas Cohen Arazi
ad83d2e07d
The way the old `objects.search` was build implied several totals were calculated there, and passed to the `$c->add_pagination_headers` helper. With the introduction of `objects.search_rs` and the ability of doing things to the resultset afterwards, it felt like out of place to have the pagination headers be implicitly set inside `objects.search_rs`. This patch makes the search_rs stash some required values (from the original request) and makes `add_pagination_headers` accept those values. This way other callers can still build their own pagination values, while allowing this simplified implementation. Full-stack tests still pass, and the helper tests are moved to the `db_dependent` section and are now more meaningful as well To test: 1. Apply this patch 2. Run: $ ktd --shell $ prove t/db_dependent/Koha/REST/Plugin/Pagination.t \ t/db_dependent/api/v1/ => SUCCESS: Tests pass! Nothing broken! 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
Auth | ||
Authority | ||
Database | ||
I18N/po/xx_XX/LC_MESSAGES | ||
Middleware | ||
Object | ||
Plugins | ||
REST/Plugin | ||
Result | ||
SearchEngine | ||
Util | ||
Config.t | ||
Email.t | ||
Exceptions.t | ||
I18N.t | ||
ItemType.t | ||
RDF.t | ||
Script.t | ||
Script_cron.t | ||
sleep.pl | ||
wait.pl | ||
Z3950responder.t |