From a3a896a127b90548d404d347f3665a7e6ac90f40 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 25 Mar 2013 19:46:43 +0400 Subject: let us rejoice on being able to create double negative filters (refs #631) --- include/functions.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'include/functions.php') diff --git a/include/functions.php b/include/functions.php index b52531f66..9a855a9bc 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1,6 +1,6 @@ 0) { - return "(" . join($filter["match_any_rule"] ? "OR" : "AND", $query) . ")"; + $fullquery = "(" . join($filter["match_any_rule"] ? "OR" : "AND", $query) . ")"; } else { - return "(false)"; + $fullquery = "(false)"; } + + if ($filter['inverse']) $fullquery = "(NOT $fullquery)"; + + return $fullquery; } if (!function_exists('gzdecode')) { -- cgit v1.2.3