Index: trunk/extensions/FlaggedRevs/api/actions/ApiReviewActivity.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | $this->dieUsageMsg( array( 'blockedtext' ) ); |
45 | 45 | } |
46 | 46 | |
47 | | - $newRev = Revision::newFromId( $params['newid'] ); |
| 47 | + $newRev = Revision::newFromId( $params['oldid'] ); |
48 | 48 | if ( !$newRev || !$newRev->getTitle() ) { |
49 | 49 | $this->dieUsage( "Cannot find a revision with the specified ID.", 'notarget' ); |
50 | 50 | } |
— | — | @@ -55,19 +55,19 @@ |
56 | 56 | } |
57 | 57 | |
58 | 58 | $status = false; |
59 | | - if ( $params['oldid'] ) { // changes |
60 | | - $oldRev = Revision::newFromId( $params['oldid'] ); |
| 59 | + if ( $params['previd'] ) { // changes |
| 60 | + $oldRev = Revision::newFromId( $params['previd'] ); |
61 | 61 | if ( !$oldRev || $oldRev->getPage() != $newRev->getPage() ) { |
62 | 62 | $this->dieUsage( "Revisions do not belong to the same page.", 'notarget' ); |
63 | 63 | } |
64 | 64 | // Mark as reviewing... |
65 | 65 | if ( $params['reviewing'] ) { |
66 | 66 | $status = FRUserActivity::setUserReviewingDiff( |
67 | | - $wgUser, $params['oldid'], $params['newid'] ); |
| 67 | + $wgUser, $params['previd'], $params['oldid'] ); |
68 | 68 | // Unmark as reviewing... |
69 | 69 | } else { |
70 | 70 | $status = FRUserActivity::clearUserReviewingDiff( |
71 | | - $wgUser, $params['oldid'], $params['newid'] ); |
| 71 | + $wgUser, $params['previd'], $params['oldid'] ); |
72 | 72 | } |
73 | 73 | } else { |
74 | 74 | // Mark as reviewing... |
— | — | @@ -100,16 +100,16 @@ |
101 | 101 | |
102 | 102 | public function getAllowedParams() { |
103 | 103 | return array( |
104 | | - 'oldid' => null, |
105 | | - 'newid' => null, |
| 104 | + 'previd' => null, |
| 105 | + 'oldid' => null, |
106 | 106 | 'reviewing' => array( ApiBase::PARAM_TYPE => array( 0, 1 ) ) |
107 | 107 | ); |
108 | 108 | } |
109 | 109 | |
110 | 110 | public function getParamDescription() { |
111 | 111 | return array( |
112 | | - 'oldid' => 'The old revision ID (for reviewing changes or pages)', |
113 | | - 'newid' => 'The new revision ID (for reviewing changes only)', |
| 112 | + 'previd' => 'The prior revision ID (for reviewing changes only)', |
| 113 | + 'oldid' => 'The ID of the revision being reviewed', |
114 | 114 | 'reviewing' => 'Whether to advertising as reviewing or no longer reviewing', |
115 | 115 | ); |
116 | 116 | } |
Index: trunk/extensions/FlaggedRevs/presentation/modules/review.js |
— | — | @@ -336,13 +336,13 @@ |
337 | 337 | url : wgScriptPath + '/api.php', |
338 | 338 | data : { |
339 | 339 | action : 'reviewactivity', |
340 | | - oldid : oRevId, |
341 | | - newid : nRevId, |
| 340 | + previd : oRevId, |
| 341 | + oldid : nRevId, |
342 | 342 | reviewing : 0 |
343 | 343 | }, |
344 | 344 | type : "POST", |
345 | 345 | dataType: "html", // response type |
346 | | - timeout : 2500, // don't delay user exiting |
| 346 | + timeout : 2000, // don't delay user exiting |
347 | 347 | async : false |
348 | 348 | }); |
349 | 349 | } |