- $dbr = $this->getDB( DB_SLAVE );
- $titles = array();
- $results = $dbr->select(
- array( 'page', 'revision' ),
- array( 'page_namespace', 'page_title' ),
- array( 'page_latest = rev_id', 'rev_user_text' => $user ),
- __METHOD__
- );
- foreach ( $results as $row ) {
- $titles[] = Title::makeTitle( $row->page_namespace, $row->page_title );
+ $dbr = $this->getDB( DB_REPLICA );
+ $titles = [];
+ $actorQuery = ActorMigration::newMigration()
+ ->getWhere( $dbr, 'rev_user', User::newFromName( $user, false ) );
+ foreach ( $actorQuery['orconds'] as $cond ) {
+ $results = $dbr->select(
+ [ 'page', 'revision' ] + $actorQuery['tables'],
+ [ 'page_namespace', 'page_title' ],
+ [ $cond ],
+ __METHOD__,
+ [],
+ [ 'revision' => [ 'JOIN', 'page_latest = rev_id' ] ] + $actorQuery['joins']
+ );
+ foreach ( $results as $row ) {
+ $titles[] = Title::makeTitle( $row->page_namespace, $row->page_title );
+ }