From: Roan Kattouw Date: Thu, 4 Jul 2019 01:41:07 +0000 (-0700) Subject: resourceloader: Add wgWikiID to mw.config in the startup module X-Git-Tag: 1.34.0-rc.0~414^2 X-Git-Url: http://git.cyclocoop.org/%22.%20%20%20generer_url_action%28%22logout%22%2C%22logout=prive%22%29%20.%20%20%20%22?a=commitdiff_plain;h=d45baf7f0734a2506c77925064f42bc13e1bff5e;p=lhc%2Fweb%2Fwiklou.git 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 --- 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