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

Change subject: Compute $wgWBClientSettings['excludeNamespaces'] on demand
......................................................................


Compute $wgWBClientSettings['excludeNamespaces'] on demand

And not all the time

Change-Id: Iba616b200d16132782414fef8d2cda4ec9f9cd0b
---
M wmf-config/Wikibase.php
1 file changed, 2 insertions(+), 8 deletions(-)

Approvals:
  Aude: Looks good to me, but someone else must approve
  MarkTraceur: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index bdcf76b..b1c1910 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -166,18 +166,12 @@
                'Q17580674' => 'badge-featuredportal', // bug 73193
        );
 
-       $wgHooks['SetupAfterCache'][] = 'wmfWBClientExcludeNS';
-
-       function wmfWBClientExcludeNS() {
-               global $wgWBClientSettings;
-
-               $wgWBClientSettings['excludeNamespaces'] = array_merge(
+       $wgWBClientSettings['excludeNamespaces'] = function() {
+               return array_merge(
                        MWNamespace::getTalkNamespaces(),
                        // 1198 => NS_TRANSLATE
                        array( NS_USER, NS_FILE, NS_MEDIAWIKI, 1198 )
                );
-
-               return true;
        };
 
        $wgWBClientSettings['allowArbitraryDataAccess'] = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba616b200d16132782414fef8d2cda4ec9f9cd0b
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to