diff --git a/module/finc/src/finc/ILS/Driver/FincLibero.php b/module/finc/src/finc/ILS/Driver/FincLibero.php index 3448b5bb62a77bd84c8fbf06ac983086bb4d8831..47858569991c924390ac3219cd9404ccf99f8054 100644 --- a/module/finc/src/finc/ILS/Driver/FincLibero.php +++ b/module/finc/src/finc/ILS/Driver/FincLibero.php @@ -384,6 +384,7 @@ class FincLibero extends FincILS implements TranslatorAwareInterface protected function getCustomData($item) { $customData = []; + $customData['pickUpLocations'] = []; foreach (['available', 'unavailable'] as $availability) { if (isset($item[$availability])) { foreach ($item[$availability] as $available) { @@ -398,17 +399,20 @@ class FincLibero extends FincILS implements TranslatorAwareInterface ) { // if we have limitations qualifying for pickUpLocations, // save those in customData - $customData['pickUpLocations'] = $pickUpLocations; - } elseif (!isset($customData['pickUpLocations']) && isset($item['department'])) { + $customData['pickUpLocations'] = array_merge( + $customData['pickUpLocations'], + $pickUpLocations + ); + } elseif (empty($customData['pickUpLocations']) && isset($item['department'])) { // if we have no explicit limitations qualifying for // pickUpLocations, assume the item's department as single // pickUpLocation - $customData['pickUpLocations'] = [ + $customData['pickUpLocations'] = array_merge($customData['pickUpLocations'], [ [ 'locationID' => $item['department']['id'], 'locationDisplay' => $item['department']['content'] ] - ]; + ]); } // deal with EmailHold information if (isset($available['limitation'])) {