X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FJavaScriptContent.php;h=4804758fe038b5a0af201d0dd018c5a6d164ed6c;hb=11bf698158125bdbde2111f3c53dab528e4109e0;hp=e6377980f9c75f6a475548b75c3e3cb795727408;hpb=83ec9c66498ced5c95f52de4fd0ad54b0546b116;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/JavaScriptContent.php b/includes/content/JavaScriptContent.php index e6377980f9..4804758fe0 100644 --- a/includes/content/JavaScriptContent.php +++ b/includes/content/JavaScriptContent.php @@ -25,6 +25,8 @@ * @author Daniel Kinzler */ +use MediaWiki\MediaWikiServices; + /** * Content for JavaScript pages. * @@ -56,12 +58,12 @@ class JavaScriptContent extends TextContent { * @return JavaScriptContent */ public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) { - global $wgParser; // @todo Make pre-save transformation optional for script pages // See T34858 $text = $this->getText(); - $pst = $wgParser->preSaveTransform( $text, $title, $user, $popts ); + $pst = MediaWikiServices::getInstance()->getParser() + ->preSaveTransform( $text, $title, $user, $popts ); return new static( $pst ); }