rc_log_type can be null, and NULL != 'x' is treated as false, which borked the count...
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 21 Sep 2008 22:56:59 +0000 (22:56 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 21 Sep 2008 22:56:59 +0000 (22:56 +0000)
includes/SiteStats.php

index 3729f45..2bca25f 100644 (file)
@@ -258,7 +258,7 @@ class SiteStatsUpdate {
                # Get non-bot users than did some recent action other than making accounts.
                # If account creation is included, the number gets inflated ~20+ fold on enwiki.
                $activeUsers = $dbr->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )',
-                       array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers'" ),
+                       array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers' OR rc_log_type IS NULL" ),
                        __METHOD__ );
                $dbw->update( 'site_stats', 
                        array( 'ss_active_users' => intval($activeUsers) ),