X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fexport%2FXmlDumpWriter.php;h=c46eb61ca36d3d757e27303d969012663bea1f0e;hp=5a1f92c4cc43c1fb16ffbd9460a023a07c2f09e0;hb=7a836958be6a698a61eef4d166d9fecd7a909e8d;hpb=bff08bb43949f24cb30eefc4acb972634aa621a8 diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php index 5a1f92c4cc..c46eb61ca3 100644 --- a/includes/export/XmlDumpWriter.php +++ b/includes/export/XmlDumpWriter.php @@ -199,7 +199,6 @@ class XmlDumpWriter { * @access private */ function writeRevision( $row ) { - $out = " \n"; $out .= " " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n"; if ( isset( $row->rev_parent_id ) && $row->rev_parent_id ) { @@ -219,8 +218,11 @@ class XmlDumpWriter { } if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_COMMENT ) ) { $out .= " " . Xml::element( 'comment', [ 'deleted' => 'deleted' ] ) . "\n"; - } elseif ( $row->rev_comment != '' ) { - $out .= " " . Xml::elementClean( 'comment', [], strval( $row->rev_comment ) ) . "\n"; + } else { + $comment = CommentStore::newKey( 'rev_comment' )->getComment( $row )->text; + if ( $comment != '' ) { + $out .= " " . Xml::elementClean( 'comment', [], strval( $comment ) ) . "\n"; + } } if ( isset( $row->rev_content_model ) && !is_null( $row->rev_content_model ) ) { @@ -287,7 +289,6 @@ class XmlDumpWriter { * @access private */ function writeLogItem( $row ) { - $out = " \n"; $out .= " " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n"; @@ -301,8 +302,11 @@ class XmlDumpWriter { if ( $row->log_deleted & LogPage::DELETED_COMMENT ) { $out .= " " . Xml::element( 'comment', [ 'deleted' => 'deleted' ] ) . "\n"; - } elseif ( $row->log_comment != '' ) { - $out .= " " . Xml::elementClean( 'comment', null, strval( $row->log_comment ) ) . "\n"; + } else { + $comment = CommentStore::newKey( 'log_comment' )->getComment( $row )->text; + if ( $comment != '' ) { + $out .= " " . Xml::elementClean( 'comment', null, strval( $comment ) ) . "\n"; + } } $out .= " " . Xml::element( 'type', null, strval( $row->log_type ) ) . "\n"; @@ -399,7 +403,7 @@ class XmlDumpWriter { if ( $file->isDeleted( File::DELETED_COMMENT ) ) { $comment = Xml::element( 'comment', [ 'deleted' => 'deleted' ] ); } else { - $comment = Xml::elementClean( 'comment', null, $file->getDescription() ); + $comment = Xml::elementClean( 'comment', null, strval( $file->getDescription() ) ); } return " \n" . $this->writeTimestamp( $file->getTimestamp() ) .