From: Matthew Britton Date: Wed, 31 Mar 2010 15:26:17 +0000 (+0000) Subject: (bug 22290) Inconsistent presence of "comment" field in prop=revisions versus list... X-Git-Tag: 1.31.0-rc.0~37288 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=6001a452700a7d47ff3b23a4b2498cfc4197b997;p=lhc%2Fweb%2Fwiklou.git (bug 22290) Inconsistent presence of "comment" field in prop=revisions versus list=recentchanges --- 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 ); } } }