From: Jens Frank Date: Fri, 10 Sep 2004 01:07:31 +0000 (+0000) Subject: Limit height even if width has already been reduced. X-Git-Tag: 1.5.0alpha1~2032 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=bb9a942fcebf24a66672c3497776f0a271a14943;p=lhc%2Fweb%2Fwiklou.git Limit height even if width has already been reduced. --- 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}
";