Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | $prop = array_flip( $params['prop'] ); |
54 | 54 | $fld_revid = isset( $prop['revid'] ); |
55 | 55 | $fld_user = isset( $prop['user'] ); |
| 56 | + $fld_userid = isset( $prop['userid'] ); |
56 | 57 | $fld_comment = isset( $prop['comment'] ); |
57 | 58 | $fld_parsedcomment = isset ( $prop['parsedcomment'] ); |
58 | 59 | $fld_minor = isset( $prop['minor'] ); |
— | — | @@ -87,6 +88,9 @@ |
88 | 89 | if ( $fld_user ) { |
89 | 90 | $this->addFields( 'ar_user_text' ); |
90 | 91 | } |
| 92 | + if ( $fld_userid ) { |
| 93 | + $this->addFields( 'ar_user' ); |
| 94 | + } |
91 | 95 | if ( $fld_comment || $fld_parsedcomment ) { |
92 | 96 | $this->addFields( 'ar_comment' ); |
93 | 97 | } |
— | — | @@ -202,6 +206,9 @@ |
203 | 207 | if ( $fld_user ) { |
204 | 208 | $rev['user'] = $row->ar_user_text; |
205 | 209 | } |
| 210 | + if ( $fld_userid ) { |
| 211 | + $rev['userid'] = $row->ar_user; |
| 212 | + } |
206 | 213 | if ( $fld_comment ) { |
207 | 214 | $rev['comment'] = $row->ar_comment; |
208 | 215 | } |
— | — | @@ -290,6 +297,7 @@ |
291 | 298 | ApiBase::PARAM_TYPE => array( |
292 | 299 | 'revid', |
293 | 300 | 'user', |
| 301 | + 'userid', |
294 | 302 | 'comment', |
295 | 303 | 'parsedcomment', |
296 | 304 | 'minor', |
— | — | @@ -311,7 +319,8 @@ |
312 | 320 | 'prop' => array( |
313 | 321 | 'Which properties to get', |
314 | 322 | ' revid - Adds the revision id of the deleted revision', |
315 | | - ' user - Adds user who made the revision', |
| 323 | + ' user - Adds the user who made the revision', |
| 324 | + ' userid - Adds the user id whom made the revision', |
316 | 325 | ' comment - Adds the comment of the revision', |
317 | 326 | ' parsedcomment - Adds the parsed comment of the revision', |
318 | 327 | ' minor - Tags if the revision is minor', |
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | $this->fld_type = isset( $prop['type'] ); |
53 | 53 | $this->fld_action = isset ( $prop['action'] ); |
54 | 54 | $this->fld_user = isset( $prop['user'] ); |
| 55 | + $this->fld_userid = isset( $prop['userid'] ); |
55 | 56 | $this->fld_timestamp = isset( $prop['timestamp'] ); |
56 | 57 | $this->fld_comment = isset( $prop['comment'] ); |
57 | 58 | $this->fld_parsedcomment = isset ( $prop['parsedcomment'] ); |
— | — | @@ -84,6 +85,7 @@ |
85 | 86 | $this->addFieldsIf( 'page_id', $this->fld_ids ); |
86 | 87 | $this->addFieldsIf( 'log_user', $this->fld_user ); |
87 | 88 | $this->addFieldsIf( 'user_name', $this->fld_user ); |
| 89 | + $this->addFieldsIf( 'user_id', $this->fld_userid ); |
88 | 90 | $this->addFieldsIf( 'log_namespace', $this->fld_title || $this->fld_parsedcomment ); |
89 | 91 | $this->addFieldsIf( 'log_title', $this->fld_title || $this->fld_parsedcomment ); |
90 | 92 | $this->addFieldsIf( 'log_comment', $this->fld_comment || $this->fld_parsedcomment ); |
— | — | @@ -259,11 +261,17 @@ |
260 | 262 | } |
261 | 263 | } |
262 | 264 | |
263 | | - if ( $this->fld_user ) { |
| 265 | + if ( $this->fld_user || $this->fld_userid ) { |
264 | 266 | if ( LogEventsList::isDeleted( $row, LogPage::DELETED_USER ) ) { |
265 | 267 | $vals['userhidden'] = ''; |
266 | 268 | } else { |
267 | | - $vals['user'] = $row->user_name; |
| 269 | + if ( $this->fld_user ) { |
| 270 | + $vals['user'] = $row->user_name; |
| 271 | + } |
| 272 | + if ( $this->fld_userid ) { |
| 273 | + $vals['userid'] = $row->user_id; |
| 274 | + } |
| 275 | + |
268 | 276 | if ( !$row->log_user ) { |
269 | 277 | $vals['anon'] = ''; |
270 | 278 | } |