Index: trunk/phase3/includes/SpecialListusers.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | global $wgRequest; |
42 | 42 | $this->requestedGroup = $group != "" ? $group : $wgRequest->getVal( 'group' ); |
43 | 43 | $un = $wgRequest->getText( 'username' ); |
| 44 | + $this->requestedUser = ''; |
44 | 45 | if ( $un != '' ) { |
45 | 46 | $username = Title::makeTitleSafe( NS_USER, $un ); |
46 | 47 | $this->requestedUser = $username->getText(); |
— | — | @@ -54,6 +55,8 @@ |
55 | 56 | |
56 | 57 | function getQueryInfo() { |
57 | 58 | $conds=array(); |
| 59 | + // don't show hidden names |
| 60 | + $conds[]='ipb_deleted IS NULL OR ipb_deleted = 0'; |
58 | 61 | if ($this->requestedGroup != "") { |
59 | 62 | $conds['ug_group'] = $this->requestedGroup; |
60 | 63 | } |
— | — | @@ -61,17 +64,18 @@ |
62 | 65 | $conds[] = 'user_name >= ' . wfGetDB()->addQuotes( $this->requestedUser ); |
63 | 66 | } |
64 | 67 | |
65 | | - list ($user,$user_groups) = wfGetDB()->tableNamesN('user','user_groups'); |
| 68 | + list ($user,$user_groups,$ipblocks) = wfGetDB()->tableNamesN('user','user_groups','ipblocks'); |
66 | 69 | |
67 | 70 | return array( |
68 | | - 'tables' => " $user LEFT JOIN $user_groups ON user_id=ug_user ", |
| 71 | + 'tables' => " $user LEFT JOIN $user_groups ON user_id=ug_user LEFT JOIN $ipblocks ON user_id=ipb_user AND ipb_auto=0 ", |
69 | 72 | 'fields' => array('user_name', |
70 | 73 | 'MAX(user_id) AS user_id', |
71 | 74 | 'COUNT(ug_group) AS numgroups', |
72 | 75 | 'MAX(ug_group) AS singlegroup'), |
73 | 76 | 'options' => array('GROUP BY' => 'user_name'), |
74 | 77 | 'conds' => $conds |
75 | | - ); |
| 78 | + ); |
| 79 | + |
76 | 80 | } |
77 | 81 | |
78 | 82 | function formatRow($row) { |
— | — | @@ -144,8 +148,7 @@ |
145 | 149 | $groups = User::getAllGroups(); |
146 | 150 | foreach( $groups as $group ) { |
147 | 151 | $attribs = array( 'value' => $group ); |
148 | | - if( $group == $this->requestedGroup ) |
149 | | - $attribs['selected'] = 'selected'; |
| 152 | + $attribs['selected'] = ( $group == $this->requestedGroup ) ? 'selected' : ''; |
150 | 153 | $out .= Xml::option( User::getGroupName( $group ), $attribs['value'], $attribs['selected'] ); |
151 | 154 | } |
152 | 155 | $out .= Xml::closeElement( 'select' ) . ' '; |