* @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() {
} elseif ( isset( $wgParserConf['preprocessorClass'] ) ) {
$name = $wgParserConf['preprocessorClass'];
} else {
- $name = 'Preprocessor_DOM';
+ $name = Preprocessor_DOM::class;
}
$wgParser->firstCallInit();
}
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() );
}
}
-$maintClass = "PreprocessDump";
+$maintClass = PreprocessDump::class;
require_once RUN_MAINTENANCE_IF_MAIN;