Use a reversed magnify image for framed image thumbnails when on a RTL wiki.

This commit is contained in:
Daniel Friesen 2011-04-30 12:04:00 +00:00
parent 85d99c4c52
commit 8ae8bd5a98
2 changed files with 11 additions and 6 deletions

View file

@ -629,7 +629,7 @@ class Linker {
static function makeThumbLink2( Title $title, $file, $frameParams = array(),
$handlerParams = array(), $time = false, $query = "" )
{
global $wgStylePath;
global $wgStylePath, $wgContLang;
$exists = $file && $file->exists();
# Shortcuts
@ -707,11 +707,16 @@ class Linker {
if ( isset( $fp['framed'] ) ) {
$zoomIcon = "";
} else {
$zoomIcon = '<div class="magnify">' .
'<a href="' . htmlspecialchars( $url ) . '" class="internal" ' .
'title="' . htmlspecialchars( wfMsg( 'thumbnail-more' ) ) . '">' .
'<img src="' . htmlspecialchars( $wgStylePath ) . '/common/images/magnify-clip.png" ' .
'width="15" height="11" alt="" /></a></div>';
$zoomIcon = Html::rawElement( 'div', array( 'class' => 'magnify' ),
Html::rawElement( 'a', array(
'href' => $url,
'class' => 'internal',
'title' => wfMsg( 'thumbnail-more' ) ),
Html::element( 'img', array(
'src' => $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
'width' => 15,
'height' => 11,
'alt' => "" ) ) ) );
}
}
$s .= ' <div class="thumbcaption">' . $zoomIcon . $fp['caption'] . "</div></div></div>";

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B