From 3cd3999079dd3f69f52c0277e4c4f9dc68586159 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Wed, 7 Apr 2004 00:48:19 +0000 Subject: [PATCH] check_comment should return false if there are no comment moderation keys. git-svn-id: http://svn.automattic.com/wordpress/trunk@1056 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 75d4bbd89..265e9fa03 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1568,7 +1568,8 @@ function get_posts($args) { } function check_comment($author, $email, $url, $comment, $user_ip) { - if (1 == get_settings('comment_moderation')) return false; + if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual + if ('' == trim( get_settings('moderation_keys') ) ) return true; // If moderation keys are empty $words = explode("\n", get_settings('moderation_keys') ); foreach ($words as $word) { $word = trim($word); @@ -1584,7 +1585,7 @@ function check_comment($author, $email, $url, $comment, $user_ip) { $number = count($all_links[0]); if ($number >= get_settings('comment_max_links')) return false; -return true; + return true; } ?> \ No newline at end of file