dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
004b6b9
)
Code style, avoiding warnings.
author
Rotem Liss
<rotem@users.mediawiki.org>
Wed, 19 Dec 2007 17:59:53 +0000
(17:59 +0000)
committer
Rotem Liss
<rotem@users.mediawiki.org>
Wed, 19 Dec 2007 17:59:53 +0000
(17:59 +0000)
includes/SpecialUserrights.php
patch
|
blob
|
history
diff --git
a/includes/SpecialUserrights.php
b/includes/SpecialUserrights.php
index
2f1cf02
..
6378d08
100644
(file)
--- a/
includes/SpecialUserrights.php
+++ b/
includes/SpecialUserrights.php
@@
-448,6
+448,17
@@
class UserrightsForm extends HTMLForm {
function changeableGroups() {
global $wgUser;
function changeableGroups() {
global $wgUser;
+ if( $wgUser->isAllowed( 'userrights' ) ) {
+ // This group gives the right to modify everything (reverse-
+ // compatibility with old "userrights lets you change
+ // everything")
+ return array(
+ 'add' => User::getAllGroups(),
+ 'remove' => User::getAllGroups()
+ );
+ }
+
+ // Okay, it's not so simple, we will have to go through the arrays
$groups = array( 'add' => array(), 'remove' => array() );
$addergroups = $wgUser->getEffectiveGroups();
$groups = array( 'add' => array(), 'remove' => array() );
$addergroups = $wgUser->getEffectiveGroups();
@@
-466,21
+477,10
@@
class UserrightsForm extends HTMLForm {
*
* @param String $group The group to check for whether it can add/remove
* @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ) )
*
* @param String $group The group to check for whether it can add/remove
* @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ) )
- */
+ */
private function changeableByGroup( $group ) {
private function changeableByGroup( $group ) {
- global $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups;
-
- if( $wgGroupPermissions[$group]['userrights'] == true ) {
- // This group gives the right to modify everything (reverse-
- // compatibility with old "userrights lets you change
- // everything")
- return array(
- 'add' => User::getAllGroups(),
- 'remove' => User::getAllGroups()
- );
- }
-
- // Okay, it's not so simple, we have to go through the arrays
+ global $wgAddGroups, $wgRemoveGroups;
+
$groups = array( 'add' => array(), 'remove' => array() );
if( empty($wgAddGroups[$group]) ) {
// Don't add anything to $groups
$groups = array( 'add' => array(), 'remove' => array() );
if( empty($wgAddGroups[$group]) ) {
// Don't add anything to $groups