summaryrefslogtreecommitdiff
path: root/include/rssfuncs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-25 19:46:43 +0400
committerAndrew Dolgov <[email protected]>2013-03-25 19:46:43 +0400
commita3a896a127b90548d404d347f3665a7e6ac90f40 (patch)
treecc2650a5c396adf69e45b69f5862e14733765763 /include/rssfuncs.php
parentaff02f89c112dc147213a877d582c873ae981514 (diff)
let us rejoice on being able to create double negative filters (refs #631)
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r--include/rssfuncs.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 92bfaa023..11aa0e4ba 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -1165,11 +1165,13 @@
foreach ($filters as $filter) {
$match_any_rule = $filter["match_any_rule"];
+ $inverse = $filter["inverse"];
$filter_match = false;
foreach ($filter["rules"] as $rule) {
$match = false;
$reg_exp = $rule["reg_exp"];
+ $rule_inverse = $rule["inverse"];
if (!$reg_exp)
continue;
@@ -1202,6 +1204,8 @@
break;
}
+ if ($rule_inverse) $match = !$match;
+
if ($match_any_rule) {
if ($match) {
$filter_match = true;
@@ -1215,6 +1219,8 @@
}
}
+ if ($inverse) $filter_match = !$filter_match;
+
if ($filter_match) {
foreach ($filter["actions"] AS $action) {
array_push($matches, $action);