WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#11772 closed defect (bug) (fixed)

ms-admin.php stats should use the available cached data + count functions should exclude partially registered users/blogs from stats

Reported by: Denis-de-Bernardy Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords:
Focuses: Cc:

Description

There are two calls at the top of the file:

$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");
$c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}");

but in ms-functions.php, there are several stat functions that could be used and/or improved so that we access (at least partially) cached data.

Change History (2)

#1 @Denis-de-Bernardy
11 years ago

  • Summary changed from ms-admin.php should use the available cached data to ms-admin.php stats should use the available cached data + count functions should exclude partially registered users/blogs from stats

In particular get_user_count() and get_blog_count(). Given the nature of the two strings immediately isn't safe to assume that we want the number of *active* users and blogs rather than the raw number of users -- including spammers and partially registered users.

#2 @wpmuguru
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13114]) use cached data in ms-admin.php stats, props ddebernardy, fixes #11772

Note: See TracTickets for help on using tickets.