API: Add parentid (rev_parent_id) to prop=revisions output, as requested by Luca
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 13 Apr 2009 10:48:11 +0000 (10:48 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 13 Apr 2009 10:48:11 +0000 (10:48 +0000)
RELEASE-NOTES
includes/api/ApiQueryRevisions.php

index 11df4a7..60f2bcf 100644 (file)
@@ -340,6 +340,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11381) session.save_handler being set twice (causes error)
 * (bug 17835) ForeignAPIRepo throwing error on first page load for file
 * (bug 18115) ForeignAPIRepo cache isn't working
+* Fixed a bug caused by LanguageConverter.php, which brings an abnormal '}-'
+  after some parsed math syntax.
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
@@ -393,8 +395,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added uiprop=changeablegroups to meta=userinfo
 * Added usprop=gender to list=users
 * (bug 18311) action=purge now works for images too
-* Fixed a bug caused by LanguageConverter.php, which brings an abnormal '}-'
-  after some parsed math syntax.
+* Add parentid to prop=revisions output
 
 === Languages updated in 1.15 ===
 
index 007e224..5f4bfb4 100644 (file)
@@ -317,6 +317,8 @@ class ApiQueryRevisions extends ApiQueryBase {
                if ($this->fld_ids) {
                        $vals['revid'] = intval($revision->getId());
                        // $vals['oldid'] = intval($row->rev_text_id);  // todo: should this be exposed?
+                       if (!is_null($revision->getParentId()))
+                               $vals['parentid'] = intval($revision->getParentId());
                }
 
                if ($this->fld_flags && $revision->isMinor())