* (bug 3806) Gracefully fall back to client-side scaling on |thumb| image
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Oct 2005 00:04:30 +0000 (00:04 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Oct 2005 00:04:30 +0000 (00:04 +0000)
  that passes $wgMaxImageArea

RELEASE-NOTES
includes/Linker.php

index 3617ead..9ce790b 100644 (file)
@@ -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 ===
index 8da9612..52e136f 100644 (file)
@@ -531,7 +531,11 @@ class Linker {
                $textalign = $wgContLang->isRTL() ? ' style="text-align:right"' : '';
 
                $s = "<div class=\"thumb t{$align}\"><div style=\"width:{$oboxwidth}px;\">";
-               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 {