Fix classic skins sent as application/xhtml+xml (bug 1480); also stop xml:lang being...
authorTom Gilder <tomgilder@users.mediawiki.org>
Mon, 7 Feb 2005 14:03:02 +0000 (14:03 +0000)
committerTom Gilder <tomgilder@users.mediawiki.org>
Mon, 7 Feb 2005 14:03:02 +0000 (14:03 +0000)
includes/OutputPage.php

index 42c981f..96543ba 100644 (file)
@@ -729,7 +729,7 @@ class OutputPage {
                global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
                global $wgUser, $wgContLang, $wgRequest;
 
-               $xml = ($wgMimeType == 'text/xml');
+               $xml = ($wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml');
                if( $xml ) {
                        $ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
                } else {
@@ -742,7 +742,7 @@ class OutputPage {
                        $this->mHTMLtitle = wfMsg( "pagetitle", $this->mPagetitle );
                }
                if( $xml ) {
-                       $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"";
+                       $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"$wgContLanguageCode\"";
                } else {
                        $xmlbits = '';
                }