From 35208039c4765b0f7de71298715f9ff823b125c7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 23 Mar 2012 13:09:59 -0700 Subject: [PATCH] Put the sha1 tag in and not wrongly in Change 1: while at it, also don't show the SHA1 if rev_deleted is set Change-Id: I0d94338915e754bdee878d1e6570e2efc481b2b2 --- includes/Export.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index 35a1b5b51e..82aa9465aa 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -487,12 +487,6 @@ class XmlDumpWriter { } } - if ( $row->rev_sha1 ) { - $out .= " " . Xml::element('sha1', null, strval( $row->rev_sha1 ) ) . "\n"; - } else { - $out .= " \n"; - } - if ( $row->page_restrictions != '' ) { $out .= ' ' . Xml::element( 'restrictions', array(), strval( $row->page_restrictions ) ) . "\n"; @@ -560,6 +554,12 @@ class XmlDumpWriter { "" ) . "\n"; } + if ( $row->rev_sha1 && !( $row->rev_deleted & Revision::DELETED_TEXT ) ) { + $out .= " " . Xml::element('sha1', null, strval( $row->rev_sha1 ) ) . "\n"; + } else { + $out .= " \n"; + } + wfRunHooks( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) ); $out .= " \n"; -- 2.20.1