Bug 25570: Paginate results by default in objects->search
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 21 May 2020 21:23:01 +0000 (18:23 -0300)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Thu, 23 Jul 2020 22:12:49 +0000 (00:12 +0200)
commit7ed966fc0b4c278b483ba34dc6e0180aee4ba551
treedd3f3c3929a455bffe5be1e4dd3af59879d235c1
parent8c4b82b604975446aafafb7f2b95f545b7424af8
Bug 25570: Paginate results by default in objects->search

This patch makes the helper paginate the resultsif no pagination
parameters are passed.

Page number defaults to 1, and the page size to the RESTdefaultPageSize
syspref value.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Pagination is not enforced by default
3. Apply this patch
4. Repeat 2
=> SUCCESS: Results are paginated
5. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 451ae76431d3d580494f917ed397f259cd96a876)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 16530f09687f48cb621c1a1dfc1559fc35979d51)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 55fba122759a85ea5b45a36908d67c310af1ea0c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/REST/Plugin/Objects.pm