Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
fix for #469 and codestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
edelm committed Dec 19, 2016
1 parent 7f244ae commit 947879f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion module/Swissbib/src/Swissbib/RecordDriver/SolrMarc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,13 @@ public function getNationalLicenceData()
//gives always the same publisher in result list
//$publisher = array_values($this->getHoldingsStructure())[0]['institution'];

$publisher = $this->getFieldArray('035', ['a'])[0];
$publisherArray = $this->getFieldArray('035', ['a']);
$publisher = "";
foreach ($publisherArray as $key => $val) {
if (strpos($key, '(NATIONALLICENCE)') !== 0) {
$publisher = $val;
}
}
$publisher = explode("-", $publisher)[0];
$publisher = str_replace("(NATIONALLICENCE)", "NL-", $publisher);

Expand Down
4 changes: 2 additions & 2 deletions module/Swissbib/src/Swissbib/View/Helper/NationalLicences.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class NationalLicences extends AbstractHelper
*
* @param $sm HelperPluginManager
*/
public function __construct($sm)
public function __construct(ServiceManager $sm)
{
$this->sm = $sm;
$this->config = $sm->getServiceLocator()->get('VuFind\Config')
Expand All @@ -86,7 +86,7 @@ public function __construct($sm)
);
$this->remoteAddress->setTrustedProxies($trustedProxies);
$this->nationalLicenceService = $this->sm->getServiceLocator()
->get('Swissbib\NationalLicenceService');
->get('Swissbib\NationalLicenceService');

/*
Based on Oxford mapping:
Expand Down

0 comments on commit 947879f

Please sign in to comment.