Krinkle has uploaded a new change for review.

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

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
(cherry picked from commit ae5892a1c099dffec81884337d1cba0ff54f9abb)
---
M includes/CentralAuthHooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/23/207023/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/207023
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: wmf/1.26wmf2
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