git-svn-id: http://svn.automattic.com/wordpress/trunk@2562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-04-20 22:01:24 +00:00
parent b8899402d0
commit 5eb42126dd
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;