mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 05:38:07 +01:00
Whitelist from own domain. http://mosquito.wordpress.org/view.php?id=999
git-svn-id: https://develop.svn.wordpress.org/trunk@2562 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
acf9076fc0
commit
aff97a560f
@ -652,7 +652,9 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
|
||||
if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
|
||||
$uri = parse_url($url);
|
||||
$domain = $uri['host'];
|
||||
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") )
|
||||
$uri = parse_url( get_option('home') );
|
||||
$home_domain = $uri['host'];
|
||||
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") || $domain == $home_domain )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user