From: Aryeh Gregor Date: Sun, 21 Mar 2010 05:12:09 +0000 (+0000) Subject: Clean up generation slightly X-Git-Tag: 1.31.0-rc.0~37399 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=651d0dfeea896b07cb83c19823715b0a1fd65d07;p=lhc%2Fweb%2Fwiklou.git Clean up generation slightly --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index facd93fa7e..4a2b819866 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2093,6 +2093,7 @@ class OutputPage { $dir = $wgContLang->getDir(); + $htmlAttribs = array( 'lang' => $wgContLanguageCode, 'dir' => $dir ); if ( $wgHtml5 ) { if ( $wgWellFormedXml ) { # Unknown elements and attributes are okay in XML, but unknown @@ -2107,19 +2108,17 @@ class OutputPage { # Much saner. $ret .= "\n"; } - $ret .= "\n"; - $ret .= " $ns ) { - $ret .= "xmlns:{$tag}=\"{$ns}\" "; + $htmlAttribs["xmlns:$tag"] = $ns; } - $ret .= "lang=\"$wgContLanguageCode\" dir=\"$dir\">\n"; } + $ret .= Html::element( 'html', $htmlAttribs ) . "\n"; $openHead = Html::openElement( 'head' ); if ( $openHead ) {