jenkins-bot has submitted this change and it was merged.

Change subject: Force re-cache of Canonical Namespaces
......................................................................


Force re-cache of Canonical Namespaces

If an extension does something seemingly innocuous like calling
Title::getPrefixedText in a hook called before the end of
includes/Setup.php, it causes the list of canonical namespaces to be
cached early and breaks extensions that try to add namespaces from a
$wgExtensionFunctions callback.

This adds a call to recache the namespace list after calling those
$wgExtensionFunctions callbacks.

Bug: 45031
GitHub: https://github.com/wikimedia/mediawiki-core/pull/1
Change-Id: Ie00cbcd8ca0147663224eff6a6fe73fa70e1bbb4
(cherry picked from commit 9c806d1c3a6cd53e819a8088f3f47f2ed3a3f721)
---
M includes/Setup.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Setup.php b/includes/Setup.php
index 028758f..57b2a78 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -581,6 +581,9 @@
        wfProfileOut( $profName );
 }
 
+# Fix for bug 45031, to force re-cache of Canonical namespaces
+MWNamespace::getCanonicalNamespaces( true );
+
 wfDebug( "Fully initialised\n" );
 $wgFullyInitialised = true;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/74598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie00cbcd8ca0147663224eff6a6fe73fa70e1bbb4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf11
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to