Skip to content
Snippets Groups Projects
Commit 98fd7aae authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

Add email filtering to spam filtering

parent 6432d362
Branches master
No related tags found
No related merge requests found
......@@ -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/'
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment