From: Amir E. Aharoni Date: Thu, 29 Mar 2012 19:17:06 +0000 (+0200) Subject: (bug 25277) Moved the space before the dirmark. X-Git-Tag: 1.31.0-rc.0~24065^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=a9208a08abca36e23524c517cff9a6c56a2014bf;p=lhc%2Fweb%2Fwiklou.git (bug 25277) Moved the space before the dirmark. If the dirmark is immediately adjacent to the file name, the user may copy it with and then paste an unneeded dirmark somewhere. It can be adjacent to the file description, however. Patch set 2: using getDirMarkEntity, according to MaxSem's suggestion. Change-Id: I9567a90e9a4b32cdf31af5f26044c8f80961f986 --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index b41e12646f..7453baac5a 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -279,7 +279,7 @@ class ImagePage extends Article { $max = $wgImageLimits[$sizeSel]; $maxWidth = $max[0]; $maxHeight = $max[1]; - $dirmark = $wgLang->getDirMark(); + $dirmark = $wgLang->getDirMarkEntity(); if ( $this->displayImg->exists() ) { # image @@ -449,14 +449,21 @@ class ImagePage extends Article { if ( !$this->displayImg->isSafeFile() ) { $warning = wfMsgNoTrans( 'mediawarning' ); + // dirmark is needed here to separate the file name, which + // most likely ends in Latin characters, from the description, + // which may begin with the file type. In RTL environment + // this will get messy. + // The dirmark, however, must not be immediately adjacent + // to the filename, because it can get copied with it. + // See bug 25277. $wgOut->addWikiText( <<{$medialink}$dirmark $longDesc +
{$medialink} $dirmark$longDesc
$warning
EOT ); } else { $wgOut->addWikiText( <<{$medialink}{$dirmark} $longDesc +
{$medialink} {$dirmark}$longDesc
EOT );