* @return string
*/
function openStream() {
- global $wgLanguageCode;
+ global $wgContLang;
$ver = WikiExporter::schemaVersion();
return Xml::element( 'mediawiki', [
'xmlns' => "http://www.mediawiki.org/xml/export-$ver/",
* you copy in the new xsd file.
*
* After it is reviewed, merged and deployed (sync-docroot), the index.html needs purging.
- * echo "http://www.mediawiki.org/xml/index.html" | mwscript purgeList.php --wiki=aawiki
+ * echo "https://www.mediawiki.org/xml/index.html" | mwscript purgeList.php --wiki=aawiki
*/
'xsi:schemaLocation' => "http://www.mediawiki.org/xml/export-$ver/ " .
"http://www.mediawiki.org/xml/export-$ver.xsd",
'version' => $ver,
- 'xml:lang' => $wgLanguageCode ],
+ 'xml:lang' => $wgContLang->getHtmlCode() ],
null ) .
"\n" .
$this->siteInfo();
global $wgContLang;
$prefix = $wgContLang->getFormattedNsText( $title->getNamespace() );
+ // @todo Emit some kind of warning to the user if $title->getNamespace() !==
+ // NS_MAIN and $prefix === '' (viz. pages in an unregistered namespace)
+
if ( $prefix !== '' ) {
$prefix .= ':';
}