X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FJavaScriptContent.php;h=4804758fe038b5a0af201d0dd018c5a6d164ed6c;hb=4821c63624e123043bddc54293cf6a286505955e;hp=e6377980f9c75f6a475548b75c3e3cb795727408;hpb=8d4eb29b3d7da5f25a95ddfdaf17d272c476d999;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 ); }