Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -35,10 +35,24 @@ |
36 | 36 | */ |
37 | 37 | class UsersPager extends AlphabeticPager { |
38 | 38 | |
39 | | - function __construct($group=null) { |
| 39 | + function __construct( $par=null ) { |
40 | 40 | global $wgRequest; |
41 | | - $this->requestedGroup = $group != "" ? $group : $wgRequest->getVal( 'group' ); |
42 | | - $un = $wgRequest->getText( 'username' ); |
| 41 | + $parms = explode( '/', ($par = ( $par !== null ) ? $par : '' ) ); |
| 42 | + $symsForAll = array( '*', 'user' ); |
| 43 | + if ( $parms[0] != '' && ( in_array( $par, User::getAllGroups() ) || in_array( $par, $symsForAll ) ) ) { |
| 44 | + $this->requestedGroup = $par; |
| 45 | + $un = $wgRequest->getText( 'username' ); |
| 46 | + } else if ( count( $parms ) == 2 ) { |
| 47 | + $this->requestedGroup = $parms[0]; |
| 48 | + $un = $parms[1]; |
| 49 | + } else { |
| 50 | + $this->requestedGroup = $wgRequest->getVal( 'group' ); |
| 51 | + $un = ( $par != '' ) ? $par : $wgRequest->getText( 'username' ); |
| 52 | + } |
| 53 | + if ( in_array( $this->requestedGroup, $symsForAll ) ) { |
| 54 | + $this->requestedGroup = ''; |
| 55 | + } |
| 56 | + |
43 | 57 | $this->requestedUser = ''; |
44 | 58 | if ( $un != '' ) { |
45 | 59 | $username = Title::makeTitleSafe( NS_USER, $un ); |