Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoader.php
index 143f5cc..1073de0 100644 (file)
@@ -388,7 +388,6 @@ class ResourceLoader implements LoggerAwareInterface {
                                }
                        }
                }
-
        }
 
        /**
@@ -428,7 +427,6 @@ class ResourceLoader implements LoggerAwareInterface {
                        // Keep track of their names so that they can be loaded together
                        $this->testModuleNames[$id] = array_keys( $testModules[$id] );
                }
-
        }
 
        /**
@@ -670,7 +668,7 @@ class ResourceLoader implements LoggerAwareInterface {
                // back for subsequent output, resulting in invalid GZIP. So we have to wrap
                // the whole thing in our own output buffer to be sure the active buffer
                // doesn't use ob_gzhandler.
-               // See http://bugs.php.net/bug.php?id=36514
+               // See https://bugs.php.net/bug.php?id=36514
                ob_start();
 
                // Find out which modules are missing and instantiate the others
@@ -716,7 +714,7 @@ class ResourceLoader implements LoggerAwareInterface {
                }
 
                // See RFC 2616 § 3.11 Entity Tags
-               // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
+               // https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
                $etag = 'W/"' . $versionHash . '"';
 
                // Try the client-side cache first
@@ -779,7 +777,6 @@ class ResourceLoader implements LoggerAwareInterface {
 
                $this->errors = [];
                echo $response;
-
        }
 
        /**
@@ -824,7 +821,7 @@ class ResourceLoader implements LoggerAwareInterface {
                        header( 'Content-Type: text/javascript; charset=utf-8' );
                }
                // See RFC 2616 § 14.19 ETag
-               // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19
+               // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19
                header( 'ETag: ' . $etag );
                if ( $context->getDebug() ) {
                        // Do not cache debug responses
@@ -849,7 +846,7 @@ class ResourceLoader implements LoggerAwareInterface {
         */
        protected function tryRespondNotModified( ResourceLoaderContext $context, $etag ) {
                // See RFC 2616 § 14.26 If-None-Match
-               // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26
+               // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26
                $clientKeys = $context->getRequest()->getHeader( 'If-None-Match', WebRequest::GETHEADER_LIST );
                // Never send 304s in debug mode
                if ( $clientKeys !== false && !$context->getDebug() && in_array( $etag, $clientKeys ) ) {
@@ -859,7 +856,7 @@ class ResourceLoader implements LoggerAwareInterface {
                        // response (because the gzip header is always there). This is
                        // a problem because 304 responses have to be completely empty
                        // per the HTTP spec, and Firefox behaves buggily when they're not.
-                       // See also http://bugs.php.net/bug.php?id=51579
+                       // See also https://bugs.php.net/bug.php?id=51579
                        // To work around this, we tear down all output buffering before
                        // sending the 304.
                        wfResetOutputBuffers( /* $resetGzipEncoding = */ true );
@@ -1142,7 +1139,6 @@ MESSAGE;
        protected static function makeLoaderImplementScript(
                $name, $scripts, $styles, $messages, $templates
        ) {
-
                if ( $scripts instanceof XmlJsCode ) {
                        $scripts = new XmlJsCode( "function ( $, jQuery, require, module ) {\n{$scripts->value}\n}" );
                } elseif ( !is_string( $scripts ) && !is_array( $scripts ) ) {
@@ -1434,14 +1430,13 @@ 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, $pretty = null ) {
+       public static function makeConfigSetScript( array $configuration ) {
                return Xml::encodeJsCall(
                        'mw.config.set',
                        [ $configuration ],
-                       ( $pretty === null ) ? ResourceLoader::inDebugMode() : $pretty
+                       ResourceLoader::inDebugMode()
                );
        }