r82798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82797‎ | r82798 | r82799 >
Date:16:19, 25 February 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 27708) list=users does not have a property to return user id

Add userid to ApiQueryUsers

Move userid in ApiQueryAllUsers before name
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryAllUsers.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllUsers.php
@@ -175,8 +175,8 @@
176176 // Record new user's data
177177 $lastUser = $row->user_name;
178178 $lastUserData = array(
 179+ 'userid' => $row->user_id,
179180 'name' => $lastUser,
180 - 'userid' => $row->user_id,
181181 );
182182 if ( $fld_blockinfo && !is_null( $row->ipb_by_text ) ) {
183183 $lastUserData['blockedby'] = $row->ipb_by_text;
Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -135,6 +135,8 @@
136136 foreach ( $res as $row ) {
137137 $user = User::newFromRow( $row );
138138 $name = $user->getName();
 139+
 140+ $data[$name]['userid'] = $user->getId();
139141 $data[$name]['name'] = $name;
140142
141143 if ( isset( $this->prop['editcount'] ) ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -184,6 +184,7 @@
185185 * (bug 27611) list=blocks: Use ipb_by_text instead of join with user table
186186 * (bug 27616) Add userid of blocked user and blocker to list=blocks
187187 * (bug 27688) Simplify queries to list user block information
 188+* (bug 27708) list=users does not have a property to return user id
188189
189190 === Languages updated in 1.18 ===
190191

Status & tagging log