r41137 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41136‎ | r41137 | r41138 >
Date:22:56, 21 September 2008
Author:aaron
Status:old
Tags:
Comment:
rc_log_type can be null, and NULL != 'x' is treated as false, which borked the count. (bug 15682)
Modified paths:
  • /trunk/phase3/includes/SiteStats.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SiteStats.php
@@ -258,7 +258,7 @@
259259 # Get non-bot users than did some recent action other than making accounts.
260260 # If account creation is included, the number gets inflated ~20+ fold on enwiki.
261261 $activeUsers = $dbr->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )',
262 - array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers'" ),
 262+ array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers' OR rc_log_type IS NULL" ),
263263 __METHOD__ );
264264 $dbw->update( 'site_stats',
265265 array( 'ss_active_users' => intval($activeUsers) ),