Skip to content

Commit

Permalink
Handle OR operator for SortFacetList (vufind-org#2981)
Browse files Browse the repository at this point in the history
  • Loading branch information
RLangeUni authored and demiankatz committed Jul 10, 2023
1 parent 4168f45 commit 46fb90f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/VuFind/src/VuFind/View/Helper/Root/SortFacetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public function __invoke($results, $field, $list, $searchRoute)
$urlHelper = $this->getView()->plugin('url');
foreach ($list as $value) {
$url = $urlHelper($searchRoute) . $results->getUrlQuery()
->addFacet($field, $value['value'])->getParams();
->addFacet($field, $value['value'], ($value['operator'] ?? 'AND'))
->getParams();
$facets[$url] = $value['displayText'];
}
$this->getSorter()->natsort($facets);
Expand Down

0 comments on commit 46fb90f

Please sign in to comment.