From bfc4cf11107dbc16af1847181f79b6258e60e103 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Lahmann?= <lahmann@ub.uni-leipzig.de>
Date: Mon, 9 Jan 2023 13:53:53 +0100
Subject: [PATCH] refs #22989 [de_d13] bugfix for undefined property check:
 title hold link

---
 module/finc/src/finc/ILS/Driver/FincLibero.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/module/finc/src/finc/ILS/Driver/FincLibero.php b/module/finc/src/finc/ILS/Driver/FincLibero.php
index 1fc98649fc3..d9b832b8432 100644
--- a/module/finc/src/finc/ILS/Driver/FincLibero.php
+++ b/module/finc/src/finc/ILS/Driver/FincLibero.php
@@ -335,12 +335,14 @@ class FincLibero extends FincILS implements TranslatorAwareInterface
                     $isTitleHold
                     &&
                     (
-                        !isset($this->noTitleHoldStatuses)
+                       !isset($this->noTitleHoldStatuses)
                     || empty($this->noTitleHoldStatuses)
                     || !in_array($item['localIlsStatus'], $this->noTitleHoldStatuses)
                     )
                 ) {
+                    // this is a titleHold and we show TitleHoldLink
                     $result_item['item_id'] = $titleHoldId;
+                    $result_item['addTitleHoldLink'] = true;
                 } else {
                     $result_item['item_id'] = $item['id'];
                 }
@@ -348,10 +350,6 @@ class FincLibero extends FincILS implements TranslatorAwareInterface
                 // custom DAIA field used in getHoldLink()
                 $result_item['ilslink']
                     = ($item['href'] ?? $doc_href);
-                // show TitleHoldLink except for defined noTitleHoldStatuses
-                if ($isTitleHold && !in_array($item['localIlsStatus'], $this->noTitleHoldStatuses)) {
-                    $result_item['addTitleHoldLink'] = true;
-                }
 
                 // count items
                 $number++;
-- 
GitLab