r40358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40357‎ | r40358 | r40359 >
Date:04:07, 3 September 2008
Author:tstarling
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updaters.inc
@@ -1030,9 +1030,8 @@
10311031
10321032 function do_active_users_init() {
10331033 global $wgDatabase;
1034 - $activeUsers = $wgDatabase->selectField( 'site_stats', 'ss_active_users',
1035 - array( 'ss_row_id' => 1 ), __METHOD__ );
1036 - if( $activeUsers === -1 ) {
 1034+ $activeUsers = $wgDatabase->selectField( 'site_stats', 'ss_active_users', false, __METHOD__ );
 1035+ if( $activeUsers == -1 ) {
10371036 $activeUsers = $wgDatabase->selectField( 'recentchanges',
10381037 'COUNT( DISTINCT rc_user_text )',
10391038 array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers'" ), __METHOD__