From 69e8270fcf4c512f5801d38919c0181ccdd5e05f Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Nov 2005 23:15:21 +0000 Subject: [PATCH] Use get_*() API instead of SELECTs so that we hit the cache. git-svn-id: http://svn.automattic.com/wordpress/trunk@3013 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index 552004436c..760efb2024 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -243,8 +243,8 @@ if ( ! function_exists('wp_notify_postauthor') ) : function wp_notify_postauthor($comment_id, $comment_type='') { global $wpdb; - $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 = get_comment($comment_id); + $post = get_post($comment->comment_post_ID); $user = get_userdata( $post->post_author ); if ('' == $user->user_email) return false; // If there's no email to send the comment to