[TASK] Move GlobalScope template-init to Bootstrap
authorSteffen Ritter <info@rs-websystems.de>
Thu, 21 Jun 2012 20:26:12 +0000 (22:26 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 21 Jun 2012 21:23:23 +0000 (23:23 +0200)
The Template Class is currently initialized in global
scope in init.php.
Move that to the Bootstrap.

Change-Id: I9b1be2d9f953f7b3bf76849985bf160e976232b5
Resolves: #38269
Releases: 6.0
Reviewed-on: http://review.typo3.org/12274
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/classes/Bootstrap.php
typo3/init.php

index b220b23..32480af 100644 (file)
@@ -1529,5 +1529,18 @@ class Typo3_Bootstrap {
                        die('Calculated absolute path to typo3conf directory does not exist');
                }
        }
+
+       /**
+        * Provides an instance of "template" for backend-modules to
+        * work with.
+        *
+        * @return Typo3_Bootstrap
+        */
+       public function initializeBackendTemplate() {
+               $GLOBALS['TBE_TEMPLATE'] = t3lib_div::makeInstance('template');
+
+               return $this;
+       }
+
 }
 ?>
index 7b0bc4b..5c62983 100644 (file)
@@ -110,12 +110,8 @@ Typo3_Bootstrap::getInstance()
        ->initializeBackendUser()
        ->initializeBackendUserMounts()
        ->initializeLanguageObject()
+       ->initializeBackendTemplate()
        ->endOutputBufferingAndCleanPreviousOutput()
        ->initializeOutputCompression();
 
-// ******************************
-// The template is loaded
-// ******************************
-$GLOBALS['TBE_TEMPLATE'] = t3lib_div::makeInstance('template');
-
 ?>
\ No newline at end of file