}
// no group with the given right(s) exists, no need for a query
- if ( !count( $groups ) ) {
+ if ( $groups === [] ) {
$this->getResult()->addIndexedTagName( [ 'query', $this->getModuleName() ], '' );
return;
// Actually count the actions using a subquery (T66505 and T66507)
$tables = [ 'recentchanges' ];
$joins = [];
- if ( $wgActorTableSchemaMigrationStage === MIGRATION_OLD ) {
+ if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_OLD ) {
$userCond = 'rc_user_text = user_name';
} else {
$tables[] = 'actor';
- $joins['actor'] = [
- $wgActorTableSchemaMigrationStage === MIGRATION_NEW ? 'JOIN' : 'LEFT JOIN',
- 'rc_actor = actor_id'
- ];
- if ( $wgActorTableSchemaMigrationStage === MIGRATION_NEW ) {
- $userCond = 'actor_user = user_id';
- } else {
- $userCond = 'actor_user = user_id OR (rc_actor = 0 AND rc_user_text = user_name)';
- }
+ $joins['actor'] = [ 'JOIN', 'rc_actor = actor_id' ];
+ $userCond = 'actor_user = user_id';
}
$timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds );
$this->addFields( [
$data['hidden'] = true;
}
if ( $fld_editcount ) {
- $data['editcount'] = intval( $row->user_editcount );
+ $data['editcount'] = (int)$row->user_editcount;
}
if ( $params['activeusers'] ) {
- $data['recentactions'] = intval( $row->recentactions );
+ $data['recentactions'] = (int)$row->recentactions;
// @todo 'recenteditcount' is set for BC, remove in 1.25
$data['recenteditcount'] = $data['recentactions'];
}