if ( in_array( $this->requestedGroup, $symsForAll ) ) {
$this->requestedGroup = '';
}
+ $this->editsOnly = $wgRequest->getBool( 'editsOnly' );
$this->requestedUser = '';
if ( $un != '' ) {
function getQueryInfo() {
$dbr = wfGetDB( DB_SLAVE );
- $conds=array();
- // don't show hidden names
- $conds[]='ipb_deleted IS NULL OR ipb_deleted = 0';
+ $conds = array();
+ // Don't show hidden names
+ $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0';
if ($this->requestedGroup != "") {
$conds['ug_group'] = $this->requestedGroup;
$useIndex = '';
if ($this->requestedUser != "") {
$conds[] = 'user_name >= ' . $dbr->addQuotes( $this->requestedUser );
}
+ if( $this->editsOnly ) {
+ $conds[] = 'user_editcount > 0';
+ }
list ($user,$user_groups,$ipblocks) = $dbr->tableNamesN('user','user_groups','ipblocks');
}
function getBody() {
- if (!$this->mQueryDone) {
+ if( !$this->mQueryDone ) {
$this->doQuery();
}
- $batch = new LinkBatch;
-
$this->mResult->rewind();
-
+ $batch = new LinkBatch;
while ( $row = $this->mResult->fetchObject() ) {
$batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
}
Xml::option( wfMsg( 'group-all' ), '' );
foreach( $this->getAllGroups() as $group => $groupText )
$out .= Xml::option( $groupText, $group, $group == $this->requestedGroup );
- $out .= Xml::closeElement( 'select' ) . ' ';
+ $out .= Xml::closeElement( 'select' ) . '<br/>';
+ $out .= Xml::checkLabel( wfMsg('listusers-editsonly'), 'editsOnly', 'editsOnly', $this->editsOnly );
+ $out .= ' ';
wfRunHooks( 'SpecialListusersHeaderForm', array( $this, &$out ) );
'protectedtitlesempty' => 'No titles are currently protected with these parameters.',
'listusers' => 'User list',
'listusers-summary' => '', # do not translate or duplicate this message to other languages
+'listusers-editsonly' => 'Show users with edits only',
'newpages' => 'New pages',
'newpages-summary' => '', # do not translate or duplicate this message to other languages
'newpages-username' => 'Username:',