summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--search_api_ranges.module7
1 files changed, 2 insertions, 5 deletions
diff --git a/search_api_ranges.module b/search_api_ranges.module
index 60a636a..28a2aca 100644
--- a/search_api_ranges.module
+++ b/search_api_ranges.module
@@ -144,11 +144,8 @@ function search_api_ranges_minmax($variables, $order = 'ASC') {
// otherwise our min/max would always equal user input.
$filters = &$query->getFilter()->getFilters();
foreach ($filters as $key => $filter) {
-
- // Check for array: old style filters are objects which we can skip.
- if (is_array($filter)) {
- if ($filter[0] == $variables['range_field'] || ($filter[0] != $variables['range_field'] && $filter[2] == '<>')) {
- $current_filter = $filters[$key];
+ if( isset($filter->tags) && is_array($filter->tags) ){
+ if( in_array('facet:'.$variables['range_field'], $filter->tags) ){
unset($filters[$key]);
}
}