From 35edfa60180fa68e63ecdd86196634b7fbe63d2b Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 13 Aug 2018 22:55:13 -0700 Subject: [PATCH] Use new Parser accessors And there's no need to manually call firstCallInit() anymore, the Parser will call it in all the necessary places automatically. Depends-On: Ida62767f3ca53f99609cae01d3a20051bb92ccab Depends-On: Ia2d98baf6caed2cd779cb00aceba5785cf13d633 Change-Id: I7e2097fa733506985a4b252fc9b01b03f6c28885 --- includes/ResourceLoaderCodeMirrorModule.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/ResourceLoaderCodeMirrorModule.php b/includes/ResourceLoaderCodeMirrorModule.php index a0c7bdbd..5e50a520 100644 --- a/includes/ResourceLoaderCodeMirrorModule.php +++ b/includes/ResourceLoaderCodeMirrorModule.php @@ -63,7 +63,6 @@ class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule { $lang = MediaWikiServices::getInstance()->getContentLanguage(); $registry = ExtensionRegistry::getInstance(); $parser = MediaWikiServices::getInstance()->getParser(); - $parser->firstCallInit(); // initialize configuration $config = [ @@ -71,8 +70,8 @@ class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule { 'tagModes' => $registry->getAttribute( 'CodeMirrorTagModes' ), 'tags' => array_fill_keys( $parser->getTags(), true ), 'doubleUnderscore' => [ [], [] ], - 'functionSynonyms' => $parser->mFunctionSynonyms, - 'urlProtocols' => $parser->mUrlProtocols, + 'functionSynonyms' => $parser->getFunctionSynonyms(), + 'urlProtocols' => $parser->getUrlProtocols(), 'linkTrailCharacters' => $lang->linkTrail(), ];