From 767c3538b9f4aa2684429a7efea8f7728034c754 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 5 Oct 2006 17:45:26 +0000 Subject: WP Merge to rev 4347 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@789 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/comment.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'wp-includes/comment.php') diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 6ffcfcc..e77f483 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -5,7 +5,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ if (1 == get_option('comment_moderation')) return false; // If moderation is set to manual - if ( (count(explode('http:', $comment)) - 1) >= get_option('comment_max_links') ) + if ( preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $comment, $out) >= get_option('comment_max_links') ) return false; // Check # of external links $mod_keys = trim( get_option('moderation_keys') ); @@ -173,8 +173,6 @@ function wp_allow_comment($commentdata) { global $wpdb; extract($commentdata); - $comment_user_domain = apply_filters('pre_comment_user_domain', gethostbyaddr($comment_author_IP) ); - // Simple duplicate check $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' "; if ( $comment_author_email ) -- cgit