- $rcids = $dbw->selectFieldValues(
- 'recentchanges',
- 'rc_id',
- [
- 'rc_user_text' => $botusers,
- "rc_timestamp > " . $dbw->addQuotes( $dbw->timestamp( $this->cutoffFrom ) ),
- "rc_timestamp < " . $dbw->addQuotes( $dbw->timestamp( $this->cutoffTo ) )
- ],
- __METHOD__
- );
+ $actorQuery = ActorMigration::newMigration()->getWhere( $dbw, 'rc_user', $botusers, false );
+ $rcids = [];
+ foreach ( $actorQuery['orconds'] as $cond ) {
+ $rcids = array_merge( $rcids, $dbw->selectFieldValues(
+ [ 'recentchanges' ] + $actorQuery['tables'],
+ 'rc_id',
+ [
+ "rc_timestamp > " . $dbw->addQuotes( $dbw->timestamp( $this->cutoffFrom ) ),
+ "rc_timestamp < " . $dbw->addQuotes( $dbw->timestamp( $this->cutoffTo ) ),
+ $cond,
+ ],
+ __METHOD__,
+ [],
+ $actorQuery['joins']
+ ) );
+ }
+ $rcids = array_values( array_unique( $rcids ) );