r61912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61911‎ | r61912 | r61913 >
Date:06:21, 3 February 2010
Author:overlordq
Status:resolved (Comments)
Tags:
Comment:
Fix for not being able to override thumbnail height
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['width'] ) {
 472+ if( ( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) ) && !$hp['height'] ) {
473473 $wopt = $wgUser->getOption( 'thumbsize' );
474474
475475 if( !isset( $wgThumbLimits[$wopt] ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r61918Followup to r61912, make sure hight is actually given, also dont ignore if up...overlordq08:53, 3 February 2010
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

Comments

#Comment by OverlordQ (talk | contribs)   06:28, 3 February 2010

Can compare outputs before[1] and after[2].

1 - http://test.wikipedia.org/w/index.php?title=Sandbox_5 2 - http://www.thedarkcitadel.com/wiki/Sandbox

Didn't break any parsers tests either.

#Comment by Raymond (talk | contribs)   08:22, 3 February 2010

Seen at translatewiki:

PHP Notice: Undefined index: height in /www/w/includes/Linker.php on line 471

#Comment by Raymond (talk | contribs)   09:18, 3 February 2010

Fixed by Overlordq with r61918. Thanks :)

#Comment by Conrad.Irwin (talk | contribs)   16:33, 11 March 2010

This breaks Extension:OggHandler as audio files have a nominal width of 0.

#Comment by Tim Starling (talk | contribs)   19:37, 12 March 2010

Confirmed OggHandler regression. Reverting in the 1.16 branch only.

#Comment by Conrad.Irwin (talk | contribs)   20:09, 9 April 2010

Fixed trunk in r64806

Status & tagging log