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

Make simple container links more generic.

- Fixes compatibility with Search2 backend.
parent 09434e17
Branches
Tags
No related merge requests found
...@@ -271,7 +271,8 @@ class SolrDefault extends DefaultRecord ...@@ -271,7 +271,8 @@ class SolrDefault extends DefaultRecord
); );
// Disable highlighting for efficiency; not needed here: // Disable highlighting for efficiency; not needed here:
$params = new \VuFindSearch\ParamBag(['hl' => ['false']]); $params = new \VuFindSearch\ParamBag(['hl' => ['false']]);
return $this->searchService->search('Solr', $query, 0, 0, $params) return $this->searchService
->search($this->sourceIdentifier, $query, 0, 0, $params)
->getTotal(); ->getTotal();
} }
......
...@@ -229,7 +229,10 @@ class RecordLink extends \Zend\View\Helper\AbstractHelper ...@@ -229,7 +229,10 @@ class RecordLink extends \Zend\View\Helper\AbstractHelper
public function getChildRecordSearchUrl($driver) public function getChildRecordSearchUrl($driver)
{ {
$urlHelper = $this->getView()->plugin('url'); $urlHelper = $this->getView()->plugin('url');
$url = $urlHelper('search-results') $optionsHelper = $this->getView()->plugin('searchOptions');
$route = $optionsHelper->__invoke($driver->getSourceIdentifier())
->getSearchAction();
$url = $urlHelper($route)
. '?lookfor=' . '?lookfor='
. urlencode(addcslashes($driver->getUniqueID(), '"')) . urlencode(addcslashes($driver->getUniqueID(), '"'))
. '&type=ParentID'; . '&type=ParentID';
......
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