fixt error in enableExtension()
authorSteffen Kamper <info@sk-typo3.de>
Wed, 19 Jan 2011 21:56:06 +0000 (21:56 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 19 Jan 2011 21:56:06 +0000 (21:56 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10143 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php

index c421710..9cc630e 100644 (file)
@@ -71,10 +71,15 @@ class tx_em_Connection_ExtDirectServer {
        /**
         * Constructor
         *
+        * @param boolean $createTemplateInstance: set to FALSE if no instance of template class needs to be created
         * @return void
         */
-       public function __construct() {
-               $this->template = t3lib_div::makeInstance('template');
+       public function __construct($createTemplateInstance = TRUE) {
+                       // Create an instance of template class only if necessary
+                       // It is necessary only if extension configuration is to be displayed
+               if ($createTemplateInstance) {
+                       $this->template = t3lib_div::makeInstance('template');
+               }
                $this->globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
        }