From d45baf7f0734a2506c77925064f42bc13e1bff5e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 3 Jul 2019 18:41:07 -0700 Subject: [PATCH] resourceloader: Add wgWikiID to mw.config in the startup module This was previously just added by Echo, but it's generally useful. We should probably deprecate wgDBname, because wgWikiID is a better wiki identifier that also works when two wikis have different table prefixes in the same database, but that'll take some work because a number of things rely on it right now (including ResourceLoader itself, for its localStorage keys). Change-Id: I4d289267991f1f9a8e0710ec6ee5a2131306c510 --- includes/resourceloader/ResourceLoaderStartUpModule.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 58c9ee5b82..942b0e5cab 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -104,6 +104,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 -- 2.20.1