'wgCaseSensitiveNamespaces' => $caseSensitiveNamespaces,
'wgLegalTitleChars' => Title::convertByteClassToUnicodeClass( Title::legalChars() ),
'wgIllegalFileChars' => Title::convertByteClassToUnicodeClass( $illegalFileChars ),
- 'wgResourceLoaderStorageEnabled' => $conf->get( 'ResourceLoaderStorageEnabled' ),
'wgForeignUploadTargets' => $conf->get( 'ForeignUploadTargets' ),
'wgEnableUploads' => $conf->get( 'EnableUploads' ),
'wgCommentByteLimit' => null,
}
if ( $versionHash !== '' && strlen( $versionHash ) !== 7 ) {
- $this->getLogger()->warning(
- "Module '{module}' produced an invalid version hash: '{version}'.",
+ $e = new RuntimeException( "Badly formatted module version hash" );
+ $resourceLoader->outputErrorAndLog( $e,
+ "Module '{module}' produced an invalid version hash: '{version}'.",
[
'module' => $name,
'version' => $versionHash,
return $out;
}
- /**
- * @private For internal use by SpecialJavaScriptTest
- * @since 1.32
- * @return array
- * @codeCoverageIgnore
- */
- public function getBaseModulesInternal() {
- return $this->getBaseModules();
- }
-
/**
* Base modules implicitly available to all modules.
*
'$VARS.maxQueryLength' => ResourceLoader::encodeJsonForScript(
$conf->get( 'ResourceLoaderMaxQueryLength' )
),
+ // The client-side module cache can be disabled by site configuration.
+ // It is also always disabled in debug mode.
+ '$VARS.storeEnabled' => ResourceLoader::encodeJsonForScript(
+ $conf->get( 'ResourceLoaderStorageEnabled' ) && !$context->getDebug()
+ ),
+ '$VARS.wgLegacyJavaScriptGlobals' => ResourceLoader::encodeJsonForScript(
+ $conf->get( 'LegacyJavaScriptGlobals' )
+ ),
'$VARS.storeKey' => ResourceLoader::encodeJsonForScript( $this->getStoreKey() ),
'$VARS.storeVary' => ResourceLoader::encodeJsonForScript( $this->getStoreVary( $context ) ),
];
// Perform string replacements for startup.js
$pairs = [
- '$VARS.wgLegacyJavaScriptGlobals' => ResourceLoader::encodeJsonForScript(
- $conf->get( 'LegacyJavaScriptGlobals' )
- ),
'$VARS.configuration' => ResourceLoader::encodeJsonForScript(
$this->getConfigSettings( $context )
),