r83403 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83402‎ | r83403 | r83404 >
Date:20:51, 6 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r83390

If the user is allowed to view hidden users, put a missing property on all users.

For list=users, do the same, but we can't easily distinguish to other people the difference between "hidden", or "missing", so no reason to do it
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryAllUsers.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -483,6 +483,8 @@
484484 'ipblocks' => array( 'LEFT JOIN', 'ipb_user=user_id' ),
485485 ) );
486486
 487+ $this->addFields( 'ipb_deleted' );
 488+
487489 if ( $showBlockInfo ) {
488490 $this->addFields( array( 'ipb_reason', 'ipb_by_text', 'ipb_expiry' ) );
489491 }
Index: trunk/phase3/includes/api/ApiQueryAllUsers.php
@@ -177,6 +177,9 @@
178178 $lastUserData['blockreason'] = $row->ipb_reason;
179179 $lastUserData['blockexpiry'] = $row->ipb_expiry;
180180 }
 181+ if ( $row->ipb_deleted ) {
 182+ $lastUserData['hidden'] = '';
 183+ }
181184 if ( $fld_editcount ) {
182185 $lastUserData['editcount'] = intval( $row->user_editcount );
183186 }
Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -161,7 +161,9 @@
162162 User::getGroupPermissions( array( $row->ug_group ) ) ) );
163163 $result->setIndexedTagName( $data[$name]['rights'], 'r' );
164164 }
165 -
 165+ if ( $row->ipb_deleted ) {
 166+ $data[$name]['hidden'] = '';
 167+ }
166168 if ( isset( $this->prop['blockinfo'] ) && !is_null( $row->ipb_by_text ) ) {
167169 $data[$name]['blockedby'] = $row->ipb_by_text;
168170 $data[$name]['blockreason'] = $row->ipb_reason;

Follow-up revisions

RevisionCommit summaryAuthorDate
r834871.17wmf1: MFT r82696, r83270, r83284, r83374, r83390, r83392, r83402, r83403,...catrope21:44, 7 March 2011
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83390* (bug 27897) list=allusers and list=users list hidden users...reedy17:59, 6 March 2011

Status & tagging log