From 6c488f64157c96ad8e43a911d9519f2b4865c210 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 28 Nov 2005 05:45:45 +0000 Subject: [PATCH] Show comments in moderation even if there are no new ones. Fixes #1473 git-svn-id: https://develop.svn.wordpress.org/trunk@3216 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/index.php b/wp-admin/index.php index f8abbc2d84..8f9f8ac828 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -32,14 +32,15 @@ foreach ($rss->items as $item ) { get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5") ) : +$comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5"); +$numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'"); + +if ( $comments || $numcomments ) : ?>

»

-get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) : -?> +

»