From ccdff3f73aaa0a9733fc29e4291639e632e9d501 Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Fri, 17 Jan 2020 11:03:03 +0100 Subject: [PATCH] refs #16630 * bug fixing if empty isbn or zbd --- res/theme/languages/en.ini | 2 +- src/AjaxHandler/GetBoss.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/res/theme/languages/en.ini b/res/theme/languages/en.ini index 50c5cb0..5b4ce4e 100644 --- a/res/theme/languages/en.ini +++ b/res/theme/languages/en.ini @@ -1,5 +1,5 @@ boss_default = "Please add a home library in your profile to obtain information about the availability of this title on site." -boss_true = "available in your home library." +boss_true = "available in your library" boss_false = "Not available in your home library.<br/><br/>Your home library can tell you whether the title can be ordered by interlibrary loan." boss_noISXNZBD = "Unfortunately, we cannot provide any further information on availability for this title at the moment.<br/><br/>Your home library can tell you whether the title can be ordered by interlibrary loan." boss_note = "Important note" diff --git a/src/AjaxHandler/GetBoss.php b/src/AjaxHandler/GetBoss.php index c42f5fc..e40f206 100644 --- a/src/AjaxHandler/GetBoss.php +++ b/src/AjaxHandler/GetBoss.php @@ -167,16 +167,17 @@ class GetBoss extends \VuFind\AjaxHandler\AbstractBase $zdbId = $driver->tryMethod('getZdbId'); $isbns = $driver->tryMethod('getISBNs'); $isbns = count($isbns) > 0 ? $isbns[0] : ''; + $isISXNZBD = (!empty($isbns) || !empty($zdbId)) ? true : false; $tmp = $isilCallNumber; unset($tmp['isils']); $callnumber = $this->getCallnumbers($boss, $tmp); - $isISIL = $inArray ? + $isISIL = $inArray && $isISXNZBD ? $this->isISIL($isilCallNumber['isils'], $boss) : false; $view = [ 'homeLibrary' => ($homeLibrary == "AAAAA") ? true : false, - 'isISXNZBD' => (!empty($isbns) || !empty($zdbId)) ? true : false, + 'isISXNZBD' => $isISXNZBD, 'isISIL' => $isISIL, 'isAddNetwork' => in_array($network, $addNetworks) ? true : false, 'url' => sprintf($this->config->SearchUrls->$network, ($inArray ? -- GitLab