[TASK] PATH_tslib is defined twice in bootstrap
authorAndy Grunwald <andygrunwald@gmail.com>
Mon, 19 Mar 2012 18:50:10 +0000 (19:50 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 11 Apr 2012 11:35:42 +0000 (13:35 +0200)
In index.php AND typo3/sysext/cms/tslib/index_ts.php
(which will be included in index.php) the constant
PATH_tslib is defined.

The definition in typo3/sysext/cms/tslib/index_ts.php
is obsolete, because this will be checked via if(!defined(...)).

In index.php, if PATH_tslib is empty the script will die immediately.
After that check, PATH_tslib will be used to include index_ts.php

See also #35003 and #35017

Change-Id: I6b86c3bdb071af06b2c64b8cbbc977e9387408c8
Fixes: #35019
Releases: 6.0, 4.7
Reviewed-on: http://review.typo3.org/9754
Reviewed-by: Andy Grunwald
Tested-by: Andy Grunwald
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/cms/tslib/index_ts.php

index 0431bbf..2d6b81e 100644 (file)
@@ -70,14 +70,6 @@ define('TYPO3_mainDir', 'typo3/');           // This is the directory of the backend admi
 define('PATH_typo3', PATH_site.TYPO3_mainDir);
 define('PATH_typo3conf', PATH_site.'typo3conf/');
 
-if (!defined('PATH_tslib')) {
-       if (@is_dir(PATH_site.TYPO3_mainDir.'sysext/cms/tslib/')) {
-               define('PATH_tslib', PATH_site.TYPO3_mainDir.'sysext/cms/tslib/');
-       } elseif (@is_dir(PATH_site.'tslib/')) {
-               define('PATH_tslib', PATH_site.'tslib/');
-       }
-}
-
 if (!@is_dir(PATH_typo3conf))  die('Cannot find configuration. This file is probably executed from the wrong location.');
 
 // *********************
@@ -106,10 +98,6 @@ require(PATH_t3lib.'config_default.php');
 if (!defined ('TYPO3_db'))     die ('The configuration file was not included.');       // the name of the TYPO3 database is stored in this constant. Here the inclusion of the config-file is verified by checking if this var is set.
 if (!t3lib_extMgm::isLoaded('cms'))    die('<strong>Error:</strong> The main frontend extension "cms" was not loaded. Enable it in the extension manager in the backend.');
 
-if (!defined('PATH_tslib')) {
-       define('PATH_tslib', t3lib_extMgm::extPath('cms').'tslib/');
-}
-
 
 // *********************
 // Timetracking started