(bug 12970) Add global to force client rendering of thumbs. Helpful for victims of...
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 3 Mar 2009 21:21:16 +0000 (21:21 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 3 Mar 2009 21:21:16 +0000 (21:21 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/media/Bitmap.php

index 7392098..594a2f9 100644 (file)
@@ -25,6 +25,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added $wgUseTwoButtonsSearchForm to choose the Search form behavior/look
 * Added $wgNoFollowDomainExceptions to allow exempting particular domain names
   from rel="nofollow" on external links
+* (bug 12970) Added $wgForceClientThumbnails to force client rendering of thumbs,
+  instead of falling back to GD.
 
 === New features in 1.15 ===
 
index 26836b7..c72617e 100644 (file)
@@ -2107,6 +2107,12 @@ $wgGenerateThumbnailOnParse = true;
 /** Obsolete, always true, kept for compatibility with extensions */
 $wgUseImageResize = true;
 
+/** 
+ * Use this if you have issues using gd for image thumbnails--like with 
+ * safe_mode--and want to force thumbnailing to users. Not needed for most
+ * installs. See bug 12970.
+ */
+$wgForceClientThumbnails = false;
 
 /** Set $wgCommandLineMode if it's not set already, to avoid notices */
 if( !isset( $wgCommandLineMode ) ) {
index b949ae3..427c780 100644 (file)
@@ -42,7 +42,7 @@ class BitmapHandler extends ImageHandler {
 
        function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
                global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgImageMagickTempDir;
-               global $wgCustomConvertCommand;
+               global $wgCustomConvertCommand, $wgForceClientThumbnails;
                global $wgSharpenParameter, $wgSharpenReductionThreshold;
                global $wgMaxAnimatedGifArea;
 
@@ -73,6 +73,8 @@ class BitmapHandler extends ImageHandler {
                        $scaler = 'im';
                } elseif ( $wgCustomConvertCommand ) {
                        $scaler = 'custom';
+               } elseif( $wgForceClientThumbnails ) {
+                       $scaler = 'client';
                } elseif ( function_exists( 'imagecreatetruecolor' ) ) {
                        $scaler = 'gd';
                } else {