From f2dbc52c780ae91ab4d94a0823f435f889d69a2f Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 6 Nov 2014 10:38:14 -0500
Subject: [PATCH] Fixed bugs in hasHoldings().

---
 module/VuFind/src/VuFind/ILS/Driver/NoILS.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php
index f1f55447441..b7e788d0af1 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php
@@ -267,8 +267,11 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface
     public function hasHoldings($id)
     {
         $useHoldings = isset($this->config['settings']['useHoldings'])
-            ? $this->config['settings']['useHoldings'] : 'none';
-        return $useHoldings == 'none';
+            ? $this->config['settings']['useHoldings'] : '';
+
+        // "none" will be processed differently in the config depending
+        // on whether it's in or out of quotes; handle both cases.
+        return $useHoldings != 'none' && !empty($useHoldings);
     }
 
 
-- 
GitLab