https://bugzilla.wikimedia.org/show_bug.cgi?id=18930
Summary: initStats does not refresh active_users count (with
patch)
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: Maintenance scripts
AssignedTo: [email protected]
ReportedBy: [email protected]
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 );
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l