From 8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 26 Jan 2007 12:57:25 +0000 Subject: WP Merge to rev 4813 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@868 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/index.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'wp-admin/index.php') diff --git a/wp-admin/index.php b/wp-admin/index.php index 92702e3..53c4ddf 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -98,21 +98,16 @@ foreach ($scheduled as $post) {

get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); -if (0 < $numposts) $numposts = number_format($numposts); +$numposts = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); +$numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); +$numcats = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); -if (0 < $numcomms) $numcomms = number_format($numcomms); - -$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -if (0 < $numcats) $numcats = number_format($numcats); +$post_str = sprintf(__ngettext('%1$s post', '%1$s posts', $numposts), number_format($numposts), 'edit.php'); +$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), number_format($numcomms), 'edit-comments.php'); +$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), number_format($numcats), 'categories.php'); ?> -

post', '%1$s posts', $numposts), $numposts, 'edit.php'); -$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), $numcomms, 'edit-comments.php'); -$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), $numcats, 'categories.php'); -printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?>

+

-- cgit