From 1e4303ef17217820b5bc37eac3ad05d131a88931 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 28 Oct 2005 00:04:30 +0000 Subject: [PATCH] * (bug 3806) Gracefully fall back to client-side scaling on |thumb| image that passes $wgMaxImageArea --- RELEASE-NOTES | 2 ++ includes/Linker.php | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3617ead6a0..9ce790bd20 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -178,6 +178,8 @@ fully support the editing toolbar, but was found to be too confusing. * Fix Special:BrokenRedirects on MySQL 5.0 * (bug 3807) Fix 'all' in namespaces drop-down on contribs, rc * Fail gracefully on invalid namespace in Special:Newpages +* (bug 3806) Gracefully fall back to client-side scaling on |thumb| image + that passes $wgMaxImageArea === Caveats === diff --git a/includes/Linker.php b/includes/Linker.php index 8da9612d08..52e136faf4 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -531,7 +531,11 @@ class Linker { $textalign = $wgContLang->isRTL() ? ' style="text-align:right"' : ''; $s = "
"; - if ( $thumbUrl == '' ) { + if( $thumbUrl == '' ) { + // Couldn't generate thumbnail? Scale the image client-side. + $thumbUrl = $url; + } + if( !$img->exists() ) { $s .= $this->makeBrokenImageLinkObj( $img->getTitle() ); $zoomicon = ''; } else { -- 2.20.1