Krinkle has uploaded a new change for review.

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

Change subject: hooks: Fix missing '&' in onMakeGlobalVariablesScript signature
......................................................................

hooks: Fix missing '&' in onMakeGlobalVariablesScript signature

Without it, the callback is acting on a copy of the array and the
variable never ends up being exported to 'mw.config' in JavaScript.

Bug: T97384
Change-Id: I37555d1485d4bd7f10bad1524914de7d1e986861
---
M includes/CentralAuthHooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/19/207019/1

diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 3462d22..5a37237 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -1286,15 +1286,15 @@
        }
 
        /**
-        * @param $groups
+        * @param &$vars
         * @return bool
         */
-       static function onMakeGlobalVariablesScript( $groups ) {
+       static function onMakeGlobalVariablesScript( &$vars ) {
                global $wgUser;
                if ( !$wgUser->isAnon() ) {
                        $centralUser = CentralAuthUser::getInstance( $wgUser );
                        if ( $centralUser->exists() && 
$centralUser->isAttached() ) {
-                               $groups['wgGlobalGroups'] = 
$centralUser->getGlobalGroups();
+                               $vars['wgGlobalGroups'] = 
$centralUser->getGlobalGroups();
                        }
                }
                return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37555d1485d4bd7f10bad1524914de7d1e986861
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to