Wrap the copyright when its language is not the user's language; avoids problem when...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 21 Sep 2011 09:03:53 +0000 (09:03 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 21 Sep 2011 09:03:53 +0000 (09:03 +0000)
includes/Skin.php

index 76a913b..a70c568 100644 (file)
@@ -729,7 +729,7 @@ abstract class Skin extends ContextSource {
        }
 
        function getCopyright( $type = 'detect' ) {
-               global $wgRightsPage, $wgRightsUrl, $wgRightsText;
+               global $wgRightsPage, $wgRightsUrl, $wgRightsText, $wgContLang;
 
                if ( $type == 'detect' ) {
                        if ( !$this->isRevisionCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) {
@@ -763,7 +763,11 @@ abstract class Skin extends ContextSource {
                wfRunHooks( 'SkinCopyrightFooter', array( $this->getTitle(), $type, &$msg, &$link, &$forContent ) );
 
                if ( $forContent ) {
-                       return wfMsgForContent( $msg, $link );
+                       $msg = wfMsgForContent( $msg, $link );
+                       if ( $this->getLang()->getCode() !== $wgContLang->getCode() ) {
+                               $msg = Html::rawElement( 'span', array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $msg );
+                       }
+                       return $msg;
                } else {
                        return wfMsg( $msg, $link );
                }