X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpreprocessDump.php;h=a62e0196a5932f1a5085a6c20e8d943f0af20a0e;hb=0d076eae58f2f58e708195340784ea65bd96d305;hp=f8526d0c330ae76273ea691b07c844145e28d29c;hpb=0e3667be51296aabc342d89844d59641d7fb2361;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/preprocessDump.php b/maintenance/preprocessDump.php index f8526d0c33..a62e0196a5 100644 --- a/maintenance/preprocessDump.php +++ b/maintenance/preprocessDump.php @@ -25,6 +25,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/dumpIterator.php'; /** @@ -40,9 +42,9 @@ class PreprocessDump extends DumpIterator { public $mPPNodeCount = 0; public function getStripList() { - global $wgParser; + $parser = MediaWikiServices::getInstance()->getParser(); - return $wgParser->getStripList(); + return $parser->getStripList(); } public function __construct() { @@ -56,7 +58,7 @@ class PreprocessDump extends DumpIterator { } public function checkOptions() { - global $wgParser, $wgParserConf, $wgPreprocessorCacheThreshold; + global $wgParserConf, $wgPreprocessorCacheThreshold; if ( !$this->hasOption( 'cache' ) ) { $wgPreprocessorCacheThreshold = false; @@ -70,7 +72,7 @@ class PreprocessDump extends DumpIterator { $name = Preprocessor_DOM::class; } - $wgParser->firstCallInit(); + MediaWikiServices::getInstance()->getParser()->firstCallInit(); $this->mPreprocessor = new $name( $this ); }