Last modified: 2009-08-07 12:10:05 UTC
site_stats.ss_active_users count is refreshed on each visit to special:statistics page (modulo wgMiserMode switch) - to make it more up to date than the rest of stats (which are refreshed via maintenance/initStats script), presumably. But it is not refreshed by initStats script itself what is strange and what bites sites with premanent/frequent wgMiserMode states. Patch: Index: maintenance/initStats.inc =================================================================== --- maintenance/initStats.inc (revision 9043) +++ maintenance/initStats.inc (working copy) @@ -20,8 +20,13 @@ wfOut( "{$pages}\nCounting number of users..." ); $users = $dbr->selectField( 'user', 'COUNT(*)', '', __METHOD__ ); - wfOut( "{$users}\nCounting number of admins..." ); + wfOut( "{$users}\nCounting number of active users..." ); + $active_users = $dbr->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )', + array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers' OR rc_log_type IS NULL" ), + __METHOD__ ); + wfOut( "{$active_users}\nCounting number of admins..." ); + $admin = $dbr->selectField( 'user_groups', 'COUNT(*)', array( 'ug_group' => 'sysop' ), __METHOD__ ); wfOut( "{$admin}\nCounting number of images..." ); @@ -41,6 +46,7 @@ 'ss_good_articles' => $good, 'ss_total_pages' => $pages, 'ss_users' => $users, + 'ss_active_users' => $active_users, 'ss_admins' => $admin, 'ss_images' => $image ); $conds = array( 'ss_row_id' => 1 );
Should probably call SiteStats::cacheUpdate here rather than duplicating the code.
Fix committed to branch in r52513
Fixed in trunk in r54225.
*** Bug 20105 has been marked as a duplicate of this bug. ***