*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Storage\RevisionRecord;
require_once __DIR__ . '/dumpIterator.php';
}
public function checkOptions() {
- global $wgParser, $wgParserConf, $wgPreprocessorCacheThreshold;
+ global $wgParserConf, $wgPreprocessorCacheThreshold;
if ( !$this->hasOption( 'cache' ) ) {
$wgPreprocessorCacheThreshold = false;
$name = Preprocessor_DOM::class;
}
- $wgParser->firstCallInit();
- $this->mPreprocessor = new $name( $this );
+ $parser = MediaWikiServices::getInstance()->getParser();
+ $parser->firstCallInit();
+ $this->mPreprocessor = new $name( $parser );
}
/**
* @param Revision $rev
*/
public function processRevision( $rev ) {
- $content = $rev->getContent( Revision::RAW );
+ $content = $rev->getContent( RevisionRecord::RAW );
if ( $content->getModel() !== CONTENT_MODEL_WIKITEXT ) {
return;