suppressing thumbnail generation in more places
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 5 Jul 2006 06:06:58 +0000 (06:06 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 5 Jul 2006 06:06:58 +0000 (06:06 +0000)
includes/ImageGallery.php
includes/ImagePage.php

index 01c78da..0935ac3 100644 (file)
@@ -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 = '<div style="height: 152px;">'
                                        . $sk->makeKnownLinkObj( $nt, htmlspecialchars( $nt->getText() ) ) . '</div>';
                        }
-                       else if( !( $thumb = $img->getThumbnail( 120, 120 ) ) ) {
+                       else if( !( $thumb = $img->getThumbnail( 120, 120, $wgGenerateThumbnailOnParse ) ) ) {
                                # Error generating thumbnail.
                                $thumbhtml = '<div style="height: 152px;">'
                                        . htmlspecialchars( $img->getLastError() ) . '</div>';
index 69611f8..81e8432 100644 (file)
@@ -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 {