From 64fc90eda63654d188c9e19feb80978e43556d87 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 16 Feb 2009 00:28:53 +0000 Subject: [PATCH] FEATURE: added basic mark as spam filter --- INSTALL | 2 +- code/SpamProtecterManager.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index b78f5d2..b8fe335 100644 --- a/INSTALL +++ b/INSTALL @@ -24,7 +24,7 @@ Before putting the following code in '_config.php', make sure you have a subclas <<<< CODE STARTS >>>> -SpamProtecterManager::set_spam_protecter('MollomField'); +SpamProtecterManager::set_spam_protecter('MollomSpamProtector'); <<<< CODE ENDS >>>> diff --git a/code/SpamProtecterManager.php b/code/SpamProtecterManager.php index b20759a..b886e26 100644 --- a/code/SpamProtecterManager.php +++ b/code/SpamProtecterManager.php @@ -34,5 +34,15 @@ class SpamProtecterManager { $protecter->updateForm($form, $before, $callbackObject, $fieldsToSpamServiceMapping); return $protecter; } + + /** + * Mark a DataObject as spam + * + * @param DataObject + */ + static function mark_spam($object) { + $protecter = new self::$spam_protecter(); + return $protecter->markAsSpam($object); + } } ?> \ No newline at end of file