From: Ariel T. Glenn Date: Wed, 3 Jul 2019 08:44:33 +0000 (+0300) Subject: Restore previous export behavior with respect to empty comment text X-Git-Tag: 1.34.0-rc.0~1190 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=6531479e7835a4d6ee4a30b8dbeae7806502ca91;p=lhc%2Fweb%2Fwiklou.git Restore previous export behavior with respect to empty comment text Bug: T174031 Change-Id: I0df1be8cb832e94ecda3db57b5fee5922a866aea --- diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php index bedfe133c7..f71b0d5278 100644 --- a/includes/export/XmlDumpWriter.php +++ b/includes/export/XmlDumpWriter.php @@ -337,9 +337,11 @@ class XmlDumpWriter { if ( $rev->isDeleted( Revision::DELETED_COMMENT ) ) { $out .= " " . Xml::element( 'comment', [ 'deleted' => 'deleted' ] ) . "\n"; } else { - $out .= " " - . Xml::elementClean( 'comment', [], strval( $rev->getComment()->text ) ) - . "\n"; + if ( $rev->getComment()->text != '' ) { + $out .= " " + . Xml::elementClean( 'comment', [], strval( $rev->getComment()->text ) ) + . "\n"; + } } $contentMode = $rev->isDeleted( Revision::DELETED_TEXT ) ? self::WRITE_STUB_DELETED