Revert r25916 -- breaks ability to blow up small images, without explanation. WTF?
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 18 Sep 2007 14:30:40 +0000 (14:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 18 Sep 2007 14:30:40 +0000 (14:30 +0000)
RELEASE-NOTES
includes/Linker.php

index fa9957c..5a9945a 100644 (file)
@@ -59,7 +59,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Strike the link to the redirect rather than using an asterisk in Special:Listredirects
 * (bug 11355) Fix false positives in Safe Mode and other config detection
   when boolean settings are disabled with 'Off' via php_admin_value/php_value
-* Do not present an image bigger than the source, for bitmap-style images
 
 === API changes in 1.12 ===
 
index 0836cf5..9397b80 100644 (file)
@@ -544,15 +544,6 @@ class Linker {
                        }
                }
 
-               if ( $file && $hp['width'] ) {
-                       # Do not present an image bigger than the source, for bitmap-style images
-                       # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
-                       $srcWidth = $file->getWidth( $page );
-                       if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
-                               $hp['width'] = $srcWidth;
-                       }
-               }
-
                if ( isset( $fp['thumbnail'] ) || isset( $fp['manualthumb'] ) || isset( $fp['framed'] ) ) {
 
                        # Create a thumbnail. Alignment depends on language
@@ -643,6 +634,12 @@ class Linker {
                                // Use image dimensions, don't scale
                                $thumb = $file->getUnscaledThumb( $page );
                        } else {
+                               # Do not present an image bigger than the source, for bitmap-style images
+                               # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
+                               $srcWidth = $file->getWidth( $page );
+                               if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
+                                       $hp['width'] = $srcWidth;
+                               }
                                $thumb = $file->transform( $hp );
                        }
 
@@ -1376,3 +1373,7 @@ class Linker {
                return $out;
        }
 }
+
+
+
+