mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 13:47:02 +01:00
Fix for emergent whitelisting, hat tip MtDewVirus - http://mosquito.wordpress.org/view.php?id=995
git-svn-id: https://develop.svn.wordpress.org/trunk@2397 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a0eba624c5
commit
2155d47334
@ -757,6 +757,8 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
|
|||||||
$domain = $uri['host'];
|
$domain = $uri['host'];
|
||||||
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") )
|
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") )
|
||||||
return true;
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
} elseif( $author != '' && $email != '' ) {
|
} 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' ");
|
$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')) )
|
if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user