(bug 22991) wgUserGroups should be ['*'] for anonymous users, not null
authorPlatonides <platonides@users.mediawiki.org>
Mon, 29 Mar 2010 00:09:20 +0000 (00:09 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Mon, 29 Mar 2010 00:09:20 +0000 (00:09 +0000)
RELEASE-NOTES
includes/Skin.php

index c64ab37..2ddf0b5 100644 (file)
@@ -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
index 5c49a1a..618c593 100644 (file)
@@ -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,