From 2c279262b378048c746e3462a4b97005557c22be Mon Sep 17 00:00:00 2001 From: burthsceh Date: Sun, 4 Nov 2012 16:39:03 +0900 Subject: [PATCH] (bug 42410) Add $pageObj->clear() for newtimestamp To return latest timestamp Change-Id: I1d28164d89917152d3f712817a125c8be36f390d --- RELEASE-NOTES-1.21 | 1 + includes/api/ApiEditPage.php | 1 + 2 files changed, 2 insertions(+) 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() ); } -- 2.20.1