FEATURE: added basic mark as spam filter

This commit is contained in:
Will Rossiter 2009-02-16 00:28:53 +00:00
parent a731563cbc
commit 64fc90eda6
2 changed files with 11 additions and 1 deletions

View File

@ -24,7 +24,7 @@ Before putting the following code in '_config.php', make sure you have a subclas
<<<< CODE STARTS >>>> <<<< CODE STARTS >>>>
SpamProtecterManager::set_spam_protecter('MollomField'); SpamProtecterManager::set_spam_protecter('MollomSpamProtector');
<<<< CODE ENDS >>>> <<<< CODE ENDS >>>>

View File

@ -34,5 +34,15 @@ class SpamProtecterManager {
$protecter->updateForm($form, $before, $callbackObject, $fieldsToSpamServiceMapping); $protecter->updateForm($form, $before, $callbackObject, $fieldsToSpamServiceMapping);
return $protecter; return $protecter;
} }
/**
* Mark a DataObject as spam
*
* @param DataObject
*/
static function mark_spam($object) {
$protecter = new self::$spam_protecter();
return $protecter->markAsSpam($object);
}
} }
?> ?>