mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
FEATURE: added basic mark as spam filter
This commit is contained in:
parent
a731563cbc
commit
64fc90eda6
2
INSTALL
2
INSTALL
@ -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 >>>>
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user