X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialActiveusers.php;h=994365edd3c879ec5bd1f2200869555d642f0f58;hb=bfa6a8a5b615ad30fd2ba2706d6394348920bd59;hp=c5aa23893dc3b2060f85e8105878e842f4f3cfa6;hpb=1a9b7b2238c4da398a06ac89fbe2cd418be42e6e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index c5aa23893d..994365edd3 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -93,7 +93,9 @@ class ActiveUsersPager extends UsersPager { function getQueryInfo() { $dbr = wfGetDB( DB_SLAVE ); $conds = array( 'rc_user > 0' ); // Users - no anons - $conds[] = 'ipb_deleted IS NULL'; // don't show hidden names + if( !$this->getUser()->isAllowed( 'hideuser' ) ) { + $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0'; // don't show hidden names + } $conds[] = 'rc_log_type IS NULL OR rc_log_type != ' . $dbr->addQuotes( 'newusers' ); $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge*24*3600 ) ); @@ -107,7 +109,7 @@ class ActiveUsersPager extends UsersPager { 'rc_user_text', // for Pager 'user_id', 'recentedits' => 'COUNT(*)', - 'blocked' => 'MAX(ipb_user)' + 'ipb_deleted' => 'MAX(ipb_deleted)' ), 'options' => array( 'GROUP BY' => array( 'rc_user_text', 'user_id' ), @@ -117,8 +119,7 @@ class ActiveUsersPager extends UsersPager { 'user' => array( 'INNER JOIN', 'rc_user_text=user_name' ), 'ipblocks' => array( 'LEFT JOIN', array( 'user_id=ipb_user', - 'ipb_auto' => 0, - 'ipb_deleted' => 1 + 'ipb_auto' => 0 )), ), 'conds' => $conds @@ -162,9 +163,12 @@ class ActiveUsersPager extends UsersPager { $groups = $lang->commaList( $list ); $item = $lang->specialList( $ulinks, $groups ); + if( $row->ipb_deleted ) { + $item = "$item"; + } $count = $this->msg( 'activeusers-count' )->numParams( $row->recentedits ) ->params( $userName )->numParams( $this->RCMaxAge )->escaped(); - $blocked = $row->blocked ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : ''; + $blocked = !is_null( $row->ipb_deleted ) ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : ''; return Html::rawElement( 'li', array(), "{$item} [{$count}]{$blocked}" ); }