}
public function execute() {
- global $wgActorTableSchemaMigrationStage;
-
$params = $this->extractRequestParams();
$activeUserDays = $this->getConfig()->get( 'ActiveUserDays' );
] ] );
// 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 ),