From f178f847bfd96657308be3da04a8258c53a22d5e Mon Sep 17 00:00:00 2001 From: Dorian Merz <merz@ub.uni-leipzig.de> Date: Wed, 27 Oct 2021 08:51:53 +0200 Subject: [PATCH] refs #20813 [de_105] remove getItemStatus * moved to finc * overrides getItemNotes to keep TUF specifics --- .../src/de_105/ILS/Driver/FincLibero.php | 37 ++++--------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/module/de_105/src/de_105/ILS/Driver/FincLibero.php b/module/de_105/src/de_105/ILS/Driver/FincLibero.php index ec7c5a4438c..ea385ab6e92 100644 --- a/module/de_105/src/de_105/ILS/Driver/FincLibero.php +++ b/module/de_105/src/de_105/ILS/Driver/FincLibero.php @@ -114,42 +114,21 @@ class FincLibero extends \finc\ILS\Driver\FincLibero } /** - * Returns an array with status information for provided item. - * - * @param array $item Array with DAIA item data + * {@inheritdoc} + * DE-105 specific, avoid duplicate texts for available status by ommission + * of item status * + * @param array $return + * @param array $item * @return array */ - protected function getItemStatus($item) + protected function getItemNotes($return, $item) { - $return = \finc\ILS\Driver\FincILS::getItemStatus($item); - - $return['awlRecordId'] = $this->getBoundItemId($item); - // is this item bound with another item? - if ($return['awlRecordId'] != null) { - // overwrite any existing link settings as we need to order this item - // via the bound item - $return['addLink'] = - $return['addStorageRetrievalRequestLink'] = - $return['addILLRequestLink'] = - $return['addEmailHoldLink'] = false; - $return['awlRecordStatus'] = - current($this->getStatus($return['awlRecordId'])); - } - - // add all item specific information from DAIA field about to item_notes - // (https://intern.finc.info/issues/7863) - $about = (isset($item['about'])) ? [$item['about']] : []; - - $return['item_notes'] = array_unique( + return array_unique( array_merge( - // DE-105 specific, avoid duplicate texts for available status - // (array)$return['status'], - // DE-105 specific - END $return['item_notes'], - $about + $item['about'] ?? [] ) ); - return $return; } } -- GitLab