Skip to content
Snippets Groups Projects
Commit 7c4214fd authored by Robert Lange's avatar Robert Lange
Browse files

Merge branch 'finc' into instance/fid

parents 8b394ed6 9f363cc7
No related merge requests found
...@@ -404,6 +404,22 @@ trait SolrMarcFincTrait ...@@ -404,6 +404,22 @@ trait SolrMarcFincTrait
return $retval; return $retval;
} }
public function getDOI () {
$allIdentifiers = $this->getOtherIdentifiers();
$dois = $allIdentifiers['doi'] ?? [];
if (!empty($dois)) {
return current($dois);
}
$urls = $this->getURLs();
foreach ($urls as $url) {
if (strpos($url['url'],'https://doi.org/') === 0) {
return substr($url['url'],16);
}
}
return null;
}
/** /**
* Get an array of instrumentation notes taken from the local data * Get an array of instrumentation notes taken from the local data
* of the Petrucci music library subfield 590b * of the Petrucci music library subfield 590b
......
...@@ -131,16 +131,18 @@ class Ezb extends AbstractBase implements TranslatorAwareInterface ...@@ -131,16 +131,18 @@ class Ezb extends AbstractBase implements TranslatorAwareInterface
if (isset($this->config->bibid)) { if (isset($this->config->bibid)) {
$openURL .= '&pid=' . $pid = 'bibid=' . $this->config->bibid;
'bibid%3D' . $this->config->bibid;
} else { } else {
// use IP-based request as fallback // use IP-based request as fallback
$openURL .= '&pid=client_ip%3D' . $_SERVER['REMOTE_ADDR']; $pid = 'client_ip=' . $_SERVER['REMOTE_ADDR'];
} }
$openURL .= !isset($parsed['rft.issn']) && isset($parsed['zdbid']) ? $pid .= !isset($parsed['rft.issn']) && isset($parsed['zdbid']) ?
'&zdbid=' . $parsed['zdbid'] : ''; '&zdbid=' . $parsed['zdbid'] : '';
$pid .= '&ezb=1';
$openURL .= urlencode('&ezb=1'); $openURL .= '&pid=' . urlencode($pid);
$openURL .= isset($parsed['doi']) ? '&id=doi:' . $parsed['doi'] : '';
$url = $this->getResolverUrl($openURL); $url = $this->getResolverUrl($openURL);
......
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