Fixes for r38424:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 2 Aug 2008 13:06:08 +0000 (13:06 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 2 Aug 2008 13:06:08 +0000 (13:06 +0000)
* $wgAddGroups[$group] can be true if the user can add all rights, show this in Special:ListGroupRights
* added messages to messages.inc

Somehow related:
* Setting $wgAddGroups = $wgRemoveGroups = array(); in DefaultSettings.php seems to put a reference between these two variables.

includes/DefaultSettings.php
includes/specials/SpecialListgrouprights.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index d16af0e..f83fa7a 100644 (file)
@@ -1301,8 +1301,8 @@ $wgAutopromote = array(
  * // Sysops can disable other sysops in an emergency, and disable bots
  * $wgRemoveGroups['sysop'] = array( 'sysop', 'bot' );
  */
-$wgAddGroups = $wgRemoveGroups = array();
-
+$wgAddGroups = array();
+$wgRemoveGroups = array();
 
 /**
  * A list of available rights, in addition to the ones defined by the core.
index 077c09e..8b12da9 100644 (file)
@@ -108,10 +108,14 @@ class SpecialListGroupRights extends SpecialPage {
                        }
                }
                sort( $r );
-               if( $add ) {
+               if( $add === true ){
+                       $r[] = wfMsgHTML( 'listgrouprights-addgroup-all' );
+               } else if( is_array( $add ) && count( $add ) ) {
                        $r[] = wfMsgHTML( 'listgrouprights-addgroup', $wgLang->listToText( $add ) );
                }
-               if( $remove ) {
+               if( $remove === true ){
+                       $r[] = wfMsgHTML( 'listgrouprights-removegroup-all' );
+               } else if( is_array( $remove ) && count( $remove ) ) {
                        $r[] = wfMsgHTML( 'listgrouprights-removegroup', $wgLang->listToText( $remove ) );
                }
                if( empty( $r ) ) {
index 19ca283..db990bc 100644 (file)
@@ -2021,16 +2021,18 @@ It may contain one or more characters which cannot be used in titles.',
 'listusers-noresult' => 'No user found.',
 
 # Special:Listgrouprights
-'listgrouprights'               => 'User group rights',
-'listgrouprights-summary'       => 'The following is a list of user groups defined on this wiki, with their associated access rights.
+'listgrouprights'                 => 'User group rights',
+'listgrouprights-summary'         => 'The following is a list of user groups defined on this wiki, with their associated access rights.
 There may be [[{{MediaWiki:Listgrouprights-helppage}}|additional information]] about individual rights.',
-'listgrouprights-group'         => 'Group',
-'listgrouprights-rights'        => 'Rights',
-'listgrouprights-helppage'      => 'Help:Group rights',
-'listgrouprights-members'       => '(list of members)',
-'listgrouprights-right-display' => '$1 ($2)', # only translate this message to other languages if you have to change it
-'listgrouprights-addgroup'      => 'Can add groups: $1',
-'listgrouprights-removegroup'   => 'Can remove groups: $1',
+'listgrouprights-group'           => 'Group',
+'listgrouprights-rights'          => 'Rights',
+'listgrouprights-helppage'        => 'Help:Group rights',
+'listgrouprights-members'         => '(list of members)',
+'listgrouprights-right-display'   => '$1 ($2)', # only translate this message to other languages if you have to change it
+'listgrouprights-addgroup'        => 'Can add groups: $1',
+'listgrouprights-removegroup'     => 'Can remove groups: $1',
+'listgrouprights-addgroup-all'    => 'Can add all groups',
+'listgrouprights-removegroup-all' => 'Can remove all groups',
 
 # E-mail user
 'mailnologin'     => 'No send address',
index af9d392..ffa5b13 100644 (file)
@@ -1311,6 +1311,10 @@ $wgMessageStructure = array(
                'listgrouprights-helppage',
                'listgrouprights-members',
                'listgrouprights-right-display',
+               'listgrouprights-addgroup',
+               'listgrouprights-removegroup',
+               'listgrouprights-addgroup-all',
+               'listgrouprights-removegroup-all',
        ),
        'emailuser' => array(
                'mailnologin',