Unecessary query, fixes #1456
git-svn-id: http://svn.automattic.com/wordpress/trunk@2688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
df98e352ac
commit
f8a51d856b
|
@ -245,7 +245,6 @@ function wp_notify_moderator($comment_id) {
|
||||||
|
|
||||||
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
|
$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");
|
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
||||||
$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' 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'");
|
$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
|
||||||
|
|
Loading…
Reference in New Issue