Add lang & dir attributes to the sitenotice, in the site content language
authorRobin Pepermans <robin@users.mediawiki.org>
Fri, 1 Jul 2011 21:28:11 +0000 (21:28 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Fri, 1 Jul 2011 21:28:11 +0000 (21:28 +0000)
includes/Skin.php

index 4b06e1d..39d6a4e 100644 (file)
@@ -1430,7 +1430,7 @@ abstract class Skin {
         * @return String: HTML fragment
         */
        private function getCachedNotice( $name ) {
-               global $wgRenderHashAppend, $parserMemc;
+               global $wgRenderHashAppend, $parserMemc, $wgContLang;
 
                wfProfileIn( __METHOD__ );
 
@@ -1472,7 +1472,8 @@ abstract class Skin {
                        $notice = $parsed;
                }
 
-               $notice = '<div id="localNotice">' .$notice . '</div>';
+               $notice = Html::rawElement( 'div', array( 'id' => 'localNotice',
+                       'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $notice );
                wfProfileOut( __METHOD__ );
                return $notice;
        }