diff --git a/module/VuFind/src/VuFind/Search/EDS/Results.php b/module/VuFind/src/VuFind/Search/EDS/Results.php index b064997ba0db747045d437b115b97b549f80129b..9d41785c130c01a51ab6a690d2d852abbc421722 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Results.php +++ b/module/VuFind/src/VuFind/Search/EDS/Results.php @@ -80,6 +80,12 @@ class Results extends \VuFind\Search\Base\Results */ public function getFacetList($filter = null) { + // If there is no filter, we'll use all facets as the filter: + if (null === $filter) { + $filter = $this->getParams()->getFacetConfig(); + } + $filterFields = array_keys($filter); + // Loop through the facets returned by EDS $facetResult = []; if (is_array($this->responseFacets)) { @@ -92,6 +98,11 @@ class Results extends \VuFind\Search\Base\Results // different value for actual display! $field = $current['displayName']; + // If we are filtering out the field, skip it! + if (!in_array($field, $filterFields)) { + continue; + } + // Should we translate values for the current facet? if ($translate = in_array($field, $translatedFacets)) { $transTextDomain = $this->getOptions()