diff --git a/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php b/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php index 270004a895b759732af65c8b6aa717fe6ac48056..9ecfa99aa666b4aa139bf013f140745019f52b64 100644 --- a/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php +++ b/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php @@ -585,17 +585,25 @@ class DefaultRecord extends AbstractBase } /** - * Get a LCCN, normalised according to info:lccn + * Get a raw, unnormalized LCCN. (See getLCCN for normalization). * * @return string */ - public function getLCCN() + protected function getRawLCCN() { // Get LCCN from Index - $raw = isset($this->fields['lccn']) ? $this->fields['lccn'] : ''; + return isset($this->fields['lccn']) ? $this->fields['lccn'] : ''; + } + /** + * Get a LCCN, normalised according to info:lccn + * + * @return string + */ + public function getLCCN() + { // Remove all blanks. - $raw = preg_replace('{[ \t]+}', '', $raw); + $raw = preg_replace('{[ \t]+}', '', $this->getRawLCCN()); // If there is a forward slash (/) in the string, remove it, and remove all // characters to the right of the forward slash.