+ $tables = [ 'recentchanges' ];
+ $joins = [];
+ if ( $wgActorTableSchemaMigrationStage === MIGRATION_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)';
+ }
+ }