Silence gethostbyaddr(). Props MarkJaquith. fixes #2759

git-svn-id: http://svn.automattic.com/wordpress/trunk@4288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-10-04 03:05:54 +00:00
parent 829a3570c4
commit 0947d74004
1 changed files with 2 additions and 2 deletions

View File

@ -337,7 +337,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
if ('' == $user->user_email) return false; // If there's no email to send the comment to
$comment_author_domain = gethostbyaddr($comment->comment_author_IP);
$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
$blogname = get_option('blogname');
@ -415,7 +415,7 @@ function wp_notify_moderator($comment_id) {
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
$comment_author_domain = gethostbyaddr($comment->comment_author_IP);
$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
$notify_message = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";