Index: trunk/phase3/includes/Image.php |
— | — | @@ -946,9 +946,10 @@ |
947 | 947 | } |
948 | 948 | |
949 | 949 | # Don't make an image bigger than the source, or wgMaxSVGSize for SVGs |
950 | | - $maxsize = $this->mustRender() ? $wgSVGMaxSize : $this->width - 1; |
951 | | - if( $width > $maxsize ) { |
952 | | - $thumb = new ThumbnailImage( $this->getViewURL(), $this->getWidth(), $this->getHeight() ); |
| 950 | + if ( $this->mustRender() ) { |
| 951 | + $width = min( $width, $wgSVGMaxSize ); |
| 952 | + } elseif ( $width > $this->width - 1 ) { |
| 953 | + $thumb = new ThumbnailImage( $this->getURL(), $this->getWidth(), $this->getHeight() ); |
953 | 954 | wfProfileOut( $fname ); |
954 | 955 | return $thumb; |
955 | 956 | } |