From: Tim Starling Date: Tue, 1 May 2007 21:30:46 +0000 (+0000) Subject: BC hack for thumbnail sizes X-Git-Tag: 1.31.0-rc.0~53138 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=44d7d7e3a73989db30c5753460a226a3aabed3a7;p=lhc%2Fweb%2Fwiklou.git BC hack for thumbnail sizes --- diff --git a/includes/Linker.php b/includes/Linker.php index b12e2ad0ae..82dca04fd6 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -531,6 +531,12 @@ class Linker { // Use image dimensions, don't scale $thumb = $img->getUnscaledThumb( $page ); } else { + # Do not present an image bigger than the source, for bitmap-style images + # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour + $srcWidth = $img->getWidth( $page ); + if ( $srcWidth && !$img->mustRender() && $params['width'] > $srcWidth ) { + $params['width'] = $srcWidth; + } $thumb = $img->transform( $params ); }