r12617 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12616‎ | r12617 | r12618 >
Date:04:38, 12 January 2006
Author:timstarling
Status:old
Tags:
Comment:
fixed infinite recursion in SVG error path
Modified paths:
  • /trunk/phase3/includes/Image.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Image.php
@@ -946,9 +946,10 @@
947947 }
948948
949949 # Don't make an image bigger than the source, or wgMaxSVGSize for SVGs
950 - $maxsize = $this->mustRender() ? $wgSVGMaxSize : $this->width - 1;
951 - if( $width > $maxsize ) {
952 - $thumb = new ThumbnailImage( $this->getViewURL(), $this->getWidth(), $this->getHeight() );
 950+ if ( $this->mustRender() ) {
 951+ $width = min( $width, $wgSVGMaxSize );
 952+ } elseif ( $width > $this->width - 1 ) {
 953+ $thumb = new ThumbnailImage( $this->getURL(), $this->getWidth(), $this->getHeight() );
953954 wfProfileOut( $fname );
954955 return $thumb;
955956 }

Status & tagging log