X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpreprocessorFuzzTest.php;h=e57e977511ffecd1af716f6dfbfeb622eeb9f596;hb=34bd6f0b6bd0f0af03b448deddb85cdea358e0fb;hp=2503ed25e21cbf76a0c6d4a9a3fb7895092185fe;hpb=ce079cf6ad79ca8d3360817f809b219d166f9153;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 2503ed25e2..e57e977511 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + $optionsWithoutArgs = [ 'verbose' ]; require_once __DIR__ . '/commandLine.inc'; @@ -123,8 +125,7 @@ class PPFuzzTester { // This resolves a few differences between the old preprocessor and the // XML-based one, which doesn't like illegals and converts line endings. // It's done by the MW UI, so it's a reasonably legitimate thing to do. - global $wgContLang; - $s = $wgContLang->normalize( $s ); + $s = MediaWikiServices::getInstance()->getContentLanguage()->normalize( $s ); return $s; } @@ -194,7 +195,7 @@ class PPFuzzTest { } function execute() { - global $wgParser, $wgUser; + global $wgUser; $wgUser = new PPFuzzUser; $wgUser->mName = 'Fuzz'; @@ -205,7 +206,7 @@ class PPFuzzTest { $options->setTemplateCallback( [ $this, 'templateHook' ] ); $options->setTimestamp( wfTimestampNow() ); $this->output = call_user_func( - [ $wgParser, $this->entryPoint ], + [ MediaWikiServices::getInstance()->getParser(), $this->entryPoint ], $this->mainText, $this->title, $options @@ -238,7 +239,7 @@ class PPFuzzTest { class PPFuzzUser extends User { public $ppfz_test, $mDataLoaded; - function load() { + function load( $flags = null ) { if ( $this->mDataLoaded ) { return; }