$exporter = new WikiExporter( $this->getDB() );
$sink = new DumpStringOutput;
$exporter->setOutputSink( $sink );
+ $exporter->setSchemaVersion( $this->mParams['exportschema'] );
$exporter->openStream();
foreach ( $exportTitles as $title ) {
$exporter->pageByTitle( $title );
'indexpageids' => false,
'export' => false,
'exportnowrap' => false,
+ 'exportschema' => [
+ ApiBase::PARAM_DFLT => WikiExporter::schemaVersion(),
+ ApiBase::PARAM_TYPE => XmlDumpWriter::$supportedSchemas,
+ ],
'iwurl' => false,
'continue' => [
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
"apihelp-query-param-indexpageids": "Include an additional pageids section listing all returned page IDs.",
"apihelp-query-param-export": "Export the current revisions of all given or generated pages.",
"apihelp-query-param-exportnowrap": "Return the export XML without wrapping it in an XML result (same format as [[Special:Export]]). Can only be used with $1export.",
+ "apihelp-query-param-exportschema": "Target the given version of the XML dump format when exporting. Can only be used with <var>$1export</var>.",
"apihelp-query-param-iwurl": "Whether to get the full URL if the title is an interwiki link.",
"apihelp-query-param-rawcontinue": "Return raw <samp>query-continue</samp> data for continuation.",
"apihelp-query-example-revisions": "Fetch [[Special:ApiHelp/query+siteinfo|site info]] and [[Special:ApiHelp/query+revisions|revisions]] of <kbd>Main Page</kbd>.",
"apihelp-query-param-indexpageids": "{{doc-apihelp-param|query|indexpageids}}",
"apihelp-query-param-export": "{{doc-apihelp-param|query|export}}",
"apihelp-query-param-exportnowrap": "{{doc-apihelp-param|query|exportnowrap}}",
+ "apihelp-query-param-exportschema": "{{doc-apihelp-param|query|exportschema}}",
"apihelp-query-param-iwurl": "{{doc-apihelp-param|query|iwurl}}",
"apihelp-query-param-rawcontinue": "{{doc-apihelp-param|query|rawcontinue}}",
"apihelp-query-example-revisions": "{{doc-apihelp-example|query}}",