[FEATURE] Add support for native date/time fields
[Packages/TYPO3.CMS.git] / index.php
index c10eb02..b411fde 100644 (file)
--- a/index.php
+++ b/index.php
@@ -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
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+
 /**
  * This is the MAIN DOCUMENT of the TypoScript driven standard front-end (from the "cms" extension)
  * Basically this is the "index.php" script which all requests for TYPO3 delivered pages goes to in the frontend (the website)
  *
- * $Id$
- *
- * @author     René Fritz <r.fritz@colorcube.de>
+ * @author René Fritz <r.fritz@colorcube.de>
  * @package TYPO3
  * @subpackage tslib
  */
 
-// *******************************
-// Set error reporting
-// *******************************
-
-error_reporting (E_ALL ^ E_NOTICE);
-
-
-// ******************
-// Constants defined
-// ******************
-
-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', dirname(PATH_thisScript).'/');
-
-if (@is_dir(PATH_site.'typo3/sysext/cms/tslib/')) {
-       define('PATH_tslib', PATH_site.'typo3/sysext/cms/tslib/');
-} elseif (@is_dir(PATH_site.'tslib/')) {
-       define('PATH_tslib', PATH_site.'tslib/');
-} else {
-
-       // define path to tslib/ here:
-       $configured_tslib_path = '';
-
-       // example:
-       // $configured_tslib_path = '/var/www/mysite/typo3/sysext/cms/tslib/';
-
-       define('PATH_tslib', $configured_tslib_path);
-}
-
-if (PATH_tslib=='') {
-       die('Cannot find tslib/. Please set path by defining $configured_tslib_path in '.basename(PATH_thisScript).'.');
-}
-
-// ******************
-// include TSFE
-// ******************
-
-require (PATH_tslib.'index_ts.php');
+       // We use require instead of require_once here so we get a fatal error if classes/Bootstrap.php is accidentally included twice
+       // (which would indicate a clear bug).
+require('typo3/classes/Bootstrap.php');
+Typo3_Bootstrap::getInstance()->baseSetup('');
 
+require(PATH_tslib . 'index_ts.php');
 ?>
\ No newline at end of file