diff --git a/module/VuFind/src/VuFind/Recommend/ExpandFacets.php b/module/VuFind/src/VuFind/Recommend/ExpandFacets.php index 16a8f7151fcf685006758dd20492715dcf750b4f..b529e18d9a960124641293433a245c6f56671c33 100644 --- a/module/VuFind/src/VuFind/Recommend/ExpandFacets.php +++ b/module/VuFind/src/VuFind/Recommend/ExpandFacets.php @@ -37,7 +37,7 @@ use VuFind\Config\Reader as ConfigReader; * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class ExpandFacets implements RecommendInterface +class ExpandFacets extends AbstractSearchManagerAwareModule { protected $facets; protected $settings; @@ -122,4 +122,15 @@ class ExpandFacets implements RecommendInterface { return $this->searchObject->getFacetList($this->facets); } + + /** + * Get an empty search object (the template uses this as the basis for URL + * generation). + * + * @return \VuFind\Search\Base\Results + */ + public function getEmptyResults() + { + return $this->getSearchManager()->setSearchClassId('Solr')->getResults(); + } } diff --git a/themes/blueprint/templates/Recommend/ExpandFacets.phtml b/themes/blueprint/templates/Recommend/ExpandFacets.phtml index f2271ade1289ec0cdc30a2fa5bd4cec5a65d9651..49c0b99fb51c5c52920f48090912525de1df4075 100644 --- a/themes/blueprint/templates/Recommend/ExpandFacets.phtml +++ b/themes/blueprint/templates/Recommend/ExpandFacets.phtml @@ -1,7 +1,7 @@ <? $expandFacetSet = $this->recommend->getExpandedSet(); // Get empty search object to use as basis for parameter generation below: - $blankResults = new \VuFind\Search\Solr\Results(new \VuFind\Search\Solr\Params()); + $blankResults = $this->recommend->getEmptyResults(); ?> <? if ($expandFacetSet): ?> <div class="sidegroup">