diff --git a/module/finc/src/finc/RecordDriver/SolrAI.php b/module/finc/src/finc/RecordDriver/SolrAI.php index 4af5fa770e8e796a0ca20893e4d3f5234777df9c..ddc8790d1517aa070d2d75c12ac3583d0e6e73a0 100644 --- a/module/finc/src/finc/RecordDriver/SolrAI.php +++ b/module/finc/src/finc/RecordDriver/SolrAI.php @@ -267,13 +267,23 @@ class SolrAI extends SolrDefault implements } /** - * Get an array of all ISSNs associated with the record (may be empty). + * Get just the base portion of the first listed ISSN (or false if no ISSNs). + * The major part of this is a copy of the parent method. It only uses rft.issn + * instead of getISSNs * - * @return array of issns + * @return mixed */ public function getCleanISSN() { - return $this->getAIRecord('rft.issn'); + $issns = $this->getAIRecord('rft.issn'); + if (empty($issns)) { + return false; + } + $issn = $issns[0]; + if ($pos = strpos($issn, ' ')) { + $issn = substr($issn, 0, $pos); + } + return $issn; } /**