X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllUsers.php;h=a7d4fb90a09a7bf6ee899d42c2a894325fcc297a;hb=c29909e59fd89d9fc65a299687ad2aa2df995acc;hp=e0513e22d60c1e889ac41aa3a20e3352eb9fd2e3;hpb=f9bb20657c6776a7543fbf33ead1c1e6fbad33de;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index e0513e22d6..a7d4fb90a0 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -41,8 +41,6 @@ class ApiQueryAllUsers extends ApiQueryBase { } public function execute() { - global $wgActorTableSchemaMigrationStage; - $params = $this->extractRequestParams(); $activeUserDays = $this->getConfig()->get( 'ActiveUserDays' ); @@ -181,22 +179,17 @@ class ApiQueryAllUsers extends ApiQueryBase { ] ] ); // Actually count the actions using a subquery (T66505 and T66507) - $tables = [ 'recentchanges' ]; - $joins = []; - if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_OLD ) { - $userCond = 'rc_user_text = user_name'; - } else { - $tables[] = 'actor'; - $joins['actor'] = [ 'JOIN', 'rc_actor = actor_id' ]; - $userCond = 'actor_user = user_id'; - } + $tables = [ 'recentchanges', 'actor' ]; + $joins = [ + 'actor' => [ 'JOIN', 'rc_actor = actor_id' ], + ]; $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds ); $this->addFields( [ 'recentactions' => '(' . $db->selectSQLText( $tables, 'COUNT(*)', [ - $userCond, + 'actor_user = user_id', 'rc_type != ' . $db->addQuotes( RC_EXTERNAL ), // no wikidata 'rc_log_type IS NULL OR rc_log_type != ' . $db->addQuotes( 'newusers' ), 'rc_timestamp >= ' . $db->addQuotes( $timestamp ),