Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | } |
51 | 51 | |
52 | 52 | private $fld_ids = false, $fld_title = false, $fld_patrol = false, $fld_flags = false, |
53 | | - $fld_timestamp = false, $fld_user = false, $fld_comment = false; |
| 53 | + $fld_timestamp = false, $fld_user = false, $fld_comment = false, $fld_sizes = false; |
54 | 54 | |
55 | 55 | private function run($resultPageSet = null) { |
56 | 56 | global $wgUser, $wgDBtype; |
— | — | @@ -72,6 +72,7 @@ |
73 | 73 | $this->fld_user = isset($prop['user']); |
74 | 74 | $this->fld_comment = isset($prop['comment']); |
75 | 75 | $this->fld_timestamp = isset($prop['timestamp']); |
| 76 | + $this->fld_sizes = isset($prop['sizes']); |
76 | 77 | $this->fld_patrol = isset($prop['patrol']); |
77 | 78 | |
78 | 79 | if ($this->fld_patrol) { |
— | — | @@ -96,6 +97,8 @@ |
97 | 98 | $this->addFieldsIf('rc_user_text', $this->fld_user); |
98 | 99 | $this->addFieldsIf('rc_comment', $this->fld_comment); |
99 | 100 | $this->addFieldsIf('rc_patrolled', $this->fld_patrol); |
| 101 | + $this->addFieldsIf('rc_old_len', $this->fld_sizes); |
| 102 | + $this->addFieldsIf('rc_new_len', $this->fld_sizes); |
100 | 103 | } |
101 | 104 | elseif ($allrev) { |
102 | 105 | $this->addFields(array ( |
— | — | @@ -214,6 +217,13 @@ |
215 | 218 | if ($this->fld_timestamp) |
216 | 219 | $vals['timestamp'] = wfTimestamp(TS_ISO_8601, $row->rc_timestamp); |
217 | 220 | |
| 221 | + $this->addFieldsIf('rc_new_len', $this->fld_sizes); |
| 222 | + |
| 223 | + if ($this->fld_sizes) { |
| 224 | + $vals['oldlen'] = intval($row->rc_old_len); |
| 225 | + $vals['newlen'] = intval($row->rc_new_len); |
| 226 | + } |
| 227 | + |
218 | 228 | if ($this->fld_comment && !empty ($row->rc_comment)) |
219 | 229 | $vals['comment'] = $row->rc_comment; |
220 | 230 | |
— | — | @@ -257,7 +267,8 @@ |
258 | 268 | 'user', |
259 | 269 | 'comment', |
260 | 270 | 'timestamp', |
261 | | - 'patrol' |
| 271 | + 'patrol', |
| 272 | + 'sizes', |
262 | 273 | ) |
263 | 274 | ) |
264 | 275 | ); |