Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -141,6 +141,7 @@ |
142 | 142 | // We're after the revision table, and the corresponding page |
143 | 143 | // row for anything we retrieve. We may also need the |
144 | 144 | // recentchanges row. |
| 145 | + global $wgUser; |
145 | 146 | $tables = array('page', 'revision'); // Order may change |
146 | 147 | $this->addWhere('page_id=rev_page'); |
147 | 148 | |
— | — | @@ -159,7 +160,8 @@ |
160 | 161 | "rev_timestamp $op= '$encTS')"); |
161 | 162 | } |
162 | 163 | |
163 | | - $this->addWhereFld('rev_deleted', 0); |
| 164 | + if(!$wgUser->isAllowed('hideuser')) |
| 165 | + $this->addWhereFld('rev_deleted & ' . Revision::DELETED_USER . ' = 0'); |
164 | 166 | // We only want pages by the specified users. |
165 | 167 | if($this->prefixMode) |
166 | 168 | $this->addWhere("rev_user_text LIKE '" . $this->getDB()->escapeLike($this->userprefix) . "%'"); |
— | — | @@ -197,6 +199,7 @@ |
198 | 200 | 'page_namespace', |
199 | 201 | 'page_title', |
200 | 202 | 'rev_user_text', |
| 203 | + 'rev_deleted' |
201 | 204 | )); |
202 | 205 | |
203 | 206 | if(isset($show['patrolled']) || isset($show['!patrolled']) || |
— | — | @@ -250,6 +253,8 @@ |
251 | 254 | $vals = array(); |
252 | 255 | |
253 | 256 | $vals['user'] = $row->rev_user_text; |
| 257 | + if ($row->rev_deleted & Revision::DELETED_USER) |
| 258 | + $vals['userhidden'] = ''; |
254 | 259 | if ($this->fld_ids) { |
255 | 260 | $vals['pageid'] = intval($row->rev_page); |
256 | 261 | $vals['revid'] = intval($row->rev_id); |
— | — | @@ -272,8 +277,12 @@ |
273 | 278 | $vals['top'] = ''; |
274 | 279 | } |
275 | 280 | |
276 | | - if ($this->fld_comment && isset($row->rev_comment)) |
277 | | - $vals['comment'] = $row->rev_comment; |
| 281 | + if ($this->fld_comment && isset($row->rev_comment)) { |
| 282 | + if ($row->rev_deleted & Revision::DELETED_COMMENT) |
| 283 | + $vals['commenthidden'] = ''; |
| 284 | + else |
| 285 | + $vals['comment'] = $row->rev_comment; |
| 286 | + } |
278 | 287 | |
279 | 288 | if ($this->fld_patrolled && $row->rc_patrolled) |
280 | 289 | $vals['patrolled'] = ''; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -415,6 +415,8 @@ |
416 | 416 | * (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied' |
417 | 417 | when the user is blocked |
418 | 418 | * (bug 18546) Added timestamp of new revision to action=edit output |
| 419 | +* (bug 18554) Also list hidden revisions in list=usercontribs for privileged |
| 420 | + users |
419 | 421 | |
420 | 422 | === Languages updated in 1.15 === |
421 | 423 | |