From 4839ca5be61150a24d8e78d9b062b34a1144b7e0 Mon Sep 17 00:00:00 2001 From: Rune Schjellerup Philosof Date: Thu, 4 Apr 2013 14:40:19 +0200 Subject: [PATCH] Support yearly periodicals. Alma reponds differently when a periodical only has one issue each year. Basically because the name of that issue is the year instead of a number during that year. I chose the easy way out and simply called the issue '1'. The best way would of course be to change ding_periodical to support yearly periodicals. --- lib/AlmaClient/AlmaClient.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/AlmaClient/AlmaClient.class.php b/lib/AlmaClient/AlmaClient.class.php index d651954..42b9312 100644 --- a/lib/AlmaClient/AlmaClient.class.php +++ b/lib/AlmaClient/AlmaClient.class.php @@ -720,6 +720,9 @@ private static function process_catalogue_record_details($elem) { $year = $year_holdings->getAttribute('value'); foreach ($year_holdings->childNodes as $issue_holdings) { $issue = $issue_holdings->getAttribute('value'); + if (empty($issue)) { + $issue = '1'; + } $holdings = AlmaClient::process_catalogue_record_holdings($issue_holdings); $record['holdings'][$year][$issue] = $holdings; $issue_list = array(