Index: trunk/extensions/SharedUserRights/SharedUserRights_body.php |
— | — | @@ -264,7 +264,7 @@ |
265 | 265 | return false; |
266 | 266 | } |
267 | 267 | |
268 | | - if ( $name { 0 } == '#' ) { |
| 268 | + if ( $name[0] == '#' ) { |
269 | 269 | // Numeric ID can be specified... |
270 | 270 | // We'll do a lookup for the name internally. |
271 | 271 | $id = intval( substr( $name, 1 ) ); |
Index: trunk/extensions/SharedUserRights/SharedUserRights.php |
— | — | @@ -54,7 +54,9 @@ |
55 | 55 | 'sug_group', |
56 | 56 | array ( 'sug_user' => $user->mId ) ); |
57 | 57 | while ( $row = $dbr->fetchObject( $res ) ) { |
58 | | - $groups[] = $row->sug_group; |
| 58 | + if( !in_array( $row->sug_group, $groups ) ) { |
| 59 | + $groups[] = $row->sug_group; |
| 60 | + } |
59 | 61 | } |
60 | 62 | $dbr->freeResult( $res ); |
61 | 63 | $dbr->selectDB( $wgDBname ); # to prevent Listusers from breaking |