diff --git a/code/web/sys/SearchObject/GroupedWorkSearcher2.php b/code/web/sys/SearchObject/GroupedWorkSearcher2.php index 7bf8d84f36..d53d9ec783 100644 --- a/code/web/sys/SearchObject/GroupedWorkSearcher2.php +++ b/code/web/sys/SearchObject/GroupedWorkSearcher2.php @@ -789,7 +789,7 @@ public function getFacetList($filter = null) { // Get a list of branches so we can access their 'showInSearchFacet' value // Also rename the keys to the branches' names so they can easily be accessed later $branchList = null; - if ($field == 'available_at') { + if ($field == 'available_at' || $field == 'owning_location') { $mainBranch = new Location(); $branchList = $mainBranch->getLocationListAsObjects(false); // may need to be optimised / unsure how heavy this is @@ -806,7 +806,7 @@ public function getFacetList($filter = null) { // if populating the array of facet options for 'available at' // then filter out any branch (location) for which showInSearchFacet has been set to "0" // thus preventing these branches from being displayed as search by options - if ($field == 'available_at') { + if ($field == 'available_at' || $field == 'owning_location') { $branchName = substr($facetValue, 5); if (empty($branchList[$branchName]->showInSearchFacet)) { continue;