use cached data in ms-admin.php stats, props ddebernardy, fixes #11772

git-svn-id: http://svn.automattic.com/wordpress/trunk@13114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-02-13 17:10:50 +00:00
parent d8490aeea2
commit 1d5b49f6f8

View File

@ -18,8 +18,8 @@ if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') );
global $wpdb;
$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");
$c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}");
$c_users = get_user_count();
$c_blogs = get_blog_count();
$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
$blog_text = sprintf( _n( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) );