X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderStartUpModule.php;h=78775fb59741ba1daee6b0ed9ff65b45abb41cb5;hb=f66b93107594a4fc56e6cb86f32543fd153cdf40;hp=58c9ee5b82794c5548ea017a7aa752c3cee7c3f8;hpb=3e49b37b689a58d9eb475eb0a4ae2d2aa8f5300a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 58c9ee5b82..78775fb597 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -38,6 +38,9 @@ use MediaWiki\MediaWikiServices; * - safemode: Only register modules that have ORIGIN_CORE as their origin. * This effectively disables ORIGIN_USER modules. (T185303) * See also: OutputPage::disallowUserJs() + * + * @ingroup ResourceLoader + * @internal */ class ResourceLoaderStartUpModule extends ResourceLoaderModule { protected $targets = [ 'desktop', 'mobile' ]; @@ -104,6 +107,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgContentNamespaces' => $nsInfo->getContentNamespaces(), 'wgSiteName' => $conf->get( 'Sitename' ), 'wgDBname' => $conf->get( 'DBname' ), + 'wgWikiID' => WikiMap::getWikiIdFromDbDomain( WikiMap::getCurrentWikiDbDomain() ), 'wgExtraSignatureNamespaces' => $conf->get( 'ExtraSignatureNamespaces' ), 'wgExtensionAssetsPath' => $conf->get( 'ExtensionAssetsPath' ), // MediaWiki sets cookies to have this prefix by default @@ -120,7 +124,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgCommentCodePointLimit' => CommentStore::COMMENT_CHARACTER_LIMIT, ]; - Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars, $skin ] ); + Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars, $skin, $conf ] ); return $vars; } @@ -291,7 +295,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { $states[$name] = 'error'; } - if ( $versionHash !== '' && strlen( $versionHash ) !== 7 ) { + if ( $versionHash !== '' && strlen( $versionHash ) !== ResourceLoader::HASH_LENGTH ) { $e = new RuntimeException( "Badly formatted module version hash" ); $resourceLoader->outputErrorAndLog( $e, "Module '{module}' produced an invalid version hash: '{version}'.",