Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1737,22 +1737,24 @@ |
1738 | 1738 | $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n"; |
1739 | 1739 | } |
1740 | 1740 | |
| 1741 | + if ( '' == $this->getHTMLTitle() ) { |
| 1742 | + $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() )); |
| 1743 | + } |
| 1744 | + |
| 1745 | + $dir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; |
| 1746 | + |
1741 | 1747 | if ( $wgHtml5 ) { |
1742 | 1748 | $ret .= "<!doctype html>\n"; |
| 1749 | + $ret .= "<html lang=\"$wgContLanguageCode\" dir=\"$dir\">\n"; |
1743 | 1750 | } else { |
1744 | 1751 | $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\" \"$wgDTD\">\n"; |
| 1752 | + $ret .= "<html xmlns=\"{$wgXhtmlDefaultNamespace}\" "; |
| 1753 | + foreach($wgXhtmlNamespaces as $tag => $ns) { |
| 1754 | + $ret .= "xmlns:{$tag}=\"{$ns}\" "; |
| 1755 | + } |
| 1756 | + $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n"; |
1745 | 1757 | } |
1746 | 1758 | |
1747 | | - if ( '' == $this->getHTMLTitle() ) { |
1748 | | - $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() )); |
1749 | | - } |
1750 | | - |
1751 | | - $dir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; |
1752 | | - $ret .= "<html xmlns=\"{$wgXhtmlDefaultNamespace}\" "; |
1753 | | - foreach($wgXhtmlNamespaces as $tag => $ns) { |
1754 | | - $ret .= "xmlns:{$tag}=\"{$ns}\" "; |
1755 | | - } |
1756 | | - $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n"; |
1757 | 1759 | $ret .= "<head>\n\t<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n\t"; |
1758 | 1760 | $ret .= implode( "\n", array( |
1759 | 1761 | $this->getHeadLinks(), |