r21775 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21774‎ | r21775 | r21776 >
Date:21:30, 1 May 2007
Author:tstarling
Status:old
Tags:
Comment:
BC hack for thumbnail sizes
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -531,6 +531,12 @@
532532 // Use image dimensions, don't scale
533533 $thumb = $img->getUnscaledThumb( $page );
534534 } else {
 535+ # Do not present an image bigger than the source, for bitmap-style images
 536+ # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
 537+ $srcWidth = $img->getWidth( $page );
 538+ if ( $srcWidth && !$img->mustRender() && $params['width'] > $srcWidth ) {
 539+ $params['width'] = $srcWidth;
 540+ }
535541 $thumb = $img->transform( $params );
536542 }
537543