diff --git a/data/spamRules.php b/data/spamRules.php index d48e9f45eddb47029c4822f5e73f931f2b4edd66..82d928b99a75a821916409c1dac1b43ef54b65fb 100644 --- a/data/spamRules.php +++ b/data/spamRules.php @@ -198,6 +198,14 @@ $rules['ua'][] = function($spam) { } }; +$rules['email'][] = function($spam) { + if (strpos($spam, 'abqenvironmentalstory.org') !== false + || strpos($spam, 'aptel.org') !== false + || strpos($spam, 'fluidforce.net') !== false) { + return true; + } +}; + $rules['url'][] = function($spam) { if ($spam == 'http://www1.unl.edu/comments/' || $spam == 'http://www1.unl.edu/comments/thanks/' diff --git a/src/UNL/WDN/Comment.php b/src/UNL/WDN/Comment.php index 94e30d8d44cb192e51a3240d5206763d2b7cdd28..bcdfbbaa24674de4e93b97f9b0126434fe07ea8a 100644 --- a/src/UNL/WDN/Comment.php +++ b/src/UNL/WDN/Comment.php @@ -80,6 +80,10 @@ class UNL_WDN_Comment extends UNL_WDN_Comment_Record return false; } + if ($detector->isSpam($this->email, 'email')) { + return false; + } + if ($detector->isSpam($this->page_address, 'url')) { return false; }