|
@@ 4982-4989 (lines=8) @@
|
| 4979 |
|
'remove-self' => [] |
| 4980 |
|
]; |
| 4981 |
|
|
| 4982 |
|
if ( empty( $wgAddGroups[$group] ) ) { |
| 4983 |
|
// Don't add anything to $groups |
| 4984 |
|
} elseif ( $wgAddGroups[$group] === true ) { |
| 4985 |
|
// You get everything |
| 4986 |
|
$groups['add'] = self::getAllGroups(); |
| 4987 |
|
} elseif ( is_array( $wgAddGroups[$group] ) ) { |
| 4988 |
|
$groups['add'] = $wgAddGroups[$group]; |
| 4989 |
|
} |
| 4990 |
|
|
| 4991 |
|
// Same thing for remove |
| 4992 |
|
if ( empty( $wgRemoveGroups[$group] ) ) { |
|
@@ 4992-4998 (lines=7) @@
|
| 4989 |
|
} |
| 4990 |
|
|
| 4991 |
|
// Same thing for remove |
| 4992 |
|
if ( empty( $wgRemoveGroups[$group] ) ) { |
| 4993 |
|
// Do nothing |
| 4994 |
|
} elseif ( $wgRemoveGroups[$group] === true ) { |
| 4995 |
|
$groups['remove'] = self::getAllGroups(); |
| 4996 |
|
} elseif ( is_array( $wgRemoveGroups[$group] ) ) { |
| 4997 |
|
$groups['remove'] = $wgRemoveGroups[$group]; |
| 4998 |
|
} |
| 4999 |
|
|
| 5000 |
|
// Re-map numeric keys of AddToSelf/RemoveFromSelf to the 'user' key for backwards compatibility |
| 5001 |
|
if ( empty( $wgGroupsAddToSelf['user'] ) || $wgGroupsAddToSelf['user'] !== true ) { |
|
@@ 5018-5025 (lines=8) @@
|
| 5015 |
|
} |
| 5016 |
|
|
| 5017 |
|
// Now figure out what groups the user can add to him/herself |
| 5018 |
|
if ( empty( $wgGroupsAddToSelf[$group] ) ) { |
| 5019 |
|
// Do nothing |
| 5020 |
|
} elseif ( $wgGroupsAddToSelf[$group] === true ) { |
| 5021 |
|
// No idea WHY this would be used, but it's there |
| 5022 |
|
$groups['add-self'] = User::getAllGroups(); |
| 5023 |
|
} elseif ( is_array( $wgGroupsAddToSelf[$group] ) ) { |
| 5024 |
|
$groups['add-self'] = $wgGroupsAddToSelf[$group]; |
| 5025 |
|
} |
| 5026 |
|
|
| 5027 |
|
if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) { |
| 5028 |
|
// Do nothing |
|
@@ 5027-5033 (lines=7) @@
|
| 5024 |
|
$groups['add-self'] = $wgGroupsAddToSelf[$group]; |
| 5025 |
|
} |
| 5026 |
|
|
| 5027 |
|
if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) { |
| 5028 |
|
// Do nothing |
| 5029 |
|
} elseif ( $wgGroupsRemoveFromSelf[$group] === true ) { |
| 5030 |
|
$groups['remove-self'] = User::getAllGroups(); |
| 5031 |
|
} elseif ( is_array( $wgGroupsRemoveFromSelf[$group] ) ) { |
| 5032 |
|
$groups['remove-self'] = $wgGroupsRemoveFromSelf[$group]; |
| 5033 |
|
} |
| 5034 |
|
|
| 5035 |
|
return $groups; |
| 5036 |
|
} |