Merge "Don't fallback from uk to ru"
[lhc/web/wiklou.git] / includes / TemplateParser.php
index 20142a7..470a75c 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+use MediaWiki\MediaWikiServices;
+
 /**
  * Handles compiling Mustache templates into PHP rendering functions
  *
@@ -98,7 +100,7 @@ class TemplateParser {
                $fastHash = md5( $fileContents );
 
                // Fetch a secret key for building a keyed hash of the PHP code
-               $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+               $config = MediaWikiServices::getInstance()->getMainConfig();
                $secretKey = $config->get( 'SecretKey' );
 
                if ( $secretKey ) {
@@ -186,10 +188,10 @@ class TemplateParser {
         * @code
         *     echo $templateParser->processTemplate(
         *         'ExampleTemplate',
-        *         array(
+        *         [
         *             'username' => $user->getName(),
         *             'message' => 'Hello!'
-        *         )
+        *         ]
         *     );
         * @endcode
         * @param string $templateName The name of the template