* @ingroup Maintenance
*/
+use MediaWiki\Revision\RevisionRecord;
+
require_once __DIR__ . '/Maintenance.php';
/**
'page_id > ' . $dbr->addQuotes( $lastPage )
],
__METHOD__,
- [ 'ORDER BY' => 'page_id', 'LIMIT' => $this->mBatchSize ]
+ [ 'ORDER BY' => 'page_id', 'LIMIT' => $this->getBatchSize() ]
);
foreach ( $rows as $row ) {
$this->handleRow( $row );
}
- } while ( $rows->numRows() >= $this->mBatchSize );
+ } while ( $rows->numRows() >= $this->getBatchSize() );
}
return true;
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
$this->output( "Processing {$title} ({$row->page_id})...\n" );
$rev = Revision::newFromTitle( $title );
- $content = $rev->getContent( Revision::RAW );
+ $content = $rev->getContent( RevisionRecord::RAW );
$dbw = $this->getDB( DB_MASTER );
if ( $content instanceof JsonContent ) {
if ( $content->isValid() ) {
}
}
-$maintClass = 'FixDefaultJsonContentPages';
+$maintClass = FixDefaultJsonContentPages::class;
require_once RUN_MAINTENANCE_IF_MAIN;