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

More flexibility for request links (work in progress).

parent 513d2d61
No related merge requests found
......@@ -13,7 +13,7 @@ ILLRequests = true
; Configuration for retrieving sample records
[Records]
; Search backend to pull records from
source = Solr
source = VuFind
; Query to use for record retrieval
query = "*:*"
\ No newline at end of file
......@@ -213,7 +213,7 @@ class Demo extends AbstractBase
protected function getRecordSource()
{
return isset($this->config['Records']['source'])
? $this->config['Records']['source'] : 'Solr';
? $this->config['Records']['source'] : 'VuFind';
}
/**
......@@ -230,6 +230,7 @@ class Demo extends AbstractBase
$status = $this->getFakeStatus();
return array(
'id' => $id,
'source' => $this->getRecordSource(),
'item_id' => $number,
'number' => $number,
'barcode' => sprintf("%08d", rand()%50000),
......
......@@ -489,6 +489,7 @@ class Holds
// Build Params
return array(
'action' => $action, 'record' => $details['id'],
'source' => isset($details['source']) ? $details['source'] : 'VuFind',
'query' => $queryString, 'anchor' => "#tabnav"
);
}
......
......@@ -148,8 +148,9 @@ class RecordLink extends \Zend\View\Helper\AbstractHelper
{
if (is_array($url)) {
// Assemble URL string from array parts:
$source = isset($url['source']) ? $url['source'] : 'VuFind';
$finalUrl
= $this->getActionUrl('VuFind|' . $url['record'], $url['action']);
= $this->getActionUrl("{$source}|" . $url['record'], $url['action']);
if (isset($url['query'])) {
$finalUrl .= '?' . $url['query'];
}
......
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