Commit 5e7d8117 authored by ssp's avatar ssp
Browse files

remove catalogue URL postprocessing from display layer

it is now a part of pazpar2-access
parent df2681f8
......@@ -811,36 +811,6 @@ private function electronicURLs ($location, $result) {
/**
* Checks whether the field with the passed name exists, extracts the
* first instance of it and manipulates it if configured to do so.
* @param string $fieldName
* @param array $locationAll
* @return string
*/
private function processedCatalogueURLFromField ($fieldName, $locationAll) {
$URL = NULL;
$catalogueURL = $locationAll['ch']['md-' . $fieldName][0]['values'][0];
if ($catalogueURL) {
$URL = $catalogueURL;
/** Replace links to the Göttingen Opac by GVK-links if:
* 1) the user does not have a Göttingen IP and
* 2) we are not set up to always server SUB Opace links
*/
if (strpos('134.76.', $_SERVER["REMOTE_ADDR"]) !== 0
&& $this->conf['preferSUBOpac'] == 0) {
$opacBaseRegexp = '/https?\:\/\/opac\.sub\.uni\-goettingen.de\/DB\=1/';
$GVKBaseURL = 'http://gso.gbv.de/DB=2.1';
$catalogueURL = preg_replace($opacBaseRegexp, $GVKBaseURL, $catalogueURL);
}
}
return $URL;
}
/**
* Returns DOM elements linking to the catalogue page of the current
* record’s parent record, plus spacing.
......@@ -849,7 +819,7 @@ private function processedCatalogueURLFromField ($fieldName, $locationAll) {
*/
private function parentLink ($locationAll) {
$result = NULL;
$URL = $this->processedCatalogueURLFromField('parent-catalogue-url', $locationAll);
$URL = $locationAll['ch']['md-parent-catalogue-url'][0]['values'][0];
if ($URL) {
$linkElement = $this->doc->createElement('a');
......@@ -877,7 +847,7 @@ private function parentLink ($locationAll) {
*/
private function catalogueLink ($locationAll) {
$linkElement = NULL;
$URL = $this->processedCatalogueURLFromField('catalogue-url', $locationAll);
$URL = $locationAll['ch']['md-catalogue-url'][0]['values'][0];
$targetName = $locationAll['attrs']['name'];
if ($URL && $targetName) {
......
......@@ -194,7 +194,7 @@ Many thanks go to [Indexdata](http://www.indexdata.com/) for their powerful pazp
## Version History ##
* 1.7.0 (2012-03-??): Display the location covered by maps; Display the scale of maps; Remove ZDB-JOP sid configuration from script, it has to be provided by the proxy now; Add ability to display a link to the parent record
* 1.7.0 (2012-03-??): Display the location covered by maps; Display the scale of maps; Remove ZDB-JOP sid configuration from script, it has to be provided by the proxy now; Add ability to display a link to the parent record; remove hardcoded recognition and rewriting of Göttingen Opac URLs, the same effect is achieved more generically by using at least revision v2 of pazpar2-access
* 1.6.0 (2012-02-24): Restructure Resources/Public to provide the JavaScript interface as a standalone repository: [pazpar2-js-client](https://github.com/ssp/pazpar2-js-client); change date format for Neuerwerbungen to YYYYMM; improved reliability of triggering the pazpar2 search
* 1.5.0 (2012-01-18): Add Geo-specific placeholder search term to main search field configuration; add second set of paging controls beneath the results; work around localisation breakage of TYPO3 4.6
* 1.4.0 (2012-01-16): Add keyword search and ability to display keywords in result details; add support for additional media types (letter, manuscript, image); small display tweaks; stop using deprecated form field View Helper
......
Subproject commit 4c3c25826d90c8db60fa4bf92a3d4e5bf3015e74
Subproject commit 62253d74657e3eb3316edf89e9161b55d5db4ac6
Supports Markdown
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