r11975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11974‎ | r11975 | r11976 >
Date:06:35, 5 December 2005
Author:vibber
Status:old
Tags:
Comment:
Define $thumbUrl so it isn't undefined on failure
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -474,23 +474,20 @@
475475 function makeThumbLinkObj( $img, $label = '', $alt, $align = 'right', $boxwidth = 180, $boxheight=false, $framed=false , $manual_thumb = "" ) {
476476 global $wgStylePath, $wgContLang;
477477 $url = $img->getViewURL();
 478+ $thumbUrl = '';
478479
479480 $width = $height = 0;
480 - if ( $img->exists() )
481 - {
 481+ if ( $img->exists() ) {
482482 $width = $img->getWidth();
483483 $height = $img->getHeight();
484484 }
485 - if ( 0 == $width || 0 == $height )
486 - {
 485+ if ( 0 == $width || 0 == $height ) {
487486 $width = $height = 200;
488487 }
489 - if ( $boxwidth == 0 )
490 - {
 488+ if ( $boxwidth == 0 ) {
491489 $boxwidth = 200;
492490 }
493 - if ( $framed )
494 - {
 491+ if ( $framed ) {
495492 // Use image dimensions, don't scale
496493 $boxwidth = $width;
497494 $boxheight = $height;

Status & tagging log