From 6f6d8b74b27c8d98e9f42d48185826e69a72e25c Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 27 Jun 2005 02:18:45 +0000 Subject: [PATCH] Fix #bug 2460: width & height now properly filled when resizing image --- RELEASE-NOTES | 1 + includes/Linker.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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}
"; -- 2.20.1