[!!!][TASK] Remove various TSFE properties 35/49135/6
authorBenni Mack <benni@typo3.org>
Wed, 20 Jul 2016 15:11:51 +0000 (17:11 +0200)
committerBenni Mack <benni@typo3.org>
Sun, 31 Jul 2016 11:48:20 +0000 (13:48 +0200)
The short-hand syntax for TYPO3_CONF_VARS in TSFE
is rather tedious when explaining to newcomers why
it was solved this way 12 years ago.

The patch changes all occurrences to use the
global array, as in all other parts of the TYPO3 Core.

Additionally, the following public properties are removed:

* defaultBodyTag (can be overriden via TypoScript)
* clientInfo (can be loaded via GeneralUtility::clientInfo())

Resolves: #77184
Releases: master
Change-Id: I7d6a78f0d32db5fb7635bb7dc7770cae49925644
Reviewed-on: https://review.typo3.org/49135
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Breaking-77184-VariousTSFEPropertiesRemoved.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Utility/EidUtility.php
typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/version/Classes/Hook/PreviewHook.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-77184-VariousTSFEPropertiesRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-77184-VariousTSFEPropertiesRemoved.rst
new file mode 100644 (file)
index 0000000..0961242
--- /dev/null
@@ -0,0 +1,38 @@
+==================================================
+Breaking: #77184 - Various TSFE properties removed
+==================================================
+
+Description
+===========
+
+The following public properties of the PHP class ``TypoScriptFrontendController`` have been removed.
+
+* TYPO3_CONF_VARS
+* defaultBodyTag
+* clientInfo
+
+Additionally, the first parameter of the TypoScriptFrontendController constructor has no effect anymore and can be set
+to null.
+
+
+Impact
+======
+
+Accessing or setting the properties will throw a PHP warning and have no effect anymore.
+
+
+Affected Installations
+======================
+
+Any installation working with the public property in a third-party extension or instantiating the TSFE object itself.
+
+
+Migration
+=========
+
+For any calls to ``$TSFE->TYPO3_CONF_VARS`` the global array ``$GLOBALS['TYPO3_CONF_VARS']`` should be used.
+
+For the property ``defaultBodyTag`` the according TypoScript settings can be used to override the
+body tag or the page title.
+
+The information previously stored in the clientInfo property can be fetched programatically via ``GeneralUtility::clientInfo()``.
index ea1e7fa..2c3b354 100644 (file)
@@ -273,13 +273,6 @@ class TypoScriptFrontendController
     public $simUserGroup = 0;
 
     /**
-     * Copy of $GLOBALS['TYPO3_CONF_VARS']
-     *
-     * @var array
-     */
-    public $TYPO3_CONF_VARS = array();
-
-    /**
      * "CONFIG" object from TypoScript. Array generated based on the TypoScript
      * configuration of the current page. Saved with the cached pages.
      * @var array
@@ -447,13 +440,6 @@ class TypoScriptFrontendController
     public $divSection = '';
 
     /**
-     * Default bodytag, if nothing else is set. This can be overridden by
-     * applications like TemplaVoila.
-     * @var string
-     */
-    public $defaultBodyTag = '<body>';
-
-    /**
      * Debug flag. If TRUE special debug-output maybe be shown (which includes html-formatting).
      * @var bool
      */
@@ -712,12 +698,6 @@ class TypoScriptFrontendController
     public $content = '';
 
     /**
-     * Set to the browser: net / msie if 4+ browsers
-     * @var string
-     */
-    public $clientInfo = '';
-
-    /**
      * @var int
      */
     public $scriptParseTime = 0;
@@ -854,26 +834,25 @@ class TypoScriptFrontendController
      * Class constructor
      * Takes a number of GET/POST input variable as arguments and stores them internally.
      * The processing of these variables goes on later in this class.
-     * Also sets internal clientInfo array (browser information) and a unique string (->uniqueString) for this script instance; A md5 hash of the microtime()
+     * Also sets a unique string (->uniqueString) for this script instance; A md5 hash of the microtime()
      *
-     * @param array $TYPO3_CONF_VARS The global $TYPO3_CONF_VARS array. Will be set internally in ->TYPO3_CONF_VARS
+     * @param array $_ unused, previously defined to set TYPO3_CONF_VARS
      * @param mixed $id The value of GeneralUtility::_GP('id')
      * @param int $type The value of GeneralUtility::_GP('type')
      * @param bool|string $no_cache The value of GeneralUtility::_GP('no_cache'), evaluated to 1/0
      * @param string $cHash The value of GeneralUtility::_GP('cHash')
-     * @param string $_ previously was used to define the jumpURL
+     * @param string $_2 previously was used to define the jumpURL
      * @param string $MP The value of GeneralUtility::_GP('MP')
      * @param string $RDCT The value of GeneralUtility::_GP('RDCT')
      * @see \TYPO3\CMS\Frontend\Http\RequestHandler
      */
-    public function __construct($TYPO3_CONF_VARS, $id, $type, $no_cache = '', $cHash = '', $_ = null, $MP = '', $RDCT = '')
+    public function __construct($_ = null, $id, $type, $no_cache = '', $cHash = '', $_2 = null, $MP = '', $RDCT = '')
     {
         // Setting some variables:
-        $this->TYPO3_CONF_VARS = $TYPO3_CONF_VARS;
         $this->id = $id;
         $this->type = $type;
         if ($no_cache) {
-            if ($this->TYPO3_CONF_VARS['FE']['disableNoCacheParameter']) {
+            if ($GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter']) {
                 $warning = '&no_cache=1 has been ignored because $TYPO3_CONF_VARS[\'FE\'][\'disableNoCacheParameter\'] is set!';
                 $this->getTimeTracker()->setTSlogMessage($warning, 2);
             } else {
@@ -883,16 +862,15 @@ class TypoScriptFrontendController
             GeneralUtility::sysLog($warning, 'cms', GeneralUtility::SYSLOG_SEVERITY_WARNING);
         }
         $this->cHash = $cHash;
-        $this->MP = $this->TYPO3_CONF_VARS['FE']['enable_mount_pids'] ? (string)$MP : '';
+        $this->MP = $GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] ? (string)$MP : '';
         $this->RDCT = $RDCT;
-        $this->clientInfo = GeneralUtility::clientInfo();
         $this->uniqueString = md5(microtime());
         $this->csConvObj = GeneralUtility::makeInstance(CharsetConverter::class);
         $this->initPageRenderer();
         // Call post processing function for constructor:
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -945,9 +923,9 @@ class TypoScriptFrontendController
             }
         }
         // Call post processing function for DB connection:
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -997,9 +975,9 @@ class TypoScriptFrontendController
     public function initFEuser()
     {
         $this->fe_user = GeneralUtility::makeInstance(FrontendUserAuthentication::class);
-        $this->fe_user->lockIP = $this->TYPO3_CONF_VARS['FE']['lockIP'];
-        $this->fe_user->checkPid = $this->TYPO3_CONF_VARS['FE']['checkFeUserPid'];
-        $this->fe_user->lifetime = (int)$this->TYPO3_CONF_VARS['FE']['lifetime'];
+        $this->fe_user->lockIP = $GLOBALS['TYPO3_CONF_VARS']['FE']['lockIP'];
+        $this->fe_user->checkPid = $GLOBALS['TYPO3_CONF_VARS']['FE']['checkFeUserPid'];
+        $this->fe_user->lifetime = (int)$GLOBALS['TYPO3_CONF_VARS']['FE']['lifetime'];
         // List of pid's acceptable
         $pid = GeneralUtility::_GP('pid');
         $this->fe_user->checkPid_value = $pid ? $this->getDatabaseConnection()->cleanIntList($pid) : 0;
@@ -1007,7 +985,7 @@ class TypoScriptFrontendController
         if (GeneralUtility::_GP('FE_SESSION_KEY')) {
             $fe_sParts = explode('-', GeneralUtility::_GP('FE_SESSION_KEY'));
             // If the session key hash check is OK:
-            if (md5(($fe_sParts[0] . '/' . $this->TYPO3_CONF_VARS['SYS']['encryptionKey'])) === (string)$fe_sParts[1]) {
+            if (md5(($fe_sParts[0] . '/' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) === (string)$fe_sParts[1]) {
                 $cookieName = FrontendUserAuthentication::getCookieName();
                 $_COOKIE[$cookieName] = $fe_sParts[0];
                 if (isset($_SERVER['HTTP_COOKIE'])) {
@@ -1026,12 +1004,12 @@ class TypoScriptFrontendController
         $recs = GeneralUtility::_GP('recs');
         // If any record registration is submitted, register the record.
         if (is_array($recs)) {
-            $this->fe_user->record_registration($recs, $this->TYPO3_CONF_VARS['FE']['maxSessionDataSize']);
+            $this->fe_user->record_registration($recs, $GLOBALS['TYPO3_CONF_VARS']['FE']['maxSessionDataSize']);
         }
         // Call hook for possible manipulation of frontend user object
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -1107,9 +1085,9 @@ class TypoScriptFrontendController
     {
         $this->siteScript = GeneralUtility::getIndpEnv('TYPO3_SITE_SCRIPT');
         // Call post processing function for custom URL methods.
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -1149,8 +1127,8 @@ class TypoScriptFrontendController
     public function initializeBackendUser()
     {
         // PRE BE_USER HOOK
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'] as $_funcRef) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'] as $_funcRef) {
                 $_params = array();
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
@@ -1170,7 +1148,7 @@ class TypoScriptFrontendController
             // disable login-attempts to the backend account through this script
             // New backend user object
             $BE_USER = GeneralUtility::makeInstance(FrontendBackendUserAuthentication::class);
-            $BE_USER->lockIP = $this->TYPO3_CONF_VARS['BE']['lockIP'];
+            $BE_USER->lockIP = $GLOBALS['TYPO3_CONF_VARS']['BE']['lockIP'];
             // Object is initialized
             $BE_USER->start();
             $BE_USER->unpack_uc('');
@@ -1187,11 +1165,11 @@ class TypoScriptFrontendController
             $GLOBALS['TYPO3_MISC']['microtime_BE_USER_end'] = microtime(true);
         }
         // POST BE_USER HOOK
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'])) {
             $_params = array(
                 'BE_USER' => &$BE_USER
             );
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -1209,8 +1187,8 @@ class TypoScriptFrontendController
     public function determineId()
     {
         // Call pre processing function for id determination
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'] as $functionReference) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'] as $functionReference) {
                 $parameters = array('parentObject' => $this);
                 GeneralUtility::callUserFunction($functionReference, $parameters, $this);
             }
@@ -1332,9 +1310,9 @@ class TypoScriptFrontendController
         // Make sure it's an integer
         $this->type = (int)$this->type;
         // Call post processing function for id determination:
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PostProc'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PostProc'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PostProc'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PostProc'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -1404,7 +1382,7 @@ class TypoScriptFrontendController
         // We find the first page belonging to the current domain
         $timeTracker->push('fetch_the_id domain/', '');
         // The page_id of the current domain
-        $this->domainStartPage = $this->findDomainRecord($this->TYPO3_CONF_VARS['SYS']['recursiveDomainSearch']);
+        $this->domainStartPage = $this->findDomainRecord($GLOBALS['TYPO3_CONF_VARS']['SYS']['recursiveDomainSearch']);
         if (!$this->id) {
             if ($this->domainStartPage) {
                 // If the id was not previously set, set it to the id of the domain.
@@ -1431,7 +1409,7 @@ class TypoScriptFrontendController
         $this->requestedId = $this->id;
         $this->getPageAndRootlineWithDomain($this->domainStartPage);
         $timeTracker->pull();
-        if ($this->pageNotFound && $this->TYPO3_CONF_VARS['FE']['pageNotFound_handling']) {
+        if ($this->pageNotFound && $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling']) {
             $pNotFoundMsg = array(
                 1 => 'ID was not an accessible page',
                 2 => 'Subsection was found and not accessible',
@@ -1466,8 +1444,8 @@ class TypoScriptFrontendController
         if ($this->register['SYS_LASTCHANGED'] < (int)$this->page['SYS_LASTCHANGED']) {
             $this->register['SYS_LASTCHANGED'] = (int)$this->page['SYS_LASTCHANGED'];
         }
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing'] as $functionReference) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing'] as $functionReference) {
                 $parameters = array('parentObject' => $this);
                 GeneralUtility::callUserFunction($functionReference, $parameters, $this);
             }
@@ -1514,7 +1492,7 @@ class TypoScriptFrontendController
             // If still no page...
             if (empty($this->page)) {
                 $message = 'The requested page does not exist!';
-                if ($this->TYPO3_CONF_VARS['FE']['pageNotFound_handling']) {
+                if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling']) {
                     $this->pageNotFoundAndExit($message);
                 } else {
                     GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
@@ -1525,7 +1503,7 @@ class TypoScriptFrontendController
         // Spacer is not accessible in frontend
         if ($this->page['doktype'] == PageRepository::DOKTYPE_SPACER) {
             $message = 'The requested page does not exist!';
-            if ($this->TYPO3_CONF_VARS['FE']['pageNotFound_handling']) {
+            if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling']) {
                 $this->pageNotFoundAndExit($message);
             } else {
                 GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
@@ -1724,9 +1702,9 @@ class TypoScriptFrontendController
      */
     public function checkEnableFields($row, $bypassGroupCheck = false)
     {
-        if (isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields']) && is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields'])) {
+        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields'])) {
             $_params = array('pObj' => $this, 'row' => &$row, 'bypassGroupCheck' => &$bypassGroupCheck);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields'] as $_funcRef) {
                 // Call hooks: If one returns FALSE, method execution is aborted with result "This record is not available"
                 $return = GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                 if ($return === false) {
@@ -1911,8 +1889,8 @@ class TypoScriptFrontendController
      */
     public function pageUnavailableAndExit($reason = '', $header = '')
     {
-        $header = $header ?: $this->TYPO3_CONF_VARS['FE']['pageUnavailable_handling_statheader'];
-        $this->pageUnavailableHandler($this->TYPO3_CONF_VARS['FE']['pageUnavailable_handling'], $header, $reason);
+        $header = $header ?: $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling_statheader'];
+        $this->pageUnavailableHandler($GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'], $header, $reason);
         die;
     }
 
@@ -1925,8 +1903,8 @@ class TypoScriptFrontendController
      */
     public function pageNotFoundAndExit($reason = '', $header = '')
     {
-        $header = $header ?: $this->TYPO3_CONF_VARS['FE']['pageNotFound_handling_statheader'];
-        $this->pageNotFoundHandler($this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'], $header, $reason);
+        $header = $header ?: $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_statheader'];
+        $this->pageNotFoundHandler($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'], $header, $reason);
         die;
     }
 
@@ -1939,10 +1917,10 @@ class TypoScriptFrontendController
     public function checkPageUnavailableHandler()
     {
         if (
-            $this->TYPO3_CONF_VARS['FE']['pageUnavailable_handling']
+            $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling']
             && !GeneralUtility::cmpIP(
                 GeneralUtility::getIndpEnv('REMOTE_ADDR'),
-                $this->TYPO3_CONF_VARS['SYS']['devIPmask']
+                $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']
             )
         ) {
             $checkPageUnavailableHandler = true;
@@ -2161,7 +2139,7 @@ class TypoScriptFrontendController
                 $this->cHash = $GET_VARS['cHash'];
             }
             if (isset($GET_VARS['MP'])) {
-                $this->MP = $this->TYPO3_CONF_VARS['FE']['enable_mount_pids'] ? $GET_VARS['MP'] : '';
+                $this->MP = $GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] ? $GET_VARS['MP'] : '';
             }
             if (isset($GET_VARS['no_cache']) && $GET_VARS['no_cache']) {
                 $this->set_no_cache('no_cache is requested via GET parameter');
@@ -2186,7 +2164,7 @@ class TypoScriptFrontendController
     public function makeCacheHash()
     {
         // No need to test anything if caching was already disabled.
-        if ($this->no_cache && !$this->TYPO3_CONF_VARS['FE']['pageNotFoundOnCHashError']) {
+        if ($this->no_cache && !$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']) {
             return;
         }
         $GET = GeneralUtility::_GET();
@@ -2194,7 +2172,7 @@ class TypoScriptFrontendController
             $this->cHash_array = $this->cacheHash->getRelevantParameters(GeneralUtility::implodeArrayForUrl('', $GET));
             $cHash_calc = $this->cacheHash->calculateCacheHash($this->cHash_array);
             if ($cHash_calc != $this->cHash) {
-                if ($this->TYPO3_CONF_VARS['FE']['pageNotFoundOnCHashError']) {
+                if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']) {
                     $this->pageNotFoundAndExit('Request parameters could not be validated (&cHash comparison failed)');
                 } else {
                     $this->disableCache();
@@ -2219,7 +2197,7 @@ class TypoScriptFrontendController
     public function reqCHash()
     {
         if (!$this->cHash) {
-            if ($this->TYPO3_CONF_VARS['FE']['pageNotFoundOnCHashError']) {
+            if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']) {
                 if ($this->tempContent) {
                     $this->clearPageCacheContent();
                 }
@@ -2327,9 +2305,9 @@ class TypoScriptFrontendController
                     // we have data from cache
 
                     // Call hook when a page is retrieved from cache:
-                    if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageLoadedFromCache'])) {
+                    if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageLoadedFromCache'])) {
                         $_params = array('pObj' => &$this, 'cache_pages_row' => &$row);
-                        foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageLoadedFromCache'] as $_funcRef) {
+                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageLoadedFromCache'] as $_funcRef) {
                             GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                         }
                     }
@@ -2352,7 +2330,7 @@ class TypoScriptFrontendController
                     if (isset($this->config['config']['debug'])) {
                         $debugCacheTime = (bool)$this->config['config']['debug'];
                     } else {
-                        $debugCacheTime = !empty($this->TYPO3_CONF_VARS['FE']['debug']);
+                        $debugCacheTime = !empty($GLOBALS['TYPO3_CONF_VARS']['FE']['debug']);
                     }
                     if ($debugCacheTime) {
                         $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
@@ -2399,9 +2377,9 @@ class TypoScriptFrontendController
             }
         }
         // Call hook for possible by-pass of requiring of page cache (for recaching purpose)
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache'])) {
             $_params = array('pObj' => &$this, 'disableAcquireCacheData' => &$disableAcquireCacheData);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -2461,12 +2439,12 @@ class TypoScriptFrontendController
             $hashParameters['all'] = $this->all;
         }
         // Call hook to influence the hash calculation
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['createHashBase'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['createHashBase'])) {
             $_params = array(
                 'hashParameters' => &$hashParameters,
                 'createLockHashBase' => $createLockHashBase
             );
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['createHashBase'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['createHashBase'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -2566,9 +2544,9 @@ class TypoScriptFrontendController
             GeneralUtility::_GETset($modifiedGetVars);
         }
         // Hook for postProcessing the configuration array
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'])) {
             $params = array('config' => &$this->config['config']);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'] as $funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'] as $funcRef) {
                 GeneralUtility::callUserFunction($funcRef, $params, $this);
             }
         }
@@ -2589,9 +2567,9 @@ class TypoScriptFrontendController
      */
     public function settingLanguage()
     {
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'])) {
             $_params = array();
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -2692,9 +2670,9 @@ class TypoScriptFrontendController
             list($tN, $fN) = explode(':', $TF);
             $GLOBALS['TCA'][$tN]['columns'][$fN]['l10n_mode'] = 'exclude';
         }
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'])) {
             $_params = array();
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -2769,8 +2747,8 @@ class TypoScriptFrontendController
     public function handleDataSubmission()
     {
         // Hook for processing data submission to extensions
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'] as $_classRef) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'] as $_classRef) {
                 $_procObj = GeneralUtility::getUserObj($_classRef);
                 $_procObj->checkDataSubmission($this);
             }
@@ -2841,7 +2819,7 @@ class TypoScriptFrontendController
     public function setUrlIdToken()
     {
         if ($this->config['config']['ftu']) {
-            $this->getMethodUrlIdToken = $this->TYPO3_CONF_VARS['FE']['get_url_id_token'];
+            $this->getMethodUrlIdToken = $GLOBALS['TYPO3_CONF_VARS']['FE']['get_url_id_token'];
         } else {
             $this->getMethodUrlIdToken = '';
         }
@@ -3032,8 +3010,8 @@ class TypoScriptFrontendController
         // Hook for deciding whether page cache should be written to the cache backend or not
         // NOTE: as hooks are called in a loop, the last hook will have the final word (however each
         // hook receives the current status of the $usePageCache flag)
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['usePageCache'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['usePageCache'] as $_classRef) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['usePageCache'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['usePageCache'] as $_classRef) {
                 $_procObj = GeneralUtility::getUserObj($_classRef);
                 $usePageCache = $_procObj->usePageCache($this, $usePageCache);
             }
@@ -3043,8 +3021,8 @@ class TypoScriptFrontendController
             $this->setPageCacheContent($this->content, $this->config, $timeOutTime);
         }
         // Hook for cache post processing (eg. writing static files!)
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache'] as $_classRef) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache'] as $_classRef) {
                 $_procObj = GeneralUtility::getUserObj($_classRef);
                 $_procObj->insertPageIncache($this, $timeOutTime);
             }
@@ -3194,7 +3172,7 @@ class TypoScriptFrontendController
      */
     public function generatePage_whichScript()
     {
-        if (!$this->TYPO3_CONF_VARS['FE']['noPHPscriptInclude'] && $this->config['config']['pageGenScript']) {
+        if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['noPHPscriptInclude'] && $this->config['config']['pageGenScript']) {
             return $this->tmpl->getFileName($this->config['config']['pageGenScript']);
         }
         return null;
@@ -3213,18 +3191,18 @@ class TypoScriptFrontendController
             $this->set_no_cache('no_cache has been set before the page was generated - safety check', true);
         }
         // Hook for post-processing of page content cached/non-cached:
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
         // Processing if caching is enabled:
         if (!$this->no_cache) {
             // Hook for post-processing of page content before being cached:
-            if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'])) {
+            if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'])) {
                 $_params = array('pObj' => &$this);
-                foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'] as $_funcRef) {
+                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'] as $_funcRef) {
                     GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                 }
             }
@@ -3236,8 +3214,8 @@ class TypoScriptFrontendController
         // to utf-8 so the content MUST be in metaCharset already!
         $this->content = $this->convOutputCharset($this->content);
         // Hook for indexing pages
-        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'])) {
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'] as $_classRef) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'] as $_classRef) {
                 $_procObj = GeneralUtility::getUserObj($_classRef);
                 $_procObj->hook_indexContent($this);
             }
@@ -3438,9 +3416,9 @@ class TypoScriptFrontendController
         // Initialize by status if there is a Redirect URL
         $enableOutput = empty($this->activeUrlHandlers);
         // Call hook for possible disabling of output:
-        if (isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting']) && is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting'])) {
+        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting'])) {
             $_params = array('pObj' => &$this, 'enableOutput' => &$enableOutput);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -3493,9 +3471,9 @@ class TypoScriptFrontendController
             $this->contentStrReplace();
         }
         // Hook for post-processing of page content before output:
-        if (isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']) && is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'])) {
+        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -3505,7 +3483,7 @@ class TypoScriptFrontendController
         // in (admin panel might show...) or if debug mode is turned on, we disable it!
         if (
             (!isset($this->config['config']['enableContentLengthHeader']) || $this->config['config']['enableContentLengthHeader'])
-            && !$this->beUserLogin && !$this->TYPO3_CONF_VARS['FE']['debug']
+            && !$this->beUserLogin && !$GLOBALS['TYPO3_CONF_VARS']['FE']['debug']
             && !$this->config['config']['debug'] && !$this->doWorkspacePreview()
         ) {
             header('Content-Length: ' . strlen($this->content));
@@ -3605,8 +3583,8 @@ class TypoScriptFrontendController
             $replace[] = $this->fe_user->get_URL_ID;
         }
         // Hook for supplying custom search/replace data
-        if (isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-contentStrReplace'])) {
-            $contentStrReplaceHooks = &$this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-contentStrReplace'];
+        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-contentStrReplace'])) {
+            $contentStrReplaceHooks = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-contentStrReplace'];
             if (is_array($contentStrReplaceHooks)) {
                 $_params = array(
                     'search' => &$search,
@@ -3658,9 +3636,9 @@ class TypoScriptFrontendController
     {
         if ($this->fePreview !== 0) {
             $previewInfo = '';
-            if (isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']) && is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'])) {
+            if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'])) {
                 $_params = array('pObj' => &$this);
-                foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'] as $_funcRef) {
+                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'] as $_funcRef) {
                     $previewInfo .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                 }
             }
@@ -3676,9 +3654,9 @@ class TypoScriptFrontendController
     public function hook_eofe()
     {
         // Call hook for end-of-frontend processing:
-        if (isset($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']) && is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'])) {
+        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'])) {
             $_params = array('pObj' => &$this);
-            foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'] as $_funcRef) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'] as $_funcRef) {
                 GeneralUtility::callUserFunction($_funcRef, $_params, $this);
             }
         }
@@ -3974,7 +3952,7 @@ class TypoScriptFrontendController
                 $TSdataArray[] = $v['TSconfig'];
             }
             // Adding the default configuration:
-            $TSdataArray[] = $this->TYPO3_CONF_VARS['BE']['defaultPageTSconfig'];
+            $TSdataArray[] = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'];
             // Bring everything in the right order. Default first, then the Rootline down to the current page
             $TSdataArray = array_reverse($TSdataArray);
             // Parsing the user TS (or getting from cache)
@@ -4090,7 +4068,7 @@ class TypoScriptFrontendController
             $trigger = $file . ' on line ' . $line;
             $warning = '$GLOBALS[\'TSFE\']->set_no_cache() was triggered by ' . $trigger . '.';
         }
-        if ($this->TYPO3_CONF_VARS['FE']['disableNoCacheParameter']) {
+        if ($GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter']) {
             $warning .= ' However, $TYPO3_CONF_VARS[\'FE\'][\'disableNoCacheParameter\'] is set, so it will be ignored!';
             $this->getTimeTracker()->setTSlogMessage($warning, 2);
         } else {
@@ -4157,8 +4135,8 @@ class TypoScriptFrontendController
             // Calculate the timeout time for records on the page and adjust cache timeout if necessary
             $cacheTimeout = min($this->calculatePageCacheTimeout(), $cacheTimeout);
 
-            if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['get_cache_timeout'])) {
-                foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['get_cache_timeout'] as $_funcRef) {
+            if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['get_cache_timeout'])) {
+                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['get_cache_timeout'] as $_funcRef) {
                     $params = array('cacheTimeout' => $cacheTimeout);
                     $cacheTimeout = GeneralUtility::callUserFunction($_funcRef, $params, $this);
                 }
index db5f424..b0e84a9 100644 (file)
@@ -246,7 +246,7 @@ class RequestHandler implements RequestHandlerInterface
         if (isset($this->controller->config['config']['debug'])) {
             $debugParseTime = (bool)$this->controller->config['config']['debug'];
         } else {
-            $debugParseTime = !empty($this->controller->TYPO3_CONF_VARS['FE']['debug']);
+            $debugParseTime = !empty($GLOBALS['TYPO3_CONF_VARS']['FE']['debug']);
         }
         if ($this->controller->isOutputting() && $debugParseTime) {
             $this->controller->content .= LF . '<!-- Parsetime: ' . $this->controller->scriptParseTime . 'ms -->';
@@ -344,7 +344,7 @@ class RequestHandler implements RequestHandlerInterface
     {
         $this->controller = GeneralUtility::makeInstance(
             TypoScriptFrontendController::class,
-            $GLOBALS['TYPO3_CONF_VARS'],
+            null,
             GeneralUtility::_GP('id'),
             GeneralUtility::_GP('type'),
             GeneralUtility::_GP('no_cache'),
index 4c6aa6f..ff0cb02 100644 (file)
@@ -102,7 +102,6 @@ class PageGenerator
         $tsfe->lockFilePath = '' . $tsfe->config['config']['lockFilePath'];
         $tsfe->lockFilePath = $tsfe->lockFilePath ?: $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'];
         $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'] = (bool)(isset($tsfe->config['config']['processor_allowUpscaling']) ? $tsfe->config['config']['processor_allowUpscaling'] : $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling']);
-        $tsfe->TYPO3_CONF_VARS['GFX']['processor_allowUpscaling'] = $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'];
         $tsfe->ATagParams = trim($tsfe->config['config']['ATagParams']) ? ' ' . trim($tsfe->config['config']['ATagParams']) : '';
         if ($tsfe->config['config']['setJS_mouseOver']) {
             $tsfe->setJS('mouseOver');
@@ -872,10 +871,7 @@ class PageGenerator
         if ($tsfe->config['config']['disableBodyTag']) {
             $bodyTag = '';
         } else {
-            $defBT = $tsfe->pSetup['bodyTagCObject'] ? $tsfe->cObj->cObjGetSingle($tsfe->pSetup['bodyTagCObject'], $tsfe->pSetup['bodyTagCObject.'], 'bodyTagCObject') : '';
-            if (!$defBT) {
-                $defBT = $tsfe->defaultBodyTag;
-            }
+            $defBT = $tsfe->pSetup['bodyTagCObject'] ? $tsfe->cObj->cObjGetSingle($tsfe->pSetup['bodyTagCObject'], $tsfe->pSetup['bodyTagCObject.'], 'bodyTagCObject') : '<body>';
             $bodyTag = $tsfe->pSetup['bodyTag'] ? $tsfe->pSetup['bodyTag'] : $defBT;
             if (isset($tsfe->pSetup['bodyTagMargins'])) {
                 $margins = (int)$tsfe->pSetup['bodyTagMargins'];
index dc6fc77..e22398d 100644 (file)
@@ -110,7 +110,7 @@ class EidUtility
         // Cached instance
         static $tsfe = null;
         if (is_null($tsfe)) {
-            $tsfe = GeneralUtility::makeInstance(TypoScriptFrontendController::class, $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
+            $tsfe = GeneralUtility::makeInstance(TypoScriptFrontendController::class, null, 0, 0);
         }
         return $tsfe;
     }
index d236078..61e990c 100644 (file)
@@ -34,8 +34,7 @@ class TypoScriptFrontendControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
     {
         GeneralUtility::flushInternalRuntimeCaches();
         $this->subject = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
-        $this->subject->TYPO3_CONF_VARS = $GLOBALS['TYPO3_CONF_VARS'];
-        $this->subject->TYPO3_CONF_VARS['SYS']['encryptionKey'] = '170928423746123078941623042360abceb12341234231';
+        $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '170928423746123078941623042360abceb12341234231';
 
         $pageRepository = $this->getMockBuilder(PageRepository::class)->getMock();
         $this->subject->sys_page = $pageRepository;
index 489a7d3..1ca8c08 100644 (file)
@@ -77,7 +77,7 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
             // configuration
             $this->tsfeObj = GeneralUtility::makeInstance(
                 \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class,
-                $GLOBALS['TYPO3_CONF_VARS'],
+                null,
                 GeneralUtility::_GP('id'),
                 GeneralUtility::_GP('type'),
                 GeneralUtility::_GP('no_cache'),
@@ -240,13 +240,13 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
             // "log out"
             if ($inputCode == 'LOGOUT') {
                 setcookie($this->previewKey, '', 0, GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
-                if ($this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']) {
-                    $templateFile = PATH_site . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate'];
+                if ($GLOBALS['TYPO3_CONF_VARS']['FE']['workspacePreviewLogoutTemplate']) {
+                    $templateFile = PATH_site . $GLOBALS['TYPO3_CONF_VARS']['FE']['workspacePreviewLogoutTemplate'];
                     if (@is_file($templateFile)) {
                         $message = file_get_contents($templateFile);
                     } else {
                         $message = '<strong>ERROR!</strong><br>Template File "'
-                            . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']
+                            . $GLOBALS['TYPO3_CONF_VARS']['FE']['workspacePreviewLogoutTemplate']
                             . '" configured with $TYPO3_CONF_VARS["FE"]["workspacePreviewLogoutTemplate"] not found. Please contact webmaster about this problem.';
                     }
                 } else {