[!!!][TASK] Bootstrap: Central constants and path handling
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / index_ts.php
index b21a78c..ac78e7d 100644 (file)
 // *******************************
 if (version_compare(phpversion(), '5.3', '<')) die ('TYPO3 requires PHP 5.3.0 or higher.');
 
-// *******************************
-// Set error reporting
-// *******************************
-error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
-
 
 // ******************
 // Constants defined
 // ******************
 $TYPO3_MISC['microtime_start'] = microtime(TRUE);
-define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
 define('TYPO3_MODE','FE');
 
-if (!defined('PATH_t3lib'))            define('PATH_t3lib', PATH_site.'t3lib/');
-
-define('TYPO3_mainDir', 'typo3/');             // This is the directory of the backend administration for the sites of this TYPO3 installation.
-define('PATH_typo3', PATH_site.TYPO3_mainDir);
-define('PATH_typo3conf', PATH_site.'typo3conf/');
-
-if (!@is_dir(PATH_typo3conf))  die('Cannot find configuration. This file is probably executed from the wrong location.');
-
 // *********************
 // Unset variable(s) in global scope (fixes #13959)
 // *********************
@@ -259,10 +245,10 @@ if ($TSFE->isBackendUserLoggedIn()) {
        $spriteManager->loadCacheFile();
 
        $BE_USER->initializeFrontendEdit();
-       if ($BE_USER->adminPanel instanceof tslib_AdminPanel) {
+       if ($BE_USER->adminPanel instanceof tslib_AdminPanel) {
                $LANG = t3lib_div::makeInstance('language');
                $LANG->init($BE_USER->uc['lang']);
-       }
+       }
        if ($BE_USER->frontendEdit instanceof t3lib_frontendedit) {
                $BE_USER->frontendEdit->initConfigOptions();
        }
@@ -327,12 +313,6 @@ switch($TSFE->checkDataSubmission())       {
        case 'email':
                $TSFE->sendFormmail();
        break;
-       case 'fe_tce':
-               $TSFE->includeTCA();
-               $TT->push('fe_tce','');
-               $TSFE->fe_tce();
-               $TT->pull();
-       break;
 }
 
 
@@ -380,44 +360,7 @@ $sendTSFEContent = FALSE;
 if ($TSFE->isOutputting())     {
        $TT->push('Print Content','');
        $TSFE->processOutput();
-
-       // ***************************************
-       // Outputs content / Includes EXT scripts
-       // ***************************************
-       if ($TSFE->isEXTincScript())    {
-               $TT->push('External PHP-script','');
-                               // Important global variables here are $EXTiS_*, they must not be overridden in include-scripts!!!
-                       $EXTiS_config = $TSFE->config['EXTincScript'];
-                       $EXTiS_splitC = explode('<!--EXT_SCRIPT.',$TSFE->content);      // Splits content with the key
-
-                               // Special feature: Include libraries
-                       foreach ($EXTiS_config as $EXTiS_cPart) {
-                               if (isset($EXTiS_cPart['conf']['includeLibs']) && $EXTiS_cPart['conf']['includeLibs']) {
-                                       $EXTiS_resourceList = t3lib_div::trimExplode(',',$EXTiS_cPart['conf']['includeLibs'], TRUE);
-                                       $TSFE->includeLibraries($EXTiS_resourceList);
-                               }
-                       }
-
-                       foreach ($EXTiS_splitC as $EXTiS_c => $EXTiS_cPart) {
-                               if (substr($EXTiS_cPart,32,3)=='-->')   {       // If the split had a comment-end after 32 characters it's probably a split-string
-                                       $EXTiS_key = 'EXT_SCRIPT.'.substr($EXTiS_cPart,0,32);
-                                       if (is_array($EXTiS_config[$EXTiS_key]))        {
-                                               $REC = $EXTiS_config[$EXTiS_key]['data'];
-                                               $CONF = $EXTiS_config[$EXTiS_key]['conf'];
-                                               $content = '';
-                                               include($EXTiS_config[$EXTiS_key]['file']);
-                                               echo $content;  // The script MAY return content in $content or the script may just output the result directly!
-                                       }
-                                       echo substr($EXTiS_cPart,35);
-                               } else {
-                                       echo ($c?'<!--EXT_SCRIPT.':'').$EXTiS_cPart;
-                               }
-                       }
-
-               $TT->pull();
-       } else {
-               $sendTSFEContent = TRUE;
-       }
+       $sendTSFEContent = TRUE;
        $TT->pull();
 }