From 0635eeb4c40d74a2a41766c229b98090e8a7cd99 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 19 Jan 2009 15:23:12 +0000 Subject: [PATCH] API: (bug 17048) Show the 'new' flag in list=usercontribs for the revision that created the page, even if it's not the top revision --- RELEASE-NOTES | 2 ++ includes/api/ApiQueryUserContributions.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fef2c84c0c..6b1957bd64 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -64,6 +64,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 16844) Added clcategories parameter to prop=categories * (bug 17025) Added siprop=fileextension to meta=siteinfo * (bug 17027) Added siprop=configvars to meta=siteinfo +* (bug 17048) Show the 'new' flag in list=usercontribs for the revision that created the + page, even if it's not the top revision === Languages updated in 1.15 === diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 96ce8511d5..e787dd4745 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -195,7 +195,7 @@ class ApiQueryContributions extends ApiQueryBase { // $this->addFieldsIf('rev_text_id', $this->fld_ids); // Should this field be exposed? $this->addFieldsIf('rev_comment', $this->fld_comment); $this->addFieldsIf('rev_minor_edit', $this->fld_flags); - $this->addFieldsIf('page_is_new', $this->fld_flags); + $this->addFieldsIf('rev_parent_id', $this->fld_flags); } /** @@ -220,7 +220,7 @@ class ApiQueryContributions extends ApiQueryBase { $vals['timestamp'] = wfTimestamp(TS_ISO_8601, $row->rev_timestamp); if ($this->fld_flags) { - if ($row->page_is_new) + if ($row->rev_parent_id == 0) $vals['new'] = ''; if ($row->rev_minor_edit) $vals['minor'] = ''; -- 2.20.1