}
}
}
-
}
/**
// Keep track of their names so that they can be loaded together
$this->testModuleNames[$id] = array_keys( $testModules[$id] );
}
-
}
/**
// 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
}
// 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
$this->errors = [];
echo $response;
-
}
/**
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
*/
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 ) ) {
// 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 );
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 ) ) {
* 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()
);
}