Comment count patch from Kitty. http://poker.mookitty.co.uk/

git-svn-id: https://develop.svn.wordpress.org/trunk@1252 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-05-09 22:36:47 +00:00
parent 16fa949f55
commit 8e9dc5687d
1 changed files with 4 additions and 4 deletions

View File

@ -1334,6 +1334,10 @@ function get_posts($args) {
function check_comment($author, $email, $url, $comment, $user_ip) {
if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual
if ( (count(explode('http:', $comment)) - 1) >= get_settings('comment_max_links') )
return false; // Check # of external links
if ('' == trim( get_settings('moderation_keys') ) ) return true; // If moderation keys are empty
$words = explode("\n", get_settings('moderation_keys') );
foreach ($words as $word) {
@ -1346,10 +1350,6 @@ function check_comment($author, $email, $url, $comment, $user_ip) {
if ( preg_match($pattern, $user_ip) ) return false;
}
preg_match_all('|([\n ])([a-z]+?)://([^, <>{}\n\r]+)|i', $comment, $all_links);
$number = count($all_links[0]);
if ($number >= get_settings('comment_max_links')) return false;
return true;
}