diff options
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r-- | include/rssfuncs.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 193194b50..130f9142c 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -435,7 +435,7 @@ $entry_timestamp = strtotime($item->get_date()); - if ($entry_timestamp == -1 || !$entry_timestamp) { + if ($entry_timestamp == -1 || !$entry_timestamp || $entry_timestamp > time()) { $entry_timestamp = time(); $no_orig_date = 'true'; } else { @@ -996,7 +996,7 @@ } foreach ($labels as $label) { - $caption = $label["caption"]; + $caption = preg_quote($label["caption"]); if ($caption && preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($entry_content) . " $entry_title")) { if (!labels_contains_caption($article_labels, $caption)) { @@ -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); |