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

refs #21213 [finc] fix open url concat adding ampersand

parent 204902c6
No related merge requests found
......@@ -80,7 +80,7 @@ class Ezb extends Base implements TranslatorAwareInterface
/**
* Constructor
*
* @param string $config ezb configuration
* @param string $config ezb configuration
* @param \Zend\Http\Client $httpClient HTTP client
*/
public function __construct($config, \Zend\Http\Client $httpClient)
......@@ -192,11 +192,11 @@ class Ezb extends Base implements TranslatorAwareInterface
// limit results to ezb only (set to true)
if (isset($this->config->ezb_only) && $this->config->ezb_only) {
$pid .= 'ezb=1';
$pid .= '&ezb=1';
}
// limit results to zdb only (set to true)
if (isset($this->config->zdb_only) && $this->config->zdb_only) {
$pid .= 'zdb=1';
$pid .= '&zdb=1';
}
$openURL .= '&pid=' . urlencode($pid);
......@@ -226,7 +226,7 @@ class Ezb extends Base implements TranslatorAwareInterface
// user
return false;
}
/**
* Extract electronic results from the EZB response and inject them into the
* $records array.
......@@ -277,7 +277,8 @@ class Ezb extends Base implements TranslatorAwareInterface
// get title from XPath Element defined in $xpathTitleSelector
$titleXP = "/OpenURLResponseXML/Full/ElectronicData/ResultList/" .
"Result[@state={$state}][" . ($i + 1) . "]/" . static::$xpathTitleSelector;
"Result[@state={$state}][" . ($i + 1) . "]/" .
static::$xpathTitleSelector;
$title = $xpath->query($titleXP, $result)->item(0);
if (isset($title)) {
$record['title'] = strip_tags($title->nodeValue);
......@@ -310,7 +311,8 @@ class Ezb extends Base implements TranslatorAwareInterface
"Result[@state={$state}][" . ($i + 1) . "]/JournalURL";
$journalUrl = $xpath->query($journalUrlXP, $result)->item(0);
// return direct access URL if available otherwise journal URL as fallback
// return direct access URL if available
// otherwise journal URL as fallback
if (isset($accessUrl->nodeValue)) {
$record['href'] = $accessUrl->nodeValue;
} elseif (isset($journalUrl)) {
......
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