Wrap the copyright when its language is not the user's language; avoids problem when direction of the two languages is different

This commit is contained in:
Alexandre Emsenhuber 2011-09-21 09:03:53 +00:00
parent 2ca3123672
commit 52dc9c56d3

View 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 );
}