From ce8693de30e8da06a8a4982e321f0a33fbeee979 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 26 Feb 2007 14:03:58 +0000 Subject: WP Merge to rev 4950 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@900 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/comment-template.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wp-includes/comment-template.php') diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index d57aff5..0782f33 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -290,7 +290,9 @@ function comments_template( $file = '/comments.php' ) { $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND ( comment_approved = '1' OR ( comment_author = '$author_db' AND comment_author_email = '$email_db' AND comment_approved = '0' ) ) ORDER BY comment_date"); } - $comments = apply_filters( 'comments_array', $comments, $post->ID ); + // keep $comments for legacy's sake (remember $table*? ;) ) + $comments = $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID ); + $wp_query->comment_count = count($wp_query->comments); define('COMMENTS_TEMPLATE', true); $include = apply_filters('comments_template', TEMPLATEPATH . $file ); -- cgit