(bug 42410) Add $pageObj->clear() for newtimestamp
authorburthsceh <burthsceh@gmail.com>
Sun, 4 Nov 2012 07:39:03 +0000 (16:39 +0900)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 26 Nov 2012 14:20:40 +0000 (09:20 -0500)
To return latest timestamp

Change-Id: I1d28164d89917152d3f712817a125c8be36f390d

RELEASE-NOTES-1.21
includes/api/ApiEditPage.php

index a0035d5..c6ffa01 100644 (file)
@@ -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.
index 81b3ef2..cae4a21 100644 (file)
@@ -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() );
                                }