From: Rotem Liss Date: Tue, 30 Oct 2007 09:40:35 +0000 (+0000) Subject: Fixing display problem in image page in RTL wikis, when file name is LTR and is follo... X-Git-Tag: 1.31.0-rc.0~51055 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=5987006713582d60c3aec0183555cd7eed3df483;p=lhc%2Fweb%2Fwiklou.git Fixing display problem in image page in RTL wikis, when file name is LTR and is followed by the image size, by adding a direction mark. --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 3cf6d0ac16..a9896667b0 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -157,7 +157,7 @@ class ImagePage extends Article { } function openShowImage() { - global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang; + global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang, $wgContLang; $full_url = $this->img->getURL(); $linkAttribs = false; @@ -176,6 +176,7 @@ class ImagePage extends Article { $maxWidth = $max[0]; $maxHeight = $max[1]; $sk = $wgUser->getSkin(); + $dirmark = $wgContLang->getDirMark(); if ( $this->img->exists() ) { # image @@ -235,7 +236,7 @@ class ImagePage extends Article { } else { $anchorclose .= $msgsmall . - '
' . Xml::tags( 'a', $linkAttribs, $msgbig ) . ' ' . $longDesc; + '
' . Xml::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc; } if ( $this->img->isMultipage() ) { @@ -308,8 +309,6 @@ class ImagePage extends Article { if ($showLink) { $filename = wfEscapeWikiText( $this->img->getName() ); - global $wgContLang; - $dirmark = $wgContLang->getDirMark(); if (!$this->img->isSafeFile()) { $warning = wfMsg( 'mediawarning' ); $wgOut->addWikiText( <<