From f748167dadaa0d8a584665c4162b21c9d96e078c Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 3 Sep 2008 04:07:14 +0000 Subject: [PATCH] Removed useless ss_row_id condition. Fixed "$activeUsers === -1", comparison fails because it's actually the string "-1", no doubt because it's a BIGINT which is too big for PHP to represent with an numeric type. --- maintenance/updaters.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index 0533b66a6f..568c2f186e 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -1030,9 +1030,8 @@ function do_stats_init() { function do_active_users_init() { global $wgDatabase; - $activeUsers = $wgDatabase->selectField( 'site_stats', 'ss_active_users', - array( 'ss_row_id' => 1 ), __METHOD__ ); - if( $activeUsers === -1 ) { + $activeUsers = $wgDatabase->selectField( 'site_stats', 'ss_active_users', false, __METHOD__ ); + if( $activeUsers == -1 ) { $activeUsers = $wgDatabase->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )', array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers'" ), __METHOD__ -- 2.20.1