Follow-up to
b7c4c8717f9.
Change-Id: I3030df4ed890d9d20daca31fbd33c6d9db91b94c
*/
function getBottomScripts() {
return $this->getScriptsForBottomQueue() .
- Skin::makeVariablesScript( [ 'wgPageParseReport' => $this->limitReportData ] );
+ ResourceLoader::makeInlineScript(
+ ResourceLoader::makeConfigSetScript(
+ [ 'wgPageParseReport' => $this->limitReportData ],
+ true
+ )
+ );
}
/**
* 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 ],
- true // readable
+ ( $pretty === null ) ? ResourceLoader::inDebugMode() : $pretty
);
}