From: Antoine Musso Date: Mon, 27 Jun 2005 02:18:45 +0000 (+0000) Subject: Fix #bug 2460: width & height now properly filled when resizing image X-Git-Tag: 1.5.0beta2~186 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=6f6d8b74b27c8d98e9f42d48185826e69a72e25c;p=lhc%2Fweb%2Fwiklou.git Fix #bug 2460: width & height now properly filled when resizing image --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 760f396ed7..3c23173a0c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -376,6 +376,7 @@ Various bugfixes, small features, and a few experimental things: * (bug 1242) category list now show on edit page * Skip sidebar entries where link text is '-' * Convert non-UTF-8 URL parameters even if referer is local +* (bug 2460) width & height properly filled when resizing image === Caveats === diff --git a/includes/Linker.php b/includes/Linker.php index ed7c6c9cfd..fbecbd9f9d 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -419,7 +419,9 @@ class Linker { $width = $img->getWidth() * $height / $img->getHeight(); } if ( '' == $manual_thumb ) { - $url = $img->createThumb( $width ); + $thumb = $img->getThumbnail( $width ); + $height = $thumb->height; + $url = $thumb->getUrl( ); } } @@ -429,7 +431,9 @@ class Linker { //$s .= "
{$alt}
{$url}
\n"; } else { $s = '' . - ''.$alt.''; + ''.$alt.''; } if ( '' != $align ) { $s = "
{$s}
";