Skip to content

Commit

Permalink
[FINNA-1246-1248] Requested change: show removed nonfiling characters
Browse files Browse the repository at this point in the history
  • Loading branch information
tmikkonen committed Feb 23, 2024
1 parent f4ac258 commit 10e0053
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions module/Finna/src/Finna/RecordDriver/SolrMarc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2382,19 +2382,10 @@ public function getLanguageNotes()
*/
public function getUncontrolledTitle()
{
$results = [];
foreach ($this->getMarcReader()->getFields('740') as $field) {
foreach ($this->getSubfieldArray($field, ['a', 'n', 'p'], false) as $subfield) {
$subfield = $this->stripTrailingPunctuation($subfield);
if (($ind1 = $field['i1']) && ctype_digit($ind1)) {
$substr = substr($subfield, $ind1);
$results[] = mb_convert_case(mb_substr($substr, 0, 1), MB_CASE_TITLE) . mb_substr($substr, 1);
} else {
$results[] = $subfield;
}
}
}
return $results;
return $this->stripTrailingPunctuation(
$this->getFieldArray('740', ['a', 'n', 'p'], false)
);

}

/**
Expand Down

0 comments on commit 10e0053

Please sign in to comment.