resourceloader: Remove 'wgMainPageTitle' mw.config key
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 15 Apr 2019 18:02:55 +0000 (19:02 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 15 Apr 2019 18:04:49 +0000 (19:04 +0100)
This was added in 2009 with cf75bdf4ba (r54384) and moved to the
startup module in 2010 with a99f9ec28b9 (r72772).

It is no longer used by any extension in Wikimedia Git, nor
elsewhere indexed by MediaWiki Codesearch. It also no longer has
any uses in mwgrep from public WMF wikis.

Bug: T220926
Depends-On: Ifdedccb513f5dd4636a37badc329ac5f1c4dd943
Change-Id: Id2729653cd450d31c1d903358ccf5e4fac564228

includes/resourceloader/ResourceLoaderStartUpModule.php

index da6063e..69a6f5f 100644 (file)
@@ -49,10 +49,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
        private function getConfigSettings( $context ) {
                $conf = $this->getConfig();
 
-               // Passing a context is important as Title::newMainPage() may otherwise
-               // try to intialise a session, which is not allowed on load.php requests.
-               $mainPage = Title::newMainPage( $context );
-
                /**
                 * Namespace related preparation
                 * - wgNamespaceIds: Key-value pairs of all localized, canonical and aliases for namespaces.
@@ -94,7 +90,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgVersion' => $conf->get( 'Version' ),
                        'wgEnableAPI' => true, // Deprecated since MW 1.32
                        'wgEnableWriteAPI' => true, // Deprecated since MW 1.32
-                       'wgMainPageTitle' => $mainPage->getPrefixedText(),
                        'wgFormattedNamespaces' => $contLang->getFormattedNamespaces(),
                        'wgNamespaceIds' => $namespaceIds,
                        'wgContentNamespaces' => MWNamespace::getContentNamespaces(),