From bb9a942fcebf24a66672c3497776f0a271a14943 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Fri, 10 Sep 2004 01:07:31 +0000 Subject: [PATCH] Limit height even if width has already been reduced. --- includes/ImagePage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 2ed1cf3101..c717ce54d3 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -57,16 +57,16 @@ class ImagePage extends Article { # image $width = $this->img->getWidth(); $height = $this->img->getHeight(); + $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) ); if ( $width > $maxWidth && $wgUseImageResize ) { - $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) ); $anchoropen = ""; $anchorclose = "
{$msg}
"; $url = $this->img->createThumb( $maxWidth ); $height = floor( $height * $maxWidth / $width ); $width = $maxWidth; - } elseif ( $height > $maxHeight && $wgUseImageResize ) { - $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) ); + } + if ( $height > $maxHeight && $wgUseImageResize ) { $anchoropen = ""; $anchorclose = "
{$msg}
"; -- 2.20.1