From f19f74650ea20f4c02b3c2dd02652d773a8c447e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 12 Sep 2005 22:46:13 +0000 Subject: [PATCH] * (bug 2800) Don't scale up small images on |thumb| without explicit size --- RELEASE-NOTES | 1 + includes/Linker.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8351665448..46afa73a97 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Linker.php b/includes/Linker.php index 54daa1a6ff..044e2a890c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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; -- 2.20.1