From: OverlordQ Date: Wed, 3 Feb 2010 08:53:43 +0000 (+0000) Subject: Followup to r61912, make sure hight is actually given, also dont ignore if upright... X-Git-Tag: 1.31.0-rc.0~37956 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=e4a73a9eb01495acf044347e87015f3870fc5cc6;p=lhc%2Fweb%2Fwiklou.git Followup to r61912, make sure hight is actually given, also dont ignore if upright is specified --- 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; + } } } }