function resolveStubs() {
$fname = 'resolveStubs';
- $dbr = wfGetDB( DB_SLAVE );
- $maxID = $dbr->selectField( 'text', 'MAX(old_id)', false, $fname );
+ $dbr = wfGetDB( DB_REPLICA );
+ $maxID = $dbr->selectField( 'text', 'MAX(old_id)', '', $fname );
$blockSize = 10000;
$numBlocks = intval( $maxID / $blockSize ) + 1;
$stub = unserialize( $stubText );
$flags = explode( ',', $flags );
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$dbw = wfGetDB( DB_MASTER );
if ( strtolower( get_class( $stub ) ) !== 'historyblobstub' ) {