From b32164e99212ba1a49211cc1e302da64d4c97936 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 15 Feb 2022 18:51:54 -0500 Subject: [PATCH] Add handling of NOT IN and =\[\] and \!\[\] --- web/includes/FilterTerm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/includes/FilterTerm.php b/web/includes/FilterTerm.php index 8a58e2f98..903cce811 100644 --- a/web/includes/FilterTerm.php +++ b/web/includes/FilterTerm.php @@ -174,6 +174,7 @@ class FilterTerm { case 'IN' : return ' IN '; case '![]' : + case 'NOT IN' : return ' NOT IN '; case 'EXISTS' : return ' EXISTS '; @@ -303,7 +304,7 @@ class FilterTerm { } $sql .= $this->sql_operator(); $values = $this->sql_values(); - if ( (count($values) > 1) or ($this->op == 'IN') or ($this->op == 'NOT IN') ) { + if ((count($values) > 1) or ($this->op == 'IN') or ($this->op == 'NOT IN') or ($this->op == '=[]') or ($this->op == '![]')) { $sql .= '('.join(',', $values).')'; } else { $sql .= $values[0];