Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/307893
Change subject: Do not use $wgExtensionFunctions to set globals ...................................................................... Do not use $wgExtensionFunctions to set globals There was no reason to, and it can result in extension initialization happening before the relevant configuration has been set. Bug: T143055 Change-Id: I0ecf1e2859578fd4ebec9d68a769d456b3861ed7 --- M wmf-config/CommonSettings.php 1 file changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/93/307893/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 0970815..88cb02a 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -3134,23 +3134,19 @@ } $wgMWOAuthSecureTokenTransfer = true; - $wgGroupPermissions['autoconfirmed']['mwoauthproposeconsumer'] = true; - $wgGroupPermissions['autoconfirmed']['mwoauthupdateownconsumer'] = true; + if ( $wgDBname === $wgMWOAuthCentralWiki ) { + // management interfaces are only available on the central wiki + $wgGroupPermissions['autoconfirmed']['mwoauthproposeconsumer'] = true; + $wgGroupPermissions['autoconfirmed']['mwoauthupdateownconsumer'] = true; + $wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = true; + $wgOAuthGroupsToNotify = ['oauthadmin']; + } $wgHooks['OAuthReplaceMessage'][] = function( &$msgKey ) { if ( $msgKey === 'mwoauth-form-privacypolicy-link' ) { $msgKey = 'wikimedia-oauth-privacy-link'; } return true; - }; - - $wgExtensionFunctions[] = function() { - global $wgDBname, $wgMWOAuthCentralWiki, $wgGroupPermissions, $wgOAuthGroupsToNotify; - if ( $wgDBname === $wgMWOAuthCentralWiki ) { - // Only needed on the central wiki. - $wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = true; - $wgOAuthGroupsToNotify = ['oauthadmin']; - } }; } -- To view, visit https://gerrit.wikimedia.org/r/307893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ecf1e2859578fd4ebec9d68a769d456b3861ed7 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits