From 8ae8bd5a989a43e87ced8e3d1afed7d83b90c91a Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sat, 30 Apr 2011 12:04:00 +0000 Subject: [PATCH] Use a reversed magnify image for framed image thumbnails when on a RTL wiki. --- includes/Linker.php | 17 +++++++++++------ skins/common/images/magnify-clip-rtl.png | Bin 0 -> 252 bytes 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 skins/common/images/magnify-clip-rtl.png diff --git a/includes/Linker.php b/includes/Linker.php index 2274ff54bb..61d8b83850 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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 = '
' . - '' . - '
'; + $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 .= '
' . $zoomIcon . $fp['caption'] . "
"; diff --git a/skins/common/images/magnify-clip-rtl.png b/skins/common/images/magnify-clip-rtl.png new file mode 100644 index 0000000000000000000000000000000000000000..8398a82c9e59f958457a2d1738d108d14335c3a8 GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngj!2%??{N%3#DaPU;cPEB*=VV?2IZR33?k)`f z+xyS#2l6-zJR*yM3O|4_qthCb89+hy5>H=O_S-CS+{V1+Pt1IPLJgiSjv*44ThFf* zJQN^sx>VYl;0WDsPb%hRrasEc=t<*qszr+ zvFyyaDqK-`wZSKK^06I9{@I=Vb47m6@v;u)b1#~zs%&p)R(ZRwJ~3y@$EX?h&3Vl+ uE5F9qFPAXy>%F>o-d7R+i+gt-<6V4Nd27d&ooj$@VeoYIb6Mw<&;$Sw#9+Aq literal 0 HcmV?d00001 -- 2.20.1