Fixes bug #2632 : new image height when zooming without using "thumb" was not computed.
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 4 Jul 2005 00:15:35 +0000 (00:15 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 4 Jul 2005 00:15:35 +0000 (00:15 +0000)
RELEASE-NOTES
includes/Linker.php

index ecd1a47..ef3f97c 100644 (file)
@@ -462,6 +462,8 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * (bug 923) Fix title and subtitle for rclinked special page
 * (bug 2642) watchdetails message in several languages used  <a></a> instead of [ ]
 * (bug 2181) basic CSB language localisation by Tomasz G. Sienicki (thanks for the patch)
+* (bug 2632) also adjust height when zooming an image by giving only width
+
 
 === Caveats ===
 
index c174573..47a66dc 100644 (file)
@@ -418,10 +418,11 @@ class Linker {
                        if ( $height !== false && ( $img->getHeight() * $width / $img->getWidth() > $height ) ) {
                                $width = $img->getWidth() * $height / $img->getHeight();
                        }
-                       if ( '' == $manual_thumb ) {
+                       if ( $manual_thumb == '') {
                                $thumb = $img->getThumbnail( $width );
                                if ( $thumb ) {
-                                       $height = $thumb->height;
+                                       // $height = $thumb->height;
+                                       $height = floor($thumb->height * $width / $img->width);
                                        $url = $thumb->getUrl( );
                                }
                        }