$this->requestedUser = $username->getText();
}
}
-
+
$this->setupOptions();
-
+
parent::__construct();
}
public function setupOptions() {
global $wgRequest;
-
+
$this->opts = new FormOptions();
$this->opts->add( 'hidebots', false, FormOptions::BOOL );
$this->opts->fetchValuesFromRequest( $wgRequest );
$this->groups = array();
- if ($this->opts->getValue('hidebots') == 1)
+ if ( $this->opts->getValue( 'hidebots' ) == 1 ) {
$this->groups['bot'] = true;
- if ($this->opts->getValue('hidesysops') == 1)
+ }
+ if ( $this->opts->getValue( 'hidesysops' ) == 1 ) {
$this->groups['sysop'] = true;
+ }
}
function getIndexField() {
$conds[] = 'ipb_deleted IS NULL'; // don't show hidden names
$conds[] = "rc_log_type IS NULL OR rc_log_type != 'newusers'";
$conds[] = "rc_timestamp >= '{$dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge*24*3600 )}'";
-
+
if( $this->requestedUser != '' ) {
$conds[] = 'rc_user_text >= ' . $dbr->addQuotes( $this->requestedUser );
}
function formatRow( $row ) {
global $wgLang;
$userName = $row->user_name;
-
+
$ulinks = $this->getSkin()->userLink( $row->user_id, $userName );
$ulinks .= $this->getSkin()->userToolLinks( $row->user_id, $userName );
$list = array();
foreach( self::getGroups( $row->user_id ) as $group ) {
- if (isset($this->groups[$group]))
+ if ( isset( $this->groups[$group] ) ) {
return;
+ }
$list[] = self::buildGroupLink( $group );
}
$groups = $wgLang->commaList( $list );
$out .= Xml::checkLabel( wfMsg('activeusers-hidesysops'), 'hidesysops', 'hidesysops', $this->opts->getValue( 'hidesysops' ) ) . '<br />';
- $out .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n";# Submit button and form bottom
+ $out .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n";# Submit button and form bottom
$out .= Xml::closeElement( 'fieldset' );
$out .= Xml::closeElement( 'form' );
-
+
return $out;
}
}
/**
* Constructor
*/
- public function __construct() {
+ public function __construct() {
parent::__construct( 'Activeusers' );
}