Only pretty-print the parser report JS vars
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoader.php
index ac780be..1a93f6e 100644 (file)
@@ -1388,13 +1388,14 @@ MESSAGE;
         * the given value.
         *
         * @param array $configuration List of configuration values keyed by variable name
+        * @param bool $pretty Pretty-print with extra whitespace
         * @return string
         */
-       public static function makeConfigSetScript( array $configuration ) {
+       public static function makeConfigSetScript( array $configuration, $pretty = null ) {
                return Xml::encodeJsCall(
                        'mw.config.set',
                        [ $configuration ],
-                       ResourceLoader::inDebugMode()
+                       ( $pretty === null ) ? ResourceLoader::inDebugMode() : $pretty
                );
        }
 
@@ -1477,7 +1478,7 @@ MESSAGE;
         * @param array $extraQuery
         * @return array
         */
-       public static function createLoaderQuery( ResourceLoaderContext $context, $extraQuery = [] ) {
+       protected static function createLoaderQuery( ResourceLoaderContext $context, $extraQuery = [] ) {
                return self::makeLoaderQuery(
                        $context->getModules(),
                        $context->getLanguage(),