From: Amir E. Aharoni Date: Sat, 4 Oct 2014 14:02:55 +0000 (+0300) Subject: Avoid extra-long code lines X-Git-Tag: 1.31.0-rc.0~13689 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22upgrade%22%2C%22reinstall=non%22%29%20.%20%22?a=commitdiff_plain;h=46b369894742d3bb63afc54ca8f4bc9686ce72de;p=lhc%2Fweb%2Fwiklou.git Avoid extra-long code lines Makes phpcs happy. Change-Id: Ideb4d4e7b9f5c385f108b91b26a796ecf6833d47 --- diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 2f3d3f8975..ee662888f9 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -387,11 +387,20 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { $registrations = $this->getModuleRegistrations( $context ); // Fix indentation $registrations = str_replace( "\n", "\n\t", trim( $registrations ) ); + $mwMapJsCall = Xml::encodeJsCall( + 'mw.Map', + array( $this->getConfig()->get( 'LegacyJavaScriptGlobals' ) ) + ); + $mwConfigSetJsCall = Xml::encodeJsCall( + 'mw.config.set', + array( $configuration ) + ); + $out .= "var startUp = function () {\n" . "\tmw.config = new " . - Xml::encodeJsCall( 'mw.Map', array( $this->getConfig()->get( 'LegacyJavaScriptGlobals' ) ) ) . "\n" . + $mwMapJsCall . "\n" . "\t$registrations\n" . - "\t" . Xml::encodeJsCall( 'mw.config.set', array( $configuration ) ) . + "\t" . $mwConfigSetJsCall . "};\n"; // Conditional script injection