From 8bc7a1839292036d6142fbc17f6aa086c4504d6d Mon Sep 17 00:00:00 2001 From: Diederik van Liere Date: Thu, 12 Jan 2012 21:34:55 +0000 Subject: [PATCH] This commit restores getPrefixedText() to the Title in the XML. This means it does not break anything, the only change is that there is a new separate element that contains the namespace. This commit is a follow up to: r102575: Commit to fix bug 30513. --- includes/Export.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/Export.php b/includes/Export.php index 695a7f707d..e530b88a5b 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -476,7 +476,7 @@ class XmlDumpWriter { function openPage( $row ) { $out = " \n"; $title = Title::makeTitle( $row->page_namespace, $row->page_title ); - $out .= ' ' . Xml::elementClean( 'title', array(), self::canonicalTitle( $title ) ) . "\n"; + $out .= ' ' . Xml::elementClean( 'title', array(), $title->getPrefixedText() ) . "\n"; $out .= ' ' . Xml::element( 'ns', array(), strval( $row->page_namespace) ) . "\n"; $out .= ' ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n"; if ( $row->page_is_redirect ) { @@ -521,6 +521,12 @@ class XmlDumpWriter { $out .= $this->writeTimestamp( $row->rev_timestamp ); + if ( $row->rev_sha1 ) { + $out .= " " . Xml::element('sha1', null, strval($row->rev_sha1) ) . "\n"; + } else { + $out .= " \n"; + } + if ( $row->rev_deleted & Revision::DELETED_USER ) { $out .= " " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n"; } else { -- 2.20.1