From 517ddf53883214f225ad76997fd033faae276a42 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 31 Dec 2008 06:19:35 +0000 Subject: First look at the spam filter module. At this point, it does not connect to any spam services. But you can go into the admin screen and choose the driver and set the api key. --- modules/comment/helpers/comment.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/comment/helpers') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index e92c59a0..9617b706 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -51,8 +51,8 @@ class comment_Core { $comment->created = time(); // @todo Figure out how to mock up the test of the spam_filter - if (module::is_installed("spam_filter") && !TEST_MODE) { - spam_filter::verify_comment($comment); + if (module::is_installed("spam_filter") && TEST_MODE == 0) { + Spam_Filter::instance()->check_comment($comment); } else { $comment->published = true; } @@ -81,8 +81,8 @@ class comment_Core { $comment->user_agent = Kohana::$user_agent; // @todo Figure out how to mock up the test of the spam_filter - if (module::is_installed("spam_filter") && !TEST_MODE) { - spam_filter::verify_comment($comment); + if (module::is_installed("spam_filter") && TEST_MODE == 0) { + Spam_Filter::instance()->check_comment($comment); } $comment->save(); -- cgit v1.2.3