r61918 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61917‎ | r61918 | r61919 >
Date:08:53, 3 February 2010
Author:overlordq
Status:ok
Tags:
Comment:
Followup to r61912, make sure hight is actually given, also dont ignore if upright is specified
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -468,7 +468,7 @@
469469 if ( $file && !isset( $hp['width'] ) ) {
470470 $hp['width'] = $file->getWidth( $page );
471471
472 - if( ( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) ) && !$hp['height'] ) {
 472+ if( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) ) {
473473 $wopt = $wgUser->getOption( 'thumbsize' );
474474
475475 if( !isset( $wgThumbLimits[$wopt] ) ) {
@@ -485,7 +485,9 @@
486486 round( $wgThumbLimits[$wopt] * $fp['upright'], -1 ) :
487487 $wgThumbLimits[$wopt];
488488 if ( $hp['width'] <= 0 || $prefWidth < $hp['width'] ) {
489 - $hp['width'] = $prefWidth;
 489+ if( !isset( $hp['height'] ) ) {
 490+ $hp['width'] = $prefWidth;
 491+ }
490492 }
491493 }
492494 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r63647Revert r61918, r61912, breaks OggHandler audio file display completely. Rever...tstarling19:43, 12 March 2010
r64806Fix OggHandler/Mp3Handler etc. after r61912 r61918conrad16:58, 9 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61912Fix for not being able to override thumbnail heightoverlordq06:21, 3 February 2010

Status & tagging log