Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/190691

Change subject: Add GlobalUserPageWikis hook handler
......................................................................

Add GlobalUserPageWikis hook handler

Change-Id: I0eedd61f72d858f5126e5efb33253b2670df3c7d
---
M wmf-config/CommonSettings.php
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/91/190691/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 46ec13a..cd0799c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1283,7 +1283,11 @@
        $wgCentralAuthLoginIcon = $wmgCentralAuthLoginIcon;
        $wgCentralAuthAutoNew = true;
 
-       $wgHooks['CentralAuthWikiList'][] = function( &$list ) {
+       /**
+        * This function is used for both the CentralAuthWikiList and
+        * GlobalUserPageWikis hooks.
+        */
+       function wmfCentralAuthWikiList( &$list ) {
                global $wgLocalDatabases, $IP, $wgSiteMatrixPrivateSites,
                        $wgSiteMatrixFishbowlSites, $wgSiteMatrixClosedSites;
 
@@ -1294,7 +1298,9 @@
                        $wgSiteMatrixClosedSites
                );
                return true;
-       };
+       }
+
+       $wgHooks['CentralAuthWikiList'][] = 'wmfCentralAuthWikiList';
 
        // Let's give it another try
        $wgCentralAuthCreateOnView = true;
@@ -1333,6 +1339,7 @@
        require_once "$IP/extensions/GlobalUserPage/GlobalUserPage.php";
        $wgGlobalUserPageAPIUrl = 'https://test.wikipedia.org/w/api.php';
        $wgGlobalUserPageDBname = 'testwiki';
+       $wgHooks['GlobalUserPageWikis'][] = 'wmfCentralAuthWikiList';
 }
 // temp hack to clear queues -- legoktm 2015-02-12
 $wgJobClasses['LocalGlobalUserPageCacheUpdateJob'] = 'NullJob';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0eedd61f72d858f5126e5efb33253b2670df3c7d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to