Merge "(bug 38556) Add header and footer messages to MediaWiki's info action"
[lhc/web/wiklou.git] / includes / Export.php
index 36d98d6..f01fb23 100644 (file)
@@ -58,6 +58,14 @@ class WikiExporter {
         */
        var $sink;
 
+       /**
+        * Returns the export schema version.
+        * @return string
+        */
+       public static function schemaVersion() {
+               return "0.7";
+       }
+
        /**
         * If using WikiExporter::STREAM to stream a large amount of data,
         * provide a database connection which is not managed by
@@ -465,14 +473,16 @@ class WikiExporter {
 class XmlDumpWriter {
        /**
         * Returns the export schema version.
+        * @deprecated in 1.20; use WikiExporter::schemaVersion() instead
         * @return string
         */
        function schemaVersion() {
-               return "0.7";
+               wfDeprecated( __METHOD__, '1.20' );
+               return WikiExporter::schemaVersion();
        }
 
        /**
-        * Opens the XML output stream's root <mediawiki> element.
+        * Opens the XML output stream's root "<mediawiki>" element.
         * This does not include an xml directive, so is safe to include
         * as a subelement in a larger XML stream. Namespace and XML Schema
         * references are included.
@@ -483,7 +493,7 @@ class XmlDumpWriter {
         */
        function openStream() {
                global $wgLanguageCode;
-               $ver = $this->schemaVersion();
+               $ver = WikiExporter::schemaVersion();
                return Xml::element( 'mediawiki', array(
                        'xmlns'              => "http://www.mediawiki.org/xml/export-$ver/",
                        'xmlns:xsi'          => "http://www.w3.org/2001/XMLSchema-instance",
@@ -572,7 +582,7 @@ class XmlDumpWriter {
        }
 
        /**
-        * Opens a <page> section on the output stream, with data
+        * Opens a "<page>" section on the output stream, with data
         * from the given database row.
         *
         * @param $row object
@@ -604,7 +614,7 @@ class XmlDumpWriter {
        }
 
        /**
-        * Closes a <page> section on the output stream.
+        * Closes a "<page>" section on the output stream.
         *
         * @access private
         * @return string
@@ -614,7 +624,7 @@ class XmlDumpWriter {
        }
 
        /**
-        * Dumps a <revision> section on the output stream, with
+        * Dumps a "<revision>" section on the output stream, with
         * data filled in from the given database row.
         *
         * @param $row object
@@ -678,7 +688,7 @@ class XmlDumpWriter {
        }
 
        /**
-        * Dumps a <logitem> section on the output stream, with
+        * Dumps a "<logitem>" section on the output stream, with
         * data filled in from the given database row.
         *
         * @param $row object
@@ -726,6 +736,7 @@ class XmlDumpWriter {
 
        /**
         * @param $timestamp string
+        * @param $indent string Default to six spaces
         * @return string
         */
        function writeTimestamp( $timestamp, $indent = "      " ) {
@@ -736,6 +747,7 @@ class XmlDumpWriter {
        /**
         * @param $id
         * @param $text string
+        * @param $indent string Default to six spaces
         * @return string
         */
        function writeContributor( $id, $text, $indent = "      " ) {
@@ -815,7 +827,7 @@ class XmlDumpWriter {
         * Return prefixed text form of title, but using the content language's
         * canonical namespace. This skips any special-casing such as gendered
         * user namespaces -- which while useful, are not yet listed in the
-        * XML <siteinfo> data so are unsafe in export.
+        * XML "<siteinfo>" data so are unsafe in export.
         *
         * @param Title $title
         * @return string