From ee633efd843714492ca306f4dfdbf278b97e8b04 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 27 Aug 2007 11:24:53 +0000 Subject: [PATCH] Fix a regression from r24808 for some image options. Thanks for hints from VP in de.wp. --- includes/Linker.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index bede54bd6d..18dc188785 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -530,13 +530,13 @@ class Linker { } // Reduce width for upright images when parameter 'upright' is used - if ( !isset( $fp['upright_factor'] ) || $fp['upright_factor'] == 0 ) { - $fp['upright_factor'] = $wgThumbUpright; + if ( isset( $fp['upright'] ) && $fp['upright'] == 0 ) { + $fp['upright'] = $wgThumbUpright; } // Use width which is smaller: real image width or user preference width // For caching health: If width scaled down due to upright parameter, round to full __0 pixel to avoid the creation of a lot of odd thumbs $prefWidth = isset( $fp['upright'] ) ? - round( $wgThumbLimits[$wopt] * $fp['upright_factor'], -1 ) : + round( $wgThumbLimits[$wopt] * $fp['upright'], -1 ) : $wgThumbLimits[$wopt]; if ( $hp['width'] <= 0 || $prefWidth < $hp['width'] ) { $hp['width'] = $prefWidth; @@ -544,7 +544,7 @@ class Linker { } } - if ( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) ) { + if ( isset( $fp['thumbnail'] ) || isset( $fp['manualthumb'] ) || isset( $fp['framed'] ) ) { # Create a thumbnail. Alignment depends on language # writing direction, # right aligned for left-to-right- -- 2.20.1