(bug 18531) Show hidden users on listusers for oversights
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 30 Jul 2009 18:27:56 +0000 (18:27 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 30 Jul 2009 18:27:56 +0000 (18:27 +0000)
includes/specials/SpecialListusers.php

index d39ea40..c00687a 100644 (file)
@@ -71,10 +71,12 @@ class UsersPager extends AlphabeticPager {
        }
 
        function getQueryInfo() {
+               global $wgUser;
                $dbr = wfGetDB( DB_SLAVE );
                $conds = array();
                // Don't show hidden names
-               $conds[] = 'ipb_deleted IS NULL';
+               if( !$wgUser->isAllowed('hideuser') )
+                       $conds[] = 'ipb_deleted IS NULL';
                if( $this->requestedGroup != '' ) {
                        $conds['ug_group'] = $this->requestedGroup;
                        $useIndex = '';
@@ -103,8 +105,10 @@ class UsersPager extends AlphabeticPager {
                                $this->creationSort ? 'user_id' : 'MAX(user_id) AS user_id',
                                'MAX(user_editcount) AS edits',
                                'COUNT(ug_group) AS numgroups',
-                               'MAX(ug_group) AS singlegroup',
-                               'MIN(user_registration) AS creation'),
+                               'MAX(ug_group) AS singlegroup', // the usergroup if there is only one
+                               'MIN(user_registration) AS creation',
+                               'ipb_deleted' // block/hide status
+                       ),
                        'options' => array('GROUP BY' => $this->creationSort ? 'user_id' : 'user_name'),
                        'conds' => $conds
                );
@@ -131,6 +135,9 @@ class UsersPager extends AlphabeticPager {
                }
 
                $item = wfSpecialList( $name, $groups );
+               if( $row->ipb_deleted ) {
+                       $item = "<span class=\"deleted\">$item</span>";
+               }
 
                global $wgEdititis;
                if ( $wgEdititis ) {