From: Brion Vibber Date: Fri, 28 Oct 2005 00:04:30 +0000 (+0000) Subject: * (bug 3806) Gracefully fall back to client-side scaling on |thumb| image X-Git-Tag: 1.6.0~1292 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=1e4303ef17217820b5bc37eac3ad05d131a88931;p=lhc%2Fweb%2Fwiklou.git * (bug 3806) Gracefully fall back to client-side scaling on |thumb| image that passes $wgMaxImageArea --- 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 {