Quote table names in admin_get_XXX() functions of t3lib_db
[Packages/TYPO3.CMS.git] / t3lib / thumbs.php
index a1e8687..460eab7 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2007 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -232,7 +232,6 @@ class SC_t3lib_thumbs {
                                        } else {
                                                $colors = ($sizeMax>56)?'-colors 64':'-colors 16';
                                        }
                                        } else {
                                                $colors = ($sizeMax>56)?'-colors 64':'-colors 16';
                                        }
-                                       $path = $TYPO3_CONF_VARS['GFX']['im_path_lzw'] ? $TYPO3_CONF_VARS['GFX']['im_path_lzw'] : $TYPO3_CONF_VARS['GFX']['im_path'];
                                        $parameters = '-sample '.$this->size.' '.$colors.' '.$this->wrapFileName($this->input.'[0]').' '.$this->wrapFileName($this->output);
                                        $cmd = t3lib_div::imageMagickCommand('convert', $parameters);
                                        exec($cmd);
                                        $parameters = '-sample '.$this->size.' '.$colors.' '.$this->wrapFileName($this->input.'[0]').' '.$this->wrapFileName($this->output);
                                        $cmd = t3lib_div::imageMagickCommand('convert', $parameters);
                                        exec($cmd);
@@ -243,10 +242,8 @@ class SC_t3lib_thumbs {
                                        // The thumbnail is read and output to the browser
                                if($fd = @fopen($this->output,'rb'))    {
                                        header('Content-type: image/'.$outext);
                                        // The thumbnail is read and output to the browser
                                if($fd = @fopen($this->output,'rb'))    {
                                        header('Content-type: image/'.$outext);
-                                       while (!feof($fd))      {
-                                               echo fread($fd, 10000);
-                                       }
-                                       fclose( $fd );
+                                       fpassthru($fd);
+                                       fclose($fd);
                                } else {
                                        $this->errorGif('Read problem!','',$this->output);
                                }
                                } else {
                                        $this->errorGif('Read problem!','',$this->output);
                                }
@@ -401,4 +398,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/thumb
 $SOBE = t3lib_div::makeInstance('SC_t3lib_thumbs');
 $SOBE->init();
 $SOBE->main();
 $SOBE = t3lib_div::makeInstance('SC_t3lib_thumbs');
 $SOBE->init();
 $SOBE->main();
-?>
\ No newline at end of file
+?>