diff options
author | Andrew Dolgov <[email protected]> | 2005-11-21 08:38:28 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-21 08:38:28 +0100 |
commit | 3a933f22b1c0107e240327c9f9ceae1881920d6a (patch) | |
tree | 4f638509182cf2866a536259dd36770c31b6d257 /functions.php | |
parent | fe99ab12bb0fbbab3dc513e421d9c29536fb15d6 (diff) |
filters are now actually applied separately for each user
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/functions.php b/functions.php index 0d4ee78de..f1c56e984 100644 --- a/functions.php +++ b/functions.php @@ -293,12 +293,6 @@ // base post entry does not exist, create it - error_reporting(0); - if (is_filtered($entry_title, $entry_content, $filters)) { - continue; - } - error_reporting (E_ERROR | E_WARNING | E_PARSE); - $result = db_query($link, "INSERT INTO ttrss_entries (title, @@ -350,6 +344,12 @@ $dupcheck_qpart = ""; } + error_reporting(0); + if (is_filtered($entry_title, $entry_content, $entry_link, $filters)) { + continue; + } + error_reporting (E_ERROR | E_WARNING | E_PARSE); + $result = db_query($link, "SELECT ref_id FROM ttrss_user_entries WHERE ref_id = '$ref_id' AND owner_uid = '$owner_uid' @@ -470,7 +470,7 @@ print "</select>"; } - function is_filtered($title, $content, $filters) { + function is_filtered($title, $content, $link, $filters) { if ($filters["title"]) { foreach ($filters["title"] as $title_filter) { @@ -493,6 +493,13 @@ } } + if ($filters["link"]) { + foreach ($filters["link"] as $link_filter) { + if (preg_match("/$link_filter/i", $link)) + return true; + } + } + return false; } |