Fix for emergent whitelisting, hat tip MtDewVirus - http://mosquito.wordpress.org/view.php?id=995

git-svn-id: http://svn.automattic.com/wordpress/trunk@2397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-03-01 10:10:59 +00:00
parent 2233bfb700
commit 26808caf61
1 changed files with 2 additions and 0 deletions

View File

@ -757,6 +757,8 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
$domain = $uri['host'];
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") )
return true;
else
return false;
} elseif( $author != '' && $email != '' ) {
$ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' ");
if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )