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

Allow WorldCat lat/lon configuration.

parent 90a991f7
Branches
Tags
No related merge requests found
......@@ -73,6 +73,10 @@ view=full
; This section contains additional settings to pass to the WorldCat connector
; code.
[Connector]
; Set this to the latitude,longitude position of your library to ensure that
; custom holding locations are retrieved from your region first.
;latLon = "40.0373881,-75.3442107"
; When looking up holdings at other libraries, should we retrieve holdings for
; any record matching the FRBR group (true) or only for exact matches (false)?
;useFrbrGroupingForHoldings = false
\ No newline at end of file
......@@ -89,6 +89,10 @@ class Connector extends \VuFindSearch\Backend\SRU\Connector
}
$uri = "http://www.worldcat.org/webservices/catalog/content/libraries/{$id}"
. "?wskey={$this->wskey}&servicelevel=full&frbrGrouping=$grouping";
if (isset($this->options['latLon'])) {
list($lat, $lon) = explode(',', $this->options['latLon']);
$uri .= '&lat=' . urlencode($lat) . '&lon=' . urlencode($lon);
}
$this->client->setUri($uri);
$this->debug('Connect: ' . $uri);
$result = $this->client->setMethod('POST')->send();
......
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