From f2962d36cd7260fba2f4e21ffc51b54aa2b1ff6c Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Wed, 9 Jul 2008 11:44:49 +0000 Subject: [PATCH] * Added flag "top" to list=usercontribs if the user is the last contributor to the page * Limited API section in RELEASE-NOTES to 80 chars --- RELEASE-NOTES | 14 ++++++++++---- includes/api/ApiQueryUserContributions.php | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d8f9b386cf..8e0e7146a3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -460,7 +460,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Replaced $wgAPIUCUserPrefixMinLength by the more generic $wgAPIMaxDBRows * (bug 11719) Remove trailing blanks in YAML output. * (bug 13541) Added siprop=specialpagealiases to meta=siteinfo -* Added fallback8bitEncoding and readonly fields to meta=siteinfo&siprop=general output +* Added fallback8bitEncoding and readonly fields to + meta=siteinfo&siprop=general output * (bug 13544) Added prop=revid to action=parse * (bug 13603) Added siprop=usergroups to meta=siteinfo * Cleaned up redirect resolution @@ -471,7 +472,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12136) Extend allowed characters in JSON callback to ][.'"_A-Za-z0-9 * (bug 11673) Return error 'unknown_action' in specified format * (bug 13618) Added rcprop=redirect and rcshow=redirect to list=recentchanges -* (bug 13544) Added oldid parameter to action=parse to allow for parsing of old revisions +* (bug 13544) Added oldid parameter to action=parse to allow for parsing of old + revisions * (bug 13718) Return the proper continue parameter for cmsort=timestamp * action=login now returns the correct waiting time in the details property * (bug 13792) Broken titles are now silently skipped in search results. @@ -487,7 +489,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14013) Added rcshow=patrolled to list=recentchanges * (bug 14028) Added language attribute to interwiki map in meta=siteinfo * (bug 14022) Added usprop=registration and auprop=blockinfo -* (bug 14021) Removed titles= support from list=backlinks (has been obsolete for ages) +* (bug 14021) Removed titles= support from list=backlinks (has been obsolete + for ages) * (bug 13829) Expose parse tree via action=expandtemplates * (bug 13606) Allow deletion of images * Added iiprop=mime and aiprop=metadata @@ -508,13 +511,16 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added bkip parameter to list=blocks * (bug 14651) apprefix and similar parameters are now canonicalized * Added clprop=timestamp to prop=categories -* (bug 14678) API errors now respects $wgShowExceptionDetails and $wgShowSQLErrors +* (bug 14678) API errors now respects $wgShowExceptionDetails and + $wgShowSQLErrors * (bug 14723) Added time zone and writing direction to meta=siteinfo * Added APIQueryInfoTokens and APIQueryRevisionsTokens hooks so extensions can add their own tokens * Added block and unblock tokens to prop=info as well * Added paging (limit and continue parameters) to prop={links,templatelinks,langlinks,extlinks,categories,images} +* Added flag "top" to list=usercontribs if the user is the last contributor to + the page === Languages updated in 1.13 === diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 4ee636091c..966a047662 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -169,7 +169,8 @@ class ApiQueryContributions extends ApiQueryBase { )); $this->addFieldsIf('rev_page', $this->fld_ids); - $this->addFieldsIf('rev_id', $this->fld_ids); + $this->addFieldsIf('rev_id', $this->fld_ids || $this->fld_flags); + $this->addFieldsIf('page_latest', $this->fld_flags); // $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); @@ -202,6 +203,8 @@ class ApiQueryContributions extends ApiQueryBase { $vals['new'] = ''; if ($row->rev_minor_edit) $vals['minor'] = ''; + if ($row->page_latest == $row->rev_id) + $vals['top'] = ''; } if ($this->fld_comment && !empty ($row->rev_comment)) -- 2.20.1