(bug 22290) Inconsistent presence of "comment" field in prop=revisions versus list...
authorMatthew Britton <gurch@users.mediawiki.org>
Wed, 31 Mar 2010 15:26:17 +0000 (15:26 +0000)
committerMatthew Britton <gurch@users.mediawiki.org>
Wed, 31 Mar 2010 15:26:17 +0000 (15:26 +0000)
RELEASE-NOTES
includes/api/ApiQueryRevisions.php

index 3efc3ab..c06ffbd 100644 (file)
@@ -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 ==
index 0f0becc..f64964c 100644 (file)
@@ -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 );
                                }
                        }
                }