From 23f66cf56010a06a53b965071603716fbb2e4752 Mon Sep 17 00:00:00 2001 From: Ere Maijala <ere.maijala@helsinki.fi> Date: Tue, 3 Nov 2020 11:01:52 +0200 Subject: [PATCH] KohaRest: Request all results when endpoint uses paging --- module/VuFind/src/VuFind/ILS/Driver/KohaRest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php index d06d020d76e..2c415c165b8 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php @@ -638,7 +638,8 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements 'path' => 'v1/holds', 'query' => [ 'patron_id' => $patron['id'], - '_match' => 'exact' + '_match' => 'exact', + '_per_page' => -1 ] ] ); @@ -1972,7 +1973,7 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements $cacheKey = 'libraries'; $libraries = $this->getCachedData($cacheKey); if (null === $libraries) { - $result = $this->makeRequest('v1/libraries'); + $result = $this->makeRequest('v1/libraries?_per_page=-1'); $libraries = []; foreach ($result['data'] as $library) { $libraries[$library['library_id']] = $library; -- GitLab