*/
class UsersPager extends AlphabeticPager {
+ /**
+ * @param $context IContextSource
+ * @param $par null|array
+ */
function __construct( IContextSource $context = null, $par = null ) {
if ( $context ) {
$this->setContext( $context );
parent::__construct();
}
+ /**
+ * @return string
+ */
function getIndexField() {
return $this->creationSort ? 'user_id' : 'user_name';
}
+ /**
+ * @return Array
+ */
function getQueryInfo() {
$dbr = wfGetDB( DB_SLAVE );
$conds = array();
return $query;
}
+ /**
+ * @param $row Object
+ * @return String
+ */
function formatRow( $row ) {
- if ($row->user_id == 0) #Bug 16487
+ if ( $row->user_id == 0 ) { #Bug 16487
return '';
+ }
$userName = $row->user_name;
$ulinks = Linker::userLink( $row->user_id, $userName );
$ulinks .= Linker::userToolLinks( $row->user_id, $userName );
- $userPage = Title::makeTitle( NS_USER, $row->user_name );
- $name = Linker::link( $userPage, htmlspecialchars( $userPage->getText() ) );
-
$lang = $this->getLanguage();
$groups_list = self::getGroups( $row->user_id );
$this->mResult->rewind();
}
+ /**
+ * @return string
+ */
function getPageHeader( ) {
global $wgScript;
- // @todo Add a PrefixedBaseDBKey
+
list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
# Form tag
*/
function getDefaultQuery() {
$query = parent::getDefaultQuery();
- if( $this->requestedGroup != '' )
+ if( $this->requestedGroup != '' ) {
$query['group'] = $this->requestedGroup;
- if( $this->requestedUser != '' )
+ }
+ if( $this->requestedUser != '' ) {
$query['username'] = $this->requestedUser;
+ }
wfRunHooks( 'SpecialListusersDefaultQuery', array( $this, &$query ) );
return $query;
}