Skip to content
Snippets Groups Projects
Commit 8dd61dd5 authored by Dorian Merz's avatar Dorian Merz Committed by Robert Lange
Browse files

refs #18048 [finc] align return type of SolrAI's getCleanISSN with parent method

parent 29809ed7
No related merge requests found
...@@ -267,13 +267,23 @@ class SolrAI extends SolrDefault implements ...@@ -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() 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;
} }
/** /**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment