$numFixed = 0;
$numBad = 0;
- $totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', false, __METHOD__ );
+ $totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', '', __METHOD__ );
// In MySQL 4.1+, the binary field old_text has a non-working LOWER() function
$lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING latin1))';
__METHOD__
);
$this->commitTransaction( $dbw, __METHOD__ );
- $this->waitForSlaves();
}
print "$primaryId: resolved to $url\n";
print "Good stubs: $numGood\n";
}
- function waitForSlaves() {
- static $iteration = 0;
- ++$iteration;
- if ( ++$iteration > 50 == 0 ) {
- wfWaitForSlaves();
- $iteration = 0;
- }
- }
-
function findTextIdInPage( $pageId, $textId ) {
$ids = $this->getRevTextMap( $pageId );
if ( !isset( $ids[$textId] ) ) {
$text = $secondaryRow->old_text;
if ( in_array( 'external', $flags ) ) {
$url = $text;
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
list( /* $proto */, $path ) = explode( '://', $url, 2 );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
if ( $path == "" ) {
return false;
}
}
-$maintClass = 'FixT22757';
+$maintClass = FixT22757::class;
require_once RUN_MAINTENANCE_IF_MAIN;