From: burthsceh Date: Sun, 4 Nov 2012 07:39:03 +0000 (+0900) Subject: (bug 42410) Add $pageObj->clear() for newtimestamp X-Git-Tag: 1.31.0-rc.0~21519^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=2c279262b378048c746e3462a4b97005557c22be;p=lhc%2Fweb%2Fwiklou.git (bug 42410) Add $pageObj->clear() for newtimestamp To return latest timestamp Change-Id: I1d28164d89917152d3f712817a125c8be36f390d --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index a0035d5d54..c6ffa01af6 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -83,6 +83,7 @@ production. * (bug 42173) Removed namespace prefixes on Special:UncategorizedCategories. * (bug 36053) Log in "returnto" feature forgets query parameters if no title parameter was specified. +* (bug 42410) API action=edit now returns correct timestamp for the new edit. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt. diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index 81b3ef2fcb..cae4a21fb6 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -407,6 +407,7 @@ class ApiEditPage extends ApiBase { } else { $r['oldrevid'] = intval( $oldRevId ); $r['newrevid'] = intval( $newRevId ); + $pageObj->clear(); $r['newtimestamp'] = wfTimestamp( TS_ISO_8601, $pageObj->getTimestamp() ); }