From e4a73a9eb01495acf044347e87015f3870fc5cc6 Mon Sep 17 00:00:00 2001 From: OverlordQ Date: Wed, 3 Feb 2010 08:53:43 +0000 Subject: [PATCH] Followup to r61912, make sure hight is actually given, also dont ignore if upright is specified --- includes/Linker.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index be2cc90aa5..7e78f1efd0 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -468,7 +468,7 @@ class Linker { if ( $file && !isset( $hp['width'] ) ) { $hp['width'] = $file->getWidth( $page ); - if( ( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) ) && !$hp['height'] ) { + if( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) ) { $wopt = $wgUser->getOption( 'thumbsize' ); if( !isset( $wgThumbLimits[$wopt] ) ) { @@ -485,7 +485,9 @@ class Linker { round( $wgThumbLimits[$wopt] * $fp['upright'], -1 ) : $wgThumbLimits[$wopt]; if ( $hp['width'] <= 0 || $prefWidth < $hp['width'] ) { - $hp['width'] = $prefWidth; + if( !isset( $hp['height'] ) ) { + $hp['width'] = $prefWidth; + } } } } -- 2.20.1