diff --git a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php index c2bb4ab6d477168c216c2dc1e0056b8f79efa994..0b9d7c02a9b4800c24a344643551a8e655d3ddc4 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php +++ b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php @@ -215,9 +215,11 @@ class MultiBackend extends AbstractBase implements \Zend\Log\LoggerAwareInterfac $source = $this->getSource($id); $driver = $this->getDriver($source); if ($driver) { - // Don't pass on patron information belonging to another source + // If the patron belongs to another source, just pass on an empty array + // to indicate that the patron has logged in but is not available for the + // current catalog. if ($patron && $this->getSource($patron['cat_username']) !== $source) { - $patron = null; + $patron = []; } $holdings = $driver->getHolding( $this->getLocalId($id), diff --git a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php index f93be7a2581385abba8ee983557aa18abc8c605a..7abed9a1bc9cf43e63e5599d17b36028c757317f 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php @@ -1016,7 +1016,7 @@ EOT; * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function processHoldingData($data, $id, $patron = false) + protected function processHoldingData($data, $id, $patron = null) { $holding = []; diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php index 76bd82cca96eae066482f400f862aff3a39388c5..bbae414af17e8c82dd0eb4d0ceee10c42de20c16 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php +++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php @@ -477,11 +477,11 @@ class VoyagerRestful extends Voyager implements \VuFindHttp\HttpServiceAwareInte * * @param array $data Item Data * @param string $id The BIB record id - * @param mixed $patron Patron Data or boolean false + * @param array $patron Patron Data * * @return array Keyed data */ - protected function processHoldingData($data, $id, $patron = false) + protected function processHoldingData($data, $id, $patron = null) { $holding = parent::processHoldingData($data, $id, $patron); @@ -551,7 +551,8 @@ class VoyagerRestful extends Voyager implements \VuFindHttp\HttpServiceAwareInte $ILLRequest = ''; $addILLRequestLink = false; - if ($patron && $isILLRequestAllowed) { + // Check only that a patron has logged in + if (null !== $patron && $isILLRequestAllowed) { $ILLRequest = 'auto'; $addILLRequestLink = 'check'; }