Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -53,6 +53,7 @@ |
54 | 54 | $this->fld_ids = isset($prop['ids']); |
55 | 55 | $this->fld_title = isset($prop['title']); |
56 | 56 | $this->fld_comment = isset($prop['comment']); |
| 57 | + $this->fld_size = isset($prop['size']); |
57 | 58 | $this->fld_flags = isset($prop['flags']); |
58 | 59 | $this->fld_timestamp = isset($prop['timestamp']); |
59 | 60 | $this->fld_patrolled = isset($prop['patrolled']); |
— | — | @@ -161,7 +162,7 @@ |
162 | 163 | } |
163 | 164 | |
164 | 165 | if(!$wgUser->isAllowed('hideuser')) |
165 | | - $this->addWhereFld('rev_deleted & ' . Revision::DELETED_USER . ' = 0'); |
| 166 | + $this->addWhere('rev_deleted & ' . Revision::DELETED_USER . ' = 0'); |
166 | 167 | // We only want pages by the specified users. |
167 | 168 | if($this->prefixMode) |
168 | 169 | $this->addWhere("rev_user_text LIKE '" . $this->getDB()->escapeLike($this->userprefix) . "%'"); |
— | — | @@ -240,6 +241,7 @@ |
241 | 242 | $this->addFieldsIf('page_latest', $this->fld_flags); |
242 | 243 | // $this->addFieldsIf('rev_text_id', $this->fld_ids); // Should this field be exposed? |
243 | 244 | $this->addFieldsIf('rev_comment', $this->fld_comment); |
| 245 | + $this->addFieldsIf('rev_len', $this->fld_size); |
244 | 246 | $this->addFieldsIf('rev_minor_edit', $this->fld_flags); |
245 | 247 | $this->addFieldsIf('rev_parent_id', $this->fld_flags); |
246 | 248 | $this->addFieldsIf('rc_patrolled', $this->fld_patrolled); |
— | — | @@ -286,6 +288,9 @@ |
287 | 289 | |
288 | 290 | if ($this->fld_patrolled && $row->rc_patrolled) |
289 | 291 | $vals['patrolled'] = ''; |
| 292 | + |
| 293 | + if ($this->fld_size ) |
| 294 | + $vals['size'] = intval($row->rev_len); |
290 | 295 | |
291 | 296 | return $vals; |
292 | 297 | } |
— | — | @@ -329,12 +334,13 @@ |
330 | 335 | ), |
331 | 336 | 'prop' => array ( |
332 | 337 | ApiBase :: PARAM_ISMULTI => true, |
333 | | - ApiBase :: PARAM_DFLT => 'ids|title|timestamp|flags|comment', |
| 338 | + ApiBase :: PARAM_DFLT => 'ids|title|timestamp|comment|size|flags', |
334 | 339 | ApiBase :: PARAM_TYPE => array ( |
335 | 340 | 'ids', |
336 | 341 | 'title', |
337 | 342 | 'timestamp', |
338 | 343 | 'comment', |
| 344 | + 'size', |
339 | 345 | 'flags', |
340 | 346 | 'patrolled', |
341 | 347 | ) |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -137,6 +137,7 @@ |
138 | 138 | output |
139 | 139 | * (bug 18731) Show correct SVN links for extension modules in api.php?version |
140 | 140 | * (bug 18730) Add version information to action=paraminfo output |
| 141 | +* (bug 18743) Add ucprop=size to list=usercontribs |
141 | 142 | |
142 | 143 | === Languages updated in 1.16 === |
143 | 144 | |