* (bug 2800) Don't scale up small images on |thumb| without explicit size
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 12 Sep 2005 22:46:13 +0000 (22:46 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 12 Sep 2005 22:46:13 +0000 (22:46 +0000)
RELEASE-NOTES
includes/Linker.php

index 8351665..46afa73 100644 (file)
@@ -97,6 +97,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 3408) Bulgarian formatNum corrected
 * (bug 3448) Set page_len on undelete
 * (bug 3405) Don't use raw letters as aliases of MSGNW: and SUBST:
+* (bug 2800) Don't scale up small images on |thumb| without explicit size
 
 
 === Caveats ===
index 54daa1a..044e2a8 100644 (file)
@@ -415,7 +415,7 @@ class Linker {
                                         $wopt = User::getDefaultOption( 'thumbsize' );
                                }
                                
-                               $width = $wgThumbLimits[$wopt];
+                               $width = min( $img->getWidth(), $wgThumbLimits[$wopt] );
                        }
                        
                        return $prefix.$this->makeThumbLinkObj( $img, $label, $alt, $align, $width, $height, $framed, $manual_thumb ).$postfix;