From b3795a13cf908e538f227ba3f990a5ed4775a7c0 Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Mon, 24 Oct 2016 18:07:07 +0200 Subject: [PATCH] refs #8943: * fixed citation bug --- .../src/finc/View/Helper/Root/Citation.php | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/module/finc/src/finc/View/Helper/Root/Citation.php b/module/finc/src/finc/View/Helper/Root/Citation.php index 3c435c503b4..db66245b475 100644 --- a/module/finc/src/finc/View/Helper/Root/Citation.php +++ b/module/finc/src/finc/View/Helper/Root/Citation.php @@ -439,22 +439,20 @@ class Citation extends \VuFind\View\Helper\Root\Citation */ protected function getISBDSeries() { - $rawSeries = $this->driver->tryMethod('getSeries'); - if (isset($rawSeries) && !empty($rawSeries) + $series = $this->driver->tryMethod('getSeries'); + if (isset($series) && !empty($series) ) { - foreach ($rawSeries as $serie) { - if (isset($serie['name']) && isset($serie['number'])) { - $seriesStr - = trim($this->stripPunctuation($serie['name']) .' ; ' . $serie['number']); - } else { - $seriesStr - = trim($this->stripPunctuation($serie['name']) . $serie['number']); - } - if (empty($seriesStr)) { - return false; - } - return '(' . $seriesStr . ')'; + if (isset($series[0]) && isset($series[1])) { + $seriesStr + = trim($this->stripPunctuation($series[0]) .' ; ' . $series[1]); + } else { + $seriesStr + = trim($this->stripPunctuation($series[0]) . $series[1]); + } + if (empty($seriesStr)) { + return false; } + return '(' . $seriesStr . ')'; } return false; } -- GitLab