API: (bug 17048) Show the 'new' flag in list=usercontribs for the revision that creat...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 19 Jan 2009 15:23:12 +0000 (15:23 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 19 Jan 2009 15:23:12 +0000 (15:23 +0000)
RELEASE-NOTES
includes/api/ApiQueryUserContributions.php

index fef2c84..6b1957b 100644 (file)
@@ -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 ===
 
index 96ce851..e787dd4 100644 (file)
@@ -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'] = '';