From: Tim Starling Date: Wed, 5 Jul 2006 06:06:58 +0000 (+0000) Subject: suppressing thumbnail generation in more places X-Git-Tag: 1.31.0-rc.0~56401 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=d052acf2206625ee475a70442c96d6435abf66c7;p=lhc%2Fweb%2Fwiklou.git suppressing thumbnail generation in more places --- diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 01c78da0cf..0935ac30ef 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -133,7 +133,7 @@ class ImageGallery * */ function toHTML() { - global $wgLang, $wgIgnoreImageErrors; + global $wgLang, $wgIgnoreImageErrors, $wgGenerateThumbnailOnParse; $sk =& $this->getSkin(); @@ -158,7 +158,7 @@ class ImageGallery $thumbhtml = '
' . $sk->makeKnownLinkObj( $nt, htmlspecialchars( $nt->getText() ) ) . '
'; } - else if( !( $thumb = $img->getThumbnail( 120, 120 ) ) ) { + else if( !( $thumb = $img->getThumbnail( 120, 120, $wgGenerateThumbnailOnParse ) ) ) { # Error generating thumbnail. $thumbhtml = '
' . htmlspecialchars( $img->getLastError() ) . '
'; diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 69611f8f1b..81e84327c5 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -165,7 +165,8 @@ class ImagePage extends Article { } function openShowImage() { - global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize; + global $wgOut, $wgUser, $wgImageLimits, $wgRequest; + global $wgUseImageResize, $wgGenerateThumbnailOnParse; $full_url = $this->img->getURL(); $anchoropen = ''; @@ -213,7 +214,7 @@ class ImagePage extends Article { } if( $wgUseImageResize ) { - $thumbnail = $this->img->getThumbnail( $width ); + $thumbnail = $this->img->getThumbnail( $width, -1, $wgGenerateThumbnailOnParse ); if ( $thumbnail == null ) { $url = $this->img->getViewURL(); } else {