From: Diederik van Liere Date: Mon, 23 Jan 2012 19:48:20 +0000 (+0000) Subject: Add the new SHA1 revision field to the XML export, add SHA1 field to export-0.6.xsd... X-Git-Tag: 1.31.0-rc.0~25113 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=22746a580721d659d8bdabe00ffa639670497524;p=lhc%2Fweb%2Fwiklou.git Add the new SHA1 revision field to the XML export, add SHA1 field to export-0.6.xsd and fix namespace element from string to integer. --- diff --git a/docs/export-0.6.xsd b/docs/export-0.6.xsd index a225e5206c..55428b56fa 100644 --- a/docs/export-0.6.xsd +++ b/docs/export-0.6.xsd @@ -15,8 +15,8 @@ Version 0.5 adds byte count per revision. - Version 0.6 adds a separate namespace tag, locates the - redirect target and strips of the namespace from the title. + Version 0.6 adds a separate namespace tag, and resolves the + redirect target and adds a separate sha1 tag for each revision. The canonical URL to the schema document is: http://www.mediawiki.org/xml/export-0.6.xsd @@ -106,8 +106,8 @@ - - + + @@ -137,6 +137,7 @@ + diff --git a/includes/Export.php b/includes/Export.php index 695a7f707d..7773d03c29 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -486,6 +486,13 @@ class XmlDumpWriter { $out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n"; } } + + 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";