[TASK] Remove old login labels
[Packages/TYPO3.CMS.git] / typo3 / thumbs.php
old mode 100755 (executable)
new mode 100644 (file)
index e05b8de..24f7e99
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (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
 /**
  * Generates a thumbnail and returns an image stream, either GIF/PNG or JPG
  *
- * $Id$
- *
- * @author             René Fritz <r.fritz@colorcube.de>
+ * @author             René Fritz <r.fritz@colorcube.de>
  */
 
 // *******************************
 // Set error reporting
 // *******************************
+error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
 
-error_reporting (E_ALL ^ E_NOTICE);
 
+define('PATH_thisScript', str_replace('//', '/', str_replace('\\', '/',
+       (PHP_SAPI == 'fpm-fcgi' || PHP_SAPI == 'cgi' || PHP_SAPI == 'isapi' || PHP_SAPI == 'cgi-fcgi') &&
+       ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) ?
+       ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) :
+       ($_SERVER['ORIG_SCRIPT_FILENAME'] ? $_SERVER['ORIG_SCRIPT_FILENAME'] : $_SERVER['SCRIPT_FILENAME']))));
 
-define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));
 define('PATH_site', substr(dirname(PATH_thisScript).'/',0,-strlen('typo3/'))); // Abs. path to directory with the frontend (one above the admin-dir)
 define('PATH_t3lib', PATH_site.'t3lib/');