* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/dumpIterator.php';
/**
public $mPPNodeCount = 0;
public function getStripList() {
- global $wgParser;
+ $parser = MediaWikiServices::getInstance()->getParser();
- return $wgParser->getStripList();
+ return $parser->getStripList();
}
public function __construct() {
}
public function checkOptions() {
- global $wgParser, $wgParserConf, $wgPreprocessorCacheThreshold;
+ global $wgParserConf, $wgPreprocessorCacheThreshold;
if ( !$this->hasOption( 'cache' ) ) {
$wgPreprocessorCacheThreshold = false;
$name = Preprocessor_DOM::class;
}
- $wgParser->firstCallInit();
+ MediaWikiServices::getInstance()->getParser()->firstCallInit();
$this->mPreprocessor = new $name( $this );
}
}
try {
- $this->mPreprocessor->preprocessToObj( strval( $content->getNativeData() ), 0 );
+ $this->mPreprocessor->preprocessToObj( strval( $content->getText() ), 0 );
} catch ( Exception $e ) {
$this->error( "Caught exception " . $e->getMessage() . " in "
. $rev->getTitle()->getPrefixedText() );