From 41591cbdce686138efe0831de215170c8802787a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 21 Sep 2008 22:56:59 +0000 Subject: [PATCH] rc_log_type can be null, and NULL != 'x' is treated as false, which borked the count. (bug 15682) --- includes/SiteStats.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/SiteStats.php b/includes/SiteStats.php index 3729f455a7..2bca25fa20 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -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) ), -- 2.20.1