From 66f917d81480258413bebbd88a00c60b5d6bfa3d Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 29 Mar 2010 00:09:20 +0000 Subject: [PATCH] (bug 22991) wgUserGroups should be ['*'] for anonymous users, not null --- RELEASE-NOTES | 2 ++ includes/Skin.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c64ab37c48..2ddf0b5d9e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -64,6 +64,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN correctly set * (bug 14952) Page titles are renormalized after html entities are removed so that links with non-NFC character references work correctly. +* (bug 22991) wgUserGroups JavaScript variable now reports * group for + anonymous users instead of null. == API changes in 1.17 == * (bug 22738) Allow filtering by action type on query=logevent diff --git a/includes/Skin.php b/includes/Skin.php index 5c49a1a05e..618c5934d6 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -410,7 +410,7 @@ class Skin extends Linker { 'wgArticleId' => $wgTitle->getArticleId(), 'wgIsArticle' => $wgOut->isArticle(), 'wgUserName' => $wgUser->isAnon() ? null : $wgUser->getName(), - 'wgUserGroups' => $wgUser->isAnon() ? null : $wgUser->getEffectiveGroups(), + 'wgUserGroups' => $wgUser->isAnon() ? array("*") : $wgUser->getEffectiveGroups(), 'wgUserLanguage' => $wgLang->getCode(), 'wgContentLanguage' => $wgContLang->getCode(), 'wgBreakFrames' => $wgBreakFrames, -- 2.20.1