],
__METHOD__,
[
- 'LIMIT' => $this->mBatchSize,
+ 'LIMIT' => $this->getBatchSize(),
'ORDER BY' => 'user_id',
]
);
$id = $row->user_id;
$lastId = $id;
// Get first edit time
+ $actorQuery = ActorMigration::newMigration()
+ ->getWhere( $dbw, 'rev_user', User::newFromId( $id ) );
$timestamp = $dbw->selectField(
- 'revision',
+ [ 'revision' ] + $actorQuery['tables'],
'MIN(rev_timestamp)',
- [ 'rev_user' => $id ],
- __METHOD__
+ $actorQuery['conds'],
+ __METHOD__,
+ [],
+ $actorQuery['joins']
);
// Update
if ( $timestamp !== null ) {
$this->output( "Waiting for replica DBs..." );
wfWaitForSlaves();
$this->output( " done.\n" );
- } while ( $res->numRows() >= $this->mBatchSize );
+ } while ( $res->numRows() >= $this->getBatchSize() );
}
}
-$maintClass = "FixUserRegistration";
+$maintClass = FixUserRegistration::class;
require_once RUN_MAINTENANCE_IF_MAIN;