From c1cb8854ee31467a5a72770564a06ab580dd841b Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 13 Apr 2009 10:48:11 +0000 Subject: [PATCH] API: Add parentid (rev_parent_id) to prop=revisions output, as requested by Luca --- RELEASE-NOTES | 5 +++-- includes/api/ApiQueryRevisions.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 11df4a7662..60f2bcf383 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 007e22446d..5f4bfb4b4e 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -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()) -- 2.20.1