diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index 27a5056cdb728a2839e29a4d9037de643842e53e..b06c7e07b9bf5dae1a714711ac52577210dfa9a6 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -413,17 +413,17 @@ class SearchController extends AbstractSearch */ public function reservessearchAction() { - $results = $this->getResultsManager()->get('SolrReserves'); - $params = $results->getParams(); - $params->initFromRequest( - new \Zend\Stdlib\Parameters( - $this->getRequest()->getQuery()->toArray() - + $this->getRequest()->getPost()->toArray() - ) + $request = new \Zend\Stdlib\Parameters( + $this->getRequest()->getQuery()->toArray() + + $this->getRequest()->getPost()->toArray() ); - return $this->createViewModel( - ['params' => $params, 'results' => $results] + $view = $this->createViewModel(); + $runner = $this->getServiceLocator()->get('VuFind\SearchRunner'); + $view->results = $runner->run( + $request, 'SolrReserves', $this->getSearchSetupCallback() ); + $view->params = $view->results->getParams(); + return $view; } /**