git-svn-id: https://develop.svn.wordpress.org/trunk@2562 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-04-20 22:01:24 +00:00
parent acf9076fc0
commit aff97a560f
1 changed files with 3 additions and 1 deletions

View File

@ -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;