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

Simplified URL generation.

parent 1ce2b746
No related merge requests found
...@@ -708,14 +708,14 @@ class SolrDefault extends AbstractBase ...@@ -708,14 +708,14 @@ class SolrDefault extends AbstractBase
$params['rft.pub'] = $publishers[0]; $params['rft.pub'] = $publishers[0];
} }
$params['rft.edition'] = $this->getEdition(); $params['rft.edition'] = $this->getEdition();
$params['rft.isbn'] = $this->getCleanISBN(); $params['rft.isbn'] = (string)$this->getCleanISBN();
break; break;
case 'Article': case 'Article':
$params['rft_val_fmt'] = 'info:ofi/fmt:kev:mtx:journal'; $params['rft_val_fmt'] = 'info:ofi/fmt:kev:mtx:journal';
$params['rft.genre'] = 'article'; $params['rft.genre'] = 'article';
$params['rft.issn'] = $this->getCleanISSN(); $params['rft.issn'] = (string)$this->getCleanISSN();
// an article may have also an ISBN: // an article may have also an ISBN:
$params['rft.isbn'] = $this->getCleanISBN(); $params['rft.isbn'] = (string)$this->getCleanISBN();
$params['rft.volume'] = $this->getContainerVolume(); $params['rft.volume'] = $this->getContainerVolume();
$params['rft.issue'] = $this->getContainerIssue(); $params['rft.issue'] = $this->getContainerIssue();
$params['rft.spage'] = $this->getContainerStartPage(); $params['rft.spage'] = $this->getContainerStartPage();
...@@ -743,7 +743,7 @@ class SolrDefault extends AbstractBase ...@@ -743,7 +743,7 @@ class SolrDefault extends AbstractBase
$params['rft.au'] = $this->getPrimaryAuthor(); $params['rft.au'] = $this->getPrimaryAuthor();
break; break;
*/ */
$params['rft.issn'] = $this->getCleanISSN(); $params['rft.issn'] = (string)$this->getCleanISSN();
// Including a date in a title-level Journal OpenURL may be too // Including a date in a title-level Journal OpenURL may be too
// limiting -- in some link resolvers, it may cause the exclusion // limiting -- in some link resolvers, it may cause the exclusion
...@@ -774,11 +774,7 @@ class SolrDefault extends AbstractBase ...@@ -774,11 +774,7 @@ class SolrDefault extends AbstractBase
} }
// Assemble the URL: // Assemble the URL:
$parts = array(); return http_build_query($params);
foreach ($params as $key => $value) {
$parts[] = $key . '=' . urlencode($value);
}
return implode('&', $parts);
} }
/** /**
......
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