Paired commit with 22402. Makes necessary schema additions for the extra parameter...
authorRobert Stojnić <rainman@users.mediawiki.org>
Thu, 24 May 2007 17:42:32 +0000 (17:42 +0000)
committerRobert Stojnić <rainman@users.mediawiki.org>
Thu, 24 May 2007 17:42:32 +0000 (17:42 +0000)
docs/export-0.3.xsd
includes/Export.php

index 1e0b7c8..71327f8 100644 (file)
@@ -92,6 +92,9 @@
                        
                        <!-- optional page ID number -->
                        <element name="id" type="positiveInteger" minOccurs="0"/>
+
+                       <!-- optional: number of pages that link to this page -->
+                       <element name="references" type="positiveInteger" minOccurs="0"/>
                        
                        <!-- comma-separated list of string tokens, if present -->
                        <element name="restrictions" type="string" minOccurs="0"/>
index 9307795..e9e210d 100644 (file)
@@ -384,6 +384,8 @@ class XmlDumpWriter {
                $title = Title::makeTitle( $row->page_namespace, $row->page_title );
                $out .= '    ' . wfElementClean( 'title', array(), $title->getPrefixedText() ) . "\n";
                $out .= '    ' . wfElement( 'id', array(), strval( $row->page_id ) ) . "\n";
+               if(isset($row->num_page_ref))
+                       $out .= '    ' . wfElement( 'references', array(), strval( $row->num_page_ref ) ) . "\n";
                if( '' != $row->page_restrictions ) {
                        $out .= '    ' . wfElement( 'restrictions', array(),
                                strval( $row->page_restrictions ) ) . "\n";