The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 03a632fb authored by Demian Katz's avatar Demian Katz
Browse files

Separated raw from normalized LCCN.

parent ae7ad455
No related merge requests found
......@@ -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.
......
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