[BUGFIX] Use t3lib_cache_frontend_VariableFrontend as fallback frontend
[Packages/TYPO3.CMS.git] / t3lib / thumbs.php
index 9234ba0..f7ff05c 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2010 Kasper Skårhøj (kasperYYYY@typo3.com)
+*  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -27,7 +27,6 @@
 /**
  * Generates a thumbnail and returns an image stream, either GIF/PNG or JPG
  *
- * $Id$
  * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
  *
  * @author             Kasper Skårhøj        <kasperYYYY@typo3.com>
 // *******************************
 // Set error reporting
 // *******************************
-if (defined('E_DEPRECATED')) {
-       error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
-} else {
-       error_reporting(E_ALL ^ E_NOTICE);
-}
+error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
 
 
 
@@ -240,9 +235,11 @@ class SC_t3lib_thumbs {
                                if (!file_exists($this->output))        {
                                        $parameters = '-sample ' . $this->size . ' ' . $this->wrapFileName($this->input) . '[0] ' . $this->wrapFileName($this->output);
                                        $cmd = t3lib_div::imageMagickCommand('convert', $parameters);
-                                       exec($cmd);
+                                       t3lib_utility_Command::exec($cmd);
                                        if (!file_exists($this->output))        {
                                                $this->errorGif('No thumb','generated!',basename($this->input));
+                                       } else {
+                                               t3lib_div::fixPermissions($this->output);
                                        }
                                }
                                        // The thumbnail is read and output to the browser
@@ -419,4 +416,4 @@ $SOBE = t3lib_div::makeInstance('SC_t3lib_thumbs');
 $SOBE->init();
 $SOBE->main();
 
-?>
+?>
\ No newline at end of file