diff --git a/module/VuFind/src/VuFind/Controller/SummonController.php b/module/VuFind/src/VuFind/Controller/SummonController.php index 710bbbfadd979441ed56143e0f6b9ffeaa1a35b9..cacc66ec3e824a8c0728a41a56cc066ecace97f4 100644 --- a/module/VuFind/src/VuFind/Controller/SummonController.php +++ b/module/VuFind/src/VuFind/Controller/SummonController.php @@ -101,7 +101,7 @@ class SummonController extends AbstractSearch public function homeAction() { return $this->createViewModel( - array('results' => $this->getAdvancedFacets()) + array('results' => $this->getHomePageFacets()) ); } @@ -117,8 +117,7 @@ class SummonController extends AbstractSearch /** * Return a Search Results object containing advanced facet information. This - * data may come from the cache, and it is currently shared between the Home - * page and the Advanced search screen. + * data may come from the cache. * * @return \VuFind\Search\Summon\Results */ @@ -126,7 +125,7 @@ class SummonController extends AbstractSearch { // Check if we have facet results cached, and build them if we don't. $cache = $this->getServiceLocator()->get('CacheManager')->getCache('object'); - if (!($results = $cache->getItem('summonSearchHomeFacets'))) { + if (!($results = $cache->getItem('summonSearchAdvancedFacets'))) { $sm = $this->getSearchManager(); $params = $sm->setSearchClassId('Summon')->getParams(); $params->addFacet('Language,or,1,20'); @@ -142,7 +141,7 @@ class SummonController extends AbstractSearch // Temporarily remove the service manager so we can cache the // results (otherwise we'll get errors about serializing closures): $results->unsetServiceLocator(); - $cache->setItem('summonSearchHomeFacets', $results); + $cache->setItem('summonSearchAdvancedFacets', $results); } // Restore the real service locator to the object: @@ -150,6 +149,18 @@ class SummonController extends AbstractSearch return $results; } + /** + * Return a Search Results object containing homepage facet information. This + * data may come from the cache. + * + * @return \VuFind\Search\Summon\Results + */ + protected function getHomePageFacets() + { + // For now, we'll use the same fields as the advanced search screen. + return $this->getAdvancedFacets(); + } + /** * Process the facets to be used as limits on the Advanced Search screen. *