Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -50,6 +50,7 @@ |
51 | 51 | $db = $this->getDB(); |
52 | 52 | $params = $this->extractRequestParams( false ); |
53 | 53 | $prop = array_flip( $params['prop'] ); |
| 54 | + $fld_parentid = isset( $prop['parentid'] ); |
54 | 55 | $fld_revid = isset( $prop['revid'] ); |
55 | 56 | $fld_user = isset( $prop['user'] ); |
56 | 57 | $fld_userid = isset( $prop['userid'] ); |
— | — | @@ -82,6 +83,10 @@ |
83 | 84 | $this->addTables( 'archive' ); |
84 | 85 | $this->addWhere( 'ar_deleted = 0' ); |
85 | 86 | $this->addFields( array( 'ar_title', 'ar_namespace', 'ar_timestamp' ) ); |
| 87 | + |
| 88 | + if ( $fld_parentid ) { |
| 89 | + $this->addFields( 'ar_parent_id' ); |
| 90 | + } |
86 | 91 | if ( $fld_revid ) { |
87 | 92 | $this->addFields( 'ar_rev_id' ); |
88 | 93 | } |
— | — | @@ -203,6 +208,9 @@ |
204 | 209 | if ( $fld_revid ) { |
205 | 210 | $rev['revid'] = intval( $row->ar_rev_id ); |
206 | 211 | } |
| 212 | + if ( $fld_parentid ) { |
| 213 | + $rev['parentid'] = intval( $row->ar_parent_id ); |
| 214 | + } |
207 | 215 | if ( $fld_user ) { |
208 | 216 | $rev['user'] = $row->ar_user_text; |
209 | 217 | } |
— | — | @@ -297,6 +305,7 @@ |
298 | 306 | ApiBase::PARAM_DFLT => 'user|comment', |
299 | 307 | ApiBase::PARAM_TYPE => array( |
300 | 308 | 'revid', |
| 309 | + 'parentid', |
301 | 310 | 'user', |
302 | 311 | 'userid', |
303 | 312 | 'comment', |
— | — | @@ -322,6 +331,7 @@ |
323 | 332 | 'prop' => array( |
324 | 333 | 'Which properties to get', |
325 | 334 | ' revid - Adds the revision ID of the deleted revision', |
| 335 | + ' parentid - Adds the revision ID of the previous revision to the page', |
326 | 336 | ' user - Adds the user who made the revision', |
327 | 337 | ' userid - Adds the user ID whom made the revision', |
328 | 338 | ' comment - Adds the comment of the revision', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -331,6 +331,7 @@ |
332 | 332 | * (bug 28364) add registration date to meta=userinfo |
333 | 333 | * (bug 28254) action=paraminfo: Extract type from PARAM_DFLT if |
334 | 334 | PARAM_TYPE is not set |
| 335 | +* (bug 27712) add parent_id to list=deletedrevs |
335 | 336 | |
336 | 337 | === Languages updated in 1.18 === |
337 | 338 | |