diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 09b56b0b20761ad0f00a93da0b42611050f84014..34fb731493beb3ff73c521731b5f838b73dafd26 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -27,7 +27,8 @@ */ namespace VuFind\Controller; use VuFind\Search\Memory, - VuFind\Search\Options as SearchOptions, VuFind\Search\ResultScroller; + VuFind\Search\Options as SearchOptions, VuFind\Search\ResultScroller, + Zend\Stdlib\Parameters; /** * VuFind Search Controller @@ -111,7 +112,15 @@ class AbstractSearch extends AbstractBase $paramsClass = $this->getParamsClass(); $params = new $paramsClass(); $params->recommendationsEnabled(true); - $params->initFromRequest($this->getRequest()->getQuery()); + + // Send both GET and POST variables to search class: + $params->initFromRequest( + new Parameters( + $this->getRequest()->getQuery()->toArray() + + $this->getRequest()->getPost()->toArray() + ) + ); + // Attempt to perform the search; if there is a problem, inspect any Solr // exceptions to see if we should communicate to the user about them. try { diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index 3a6a350f00a801f1268409f4b5c88d6682ffa618..883c8898a451feba973c1fba67b18ae5ddc8e45f 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -28,7 +28,8 @@ namespace VuFind\Controller; use VuFind\Config\Reader as ConfigReader, VuFind\Exception\Auth as AuthException, - VuFind\Exception\ListPermission as ListPermissionException; + VuFind\Exception\ListPermission as ListPermissionException, + Zend\Stdlib\Parameters; /** * Controller for the user account area. @@ -516,7 +517,17 @@ class MyResearchController extends AbstractBase try { $params = new \VuFind\Search\Favorites\Params(); $params->setAuthManager($this->getAuthManager()); - $params->initFromRequest($this->getRequest()->getQuery()); + + // We want to merge together GET, POST and route parameters to + // initialize our search object: + $params->initFromRequest( + new Parameters( + $this->getRequest()->getQuery()->toArray() + + $this->getRequest()->getPost()->toArray() + + array('id' => $this->params()->fromRoute('id')) + ) + ); + $results = new \VuFind\Search\Favorites\Results($params); $results->performAndProcessSearch(); return $this->createViewModel(array('results' => $results));