Skip to content
Snippets Groups Projects
Commit 3b98212b authored by Dorian Merz's avatar Dorian Merz
Browse files

refs #13663 MASTER

* removes trailing periods in footnotes
parent b0fb4ed2
No related merge requests found
...@@ -261,7 +261,15 @@ class SolrMarc extends SolrDefault ...@@ -261,7 +261,15 @@ class SolrMarc extends SolrDefault
*/ */
public function getGeneralNotes() public function getGeneralNotes()
{ {
return $this->getFieldArray('500'); $retval = [];
foreach ($this->getFieldArray('500') as $value) {
if (preg_match('/(.*)\.\s*$/',$value,$matches)) {
$retval[] = $matches[1];
} else {
$retval[] = $value;
}
}
return $retval;
} }
/** /**
......
...@@ -1649,7 +1649,12 @@ trait SolrMarcFincTrait ...@@ -1649,7 +1649,12 @@ trait SolrMarcFincTrait
} }
foreach ($fields as $field) { foreach ($fields as $field) {
if ($subfield = $field->getSubfield('a')) { if ($subfield = $field->getSubfield('a')) {
$retval[] = $subfield->getData(); $value = $subfield->getData();
if (preg_match('/(.*)\.\s*$/',$value,$matches)) {
$retval[] = $matches[1];
} else {
$retval[] = $value;
}
} }
} }
return $retval; return $retval;
......
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