From 6001a452700a7d47ff3b23a4b2498cfc4197b997 Mon Sep 17 00:00:00 2001 From: Matthew Britton Date: Wed, 31 Mar 2010 15:26:17 +0000 Subject: [PATCH] (bug 22290) Inconsistent presence of "comment" field in prop=revisions versus list=recentchanges --- RELEASE-NOTES | 6 ++++-- includes/api/ApiQueryRevisions.php | 17 ++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3efc3ab513..c06ffbd5f9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -70,13 +70,15 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 21520) Anonymous previews now also gives a warning about not being logged in (anonpreviewwarning). -== API changes in 1.17 == +=== API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent * (bug 22764) uselang parameter for action=parse * (bug 22944) API: watchlist options are inconsistent * (bug 22339) "Go" result should be available through the API * (bug 22868) don't list infinite block expiry date as "now" in API logevents - +* (bug 22290) Inconsistent presence of "comment" field in prop=revisions + versus list=recentchanges + === Languages updated in 1.17 === == Compatibility == diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 0f0beccdbb..f64964c0d2 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -392,15 +392,14 @@ class ApiQueryRevisions extends ApiQueryBase { $vals['commenthidden'] = ''; } else { $comment = $revision->getComment(); - if ( strval( $comment ) !== '' ) { - if ( $this->fld_comment ) { - $vals['comment'] = $comment; - } - - if ( $this->fld_parsedcomment ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $comment, $title ); - } + + if ( $this->fld_comment ) { + $vals['comment'] = $comment; + } + + if ( $this->fld_parsedcomment ) { + global $wgUser; + $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $comment, $title ); } } } -- 2.20.1