Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -100,8 +100,11 @@ |
101 | 101 | $reqArr['wpEdittime'] = wfTimestamp(TS_MW, $params['basetimestamp']); |
102 | 102 | else |
103 | 103 | $reqArr['wpEdittime'] = $articleObj->getTimestamp(); |
104 | | - # Fake wpStartime |
105 | | - $reqArr['wpStarttime'] = $reqArr['wpEdittime']; |
| 104 | + if(!is_null($params['starttimestamp']) && $params['starttimestamp'] != '') |
| 105 | + $reqArr['wpStarttime'] = wfTimestamp(TS_MW, $params['starttimestamp']); |
| 106 | + else |
| 107 | + # Fake wpStartime |
| 108 | + $reqArr['wpStarttime'] = $reqArr['wpEdittime']; |
106 | 109 | if($params['minor'] || (!$params['notminor'] && $wgUser->getOption('minordefault'))) |
107 | 110 | $reqArr['wpMinoredit'] = ''; |
108 | 111 | if($params['recreate']) |
— | — | @@ -253,6 +256,7 @@ |
254 | 257 | 'notminor' => false, |
255 | 258 | 'bot' => false, |
256 | 259 | 'basetimestamp' => null, |
| 260 | + 'starttimestamp' => null, |
257 | 261 | 'recreate' => false, |
258 | 262 | 'createonly' => false, |
259 | 263 | 'nocreate' => false, |
— | — | @@ -279,6 +283,9 @@ |
280 | 284 | 'basetimestamp' => array('Timestamp of the base revision (gotten through prop=revisions&rvprop=timestamp).', |
281 | 285 | 'Used to detect edit conflicts; leave unset to ignore conflicts.' |
282 | 286 | ), |
| 287 | + 'starttimestamp' => array('Timestamp when you obtained the edit token.', |
| 288 | + 'Used to detect edit conflicts; leave unset to ignore conflicts.' |
| 289 | + ), |
283 | 290 | 'recreate' => 'Override any errors about the article having been deleted in the meantime', |
284 | 291 | 'createonly' => 'Don\'t edit the page if it exists already', |
285 | 292 | 'nocreate' => 'Throw an error if the page doesn\'t exist', |
Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -403,6 +403,7 @@ |
404 | 404 | |
405 | 405 | if (!is_null($params['token'])) { |
406 | 406 | $tokenFunctions = $this->getTokenFunctions(); |
| 407 | + $pageInfo['starttimestamp'] = wfTimestamp(TS_ISO_8601, time()); |
407 | 408 | foreach($params['token'] as $t) |
408 | 409 | { |
409 | 410 | $val = call_user_func($tokenFunctions[$t], $pageid, $title); |
— | — | @@ -475,6 +476,7 @@ |
476 | 477 | if(!is_null($params['token'])) |
477 | 478 | { |
478 | 479 | $tokenFunctions = $this->getTokenFunctions(); |
| 480 | + $res['query']['pages'][$pageid]['starttimestamp'] = wfTimestamp(TS_ISO_8601, time()); |
479 | 481 | foreach($params['token'] as $t) |
480 | 482 | { |
481 | 483 | $val = call_user_func($tokenFunctions[$t], $pageid, $title); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -291,6 +291,8 @@ |
292 | 292 | be disabled in LocalSettings.php |
293 | 293 | * (bug 15653) Add prop=duplicatefiles |
294 | 294 | * (bug 15768) Add list=watchlistraw |
| 295 | +* (bug 15647) action=edit with basetimestamp fails if the page has been deleted |
| 296 | + and undeleted since the last edit |
295 | 297 | |
296 | 298 | === Languages updated in 1.14 === |
297 | 299 | |