diff --git a/config/vufind/Aleph.ini b/config/vufind/Aleph.ini index c70181f6d08bf10284d33a014cc11385b51ccc42..7e81c375520367751749ff46a7b65a3e72187fef 100644 --- a/config/vufind/Aleph.ini +++ b/config/vufind/Aleph.ini @@ -46,6 +46,10 @@ quick_availability = true ; Comma-separated list of pickup locations sorted by preference preferred_pick_up_locations = "PICK1,PICK2" +; default patron id that will be used to decide if an item is available for loan +; when user is not logged in, optional +default_patron_id = PATRON_ID + ; adm-lib / sub-library array ; This is a list of patron home libraries and the ADM the library belongs to [sublibadm] diff --git a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php index a1ffe29a20f01d67ab9c7322ece3d61b865d931c..c0a74128bde72ca348a07423f381dde29a3ccccd 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php @@ -453,6 +453,9 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, ',', $this->config['Catalog']['preferred_pick_up_locations'] ); } + if (isset($this->config['Catalog']['default_patron_id'])) { + $this->defaultPatronId = $this->config['Catalog']['default_patron_id']; + } } /** @@ -751,6 +754,8 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $params = array('view' => 'full'); if ($patron) { $params['patron'] = $patron['id']; + } else if (isset($this->defaultPatronId)) { + $params['patron'] = $this->defaultPatronId; } try { $xml = $this->doRestDLFRequest(