Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1299,6 +1299,7 @@ |
1300 | 1300 | 'protectedtitlesempty', |
1301 | 1301 | 'listusers', |
1302 | 1302 | 'listusers-summary', |
| 1303 | + 'listusers-editsonly', |
1303 | 1304 | 'newpages', |
1304 | 1305 | 'newpages-summary', |
1305 | 1306 | 'newpages-username', |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | if ( in_array( $this->requestedGroup, $symsForAll ) ) { |
54 | 54 | $this->requestedGroup = ''; |
55 | 55 | } |
| 56 | + $this->editsOnly = $wgRequest->getBool( 'editsOnly' ); |
56 | 57 | |
57 | 58 | $this->requestedUser = ''; |
58 | 59 | if ( $un != '' ) { |
— | — | @@ -70,9 +71,9 @@ |
71 | 72 | |
72 | 73 | function getQueryInfo() { |
73 | 74 | $dbr = wfGetDB( DB_SLAVE ); |
74 | | - $conds=array(); |
75 | | - // don't show hidden names |
76 | | - $conds[]='ipb_deleted IS NULL OR ipb_deleted = 0'; |
| 75 | + $conds = array(); |
| 76 | + // Don't show hidden names |
| 77 | + $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0'; |
77 | 78 | if ($this->requestedGroup != "") { |
78 | 79 | $conds['ug_group'] = $this->requestedGroup; |
79 | 80 | $useIndex = ''; |
— | — | @@ -82,6 +83,9 @@ |
83 | 84 | if ($this->requestedUser != "") { |
84 | 85 | $conds[] = 'user_name >= ' . $dbr->addQuotes( $this->requestedUser ); |
85 | 86 | } |
| 87 | + if( $this->editsOnly ) { |
| 88 | + $conds[] = 'user_editcount > 0'; |
| 89 | + } |
86 | 90 | |
87 | 91 | list ($user,$user_groups,$ipblocks) = $dbr->tableNamesN('user','user_groups','ipblocks'); |
88 | 92 | |
— | — | @@ -121,13 +125,11 @@ |
122 | 126 | } |
123 | 127 | |
124 | 128 | function getBody() { |
125 | | - if (!$this->mQueryDone) { |
| 129 | + if( !$this->mQueryDone ) { |
126 | 130 | $this->doQuery(); |
127 | 131 | } |
| 132 | + $this->mResult->rewind(); |
128 | 133 | $batch = new LinkBatch; |
129 | | - |
130 | | - $this->mResult->rewind(); |
131 | | - |
132 | 134 | while ( $row = $this->mResult->fetchObject() ) { |
133 | 135 | $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
134 | 136 | } |
— | — | @@ -156,7 +158,9 @@ |
157 | 159 | Xml::option( wfMsg( 'group-all' ), '' ); |
158 | 160 | foreach( $this->getAllGroups() as $group => $groupText ) |
159 | 161 | $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup ); |
160 | | - $out .= Xml::closeElement( 'select' ) . ' '; |
| 162 | + $out .= Xml::closeElement( 'select' ) . '<br/>'; |
| 163 | + $out .= Xml::checkLabel( wfMsg('listusers-editsonly'), 'editsOnly', 'editsOnly', $this->editsOnly ); |
| 164 | + $out .= ' '; |
161 | 165 | |
162 | 166 | wfRunHooks( 'SpecialListusersHeaderForm', array( $this, &$out ) ); |
163 | 167 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2025,6 +2025,7 @@ |
2026 | 2026 | 'protectedtitlesempty' => 'No titles are currently protected with these parameters.', |
2027 | 2027 | 'listusers' => 'User list', |
2028 | 2028 | 'listusers-summary' => '', # do not translate or duplicate this message to other languages |
| 2029 | +'listusers-editsonly' => 'Show users with edits only', |
2029 | 2030 | 'newpages' => 'New pages', |
2030 | 2031 | 'newpages-summary' => '', # do not translate or duplicate this message to other languages |
2031 | 2032 | 'newpages-username' => 'Username:', |