r87163 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87162‎ | r87163 | r87164 >
Date:12:04, 30 April 2011
Author:dantman
Status:ok (Comments)
Tags:
Comment:
Use a reversed magnify image for framed image thumbnails when on a RTL wiki.
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/skins/common/images/magnify-clip-rtl.png (added) (history)

Diff [purge]

Index: trunk/phase3/skins/common/images/magnify-clip-rtl.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/phase3/skins/common/images/magnify-clip-rtl.png
___________________________________________________________________
Added: svn:mime-type
11 + image/png
Index: trunk/phase3/includes/Linker.php
@@ -629,7 +629,7 @@
630630 static function makeThumbLink2( Title $title, $file, $frameParams = array(),
631631 $handlerParams = array(), $time = false, $query = "" )
632632 {
633 - global $wgStylePath;
 633+ global $wgStylePath, $wgContLang;
634634 $exists = $file && $file->exists();
635635
636636 # Shortcuts
@@ -707,11 +707,16 @@
708708 if ( isset( $fp['framed'] ) ) {
709709 $zoomIcon = "";
710710 } else {
711 - $zoomIcon = '<div class="magnify">' .
712 - '<a href="' . htmlspecialchars( $url ) . '" class="internal" ' .
713 - 'title="' . htmlspecialchars( wfMsg( 'thumbnail-more' ) ) . '">' .
714 - '<img src="' . htmlspecialchars( $wgStylePath ) . '/common/images/magnify-clip.png" ' .
715 - 'width="15" height="11" alt="" /></a></div>';
 711+ $zoomIcon = Html::rawElement( 'div', array( 'class' => 'magnify' ),
 712+ Html::rawElement( 'a', array(
 713+ 'href' => $url,
 714+ 'class' => 'internal',
 715+ 'title' => wfMsg( 'thumbnail-more' ) ),
 716+ Html::element( 'img', array(
 717+ 'src' => $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
 718+ 'width' => 15,
 719+ 'height' => 11,
 720+ 'alt' => "" ) ) ) );
716721 }
717722 }
718723 $s .= ' <div class="thumbcaption">' . $zoomIcon . $fp['caption'] . "</div></div></div>";

Comments

#Comment by Siebrand (talk | contribs)   13:36, 30 April 2011

Should probably be added to RELEASE-NOTES.

#Comment by Brion VIBBER (talk | contribs)   00:06, 8 June 2011

Nothing looks like a fixme in here.

Status & tagging log