[BUGFIX] Internal extension information is not updated properly
authorOliver Hader <oliver@typo3.org>
Mon, 24 Oct 2011 21:53:30 +0000 (23:53 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Tue, 25 Oct 2011 00:48:20 +0000 (02:48 +0200)
tx_em_Tools::refreshGlobalExtList() is triggered on installing
extensions. However the current implementation is wrong (early
return) and does not consider $TYPO3_CONF_VARS.

This misbehavior also prevents the Introduction Package to
correctly install accordant cf_* tables of workspaces and
extbase, since the information in $TYPO3_CONF_VARS is not
available globally.

Change-Id: I3a1b8ea9d2da40a52d9838ac8b1fe9551b6dfed8
Fixes: #31246
Reviewed-on: http://review.typo3.org/6270
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/em/classes/tools/class.tx_em_tools.php

index 616de29..4618a8c 100644 (file)
@@ -135,22 +135,16 @@ final class tx_em_Tools {
         * @return void
         */
        public static function refreshGlobalExtList() {
-               global $TYPO3_LOADED_EXT;
-
-               $TYPO3_LOADED_EXT = t3lib_extMgm::typo3_loadExtensions();
-               if ($TYPO3_LOADED_EXT['_CACHEFILE']) {
-                       require(PATH_typo3conf . $TYPO3_LOADED_EXT['_CACHEFILE'] . '_ext_localconf.php');
-               }
-               return;
-
                $GLOBALS['TYPO3_LOADED_EXT'] = t3lib_extMgm::typo3_loadExtensions();
-               if ($TYPO3_LOADED_EXT['_CACHEFILE']) {
-                       require(PATH_typo3conf . $TYPO3_LOADED_EXT['_CACHEFILE'] . '_ext_localconf.php');
+               if ($GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE']) {
+                       require(PATH_typo3conf . $GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'] . '_ext_localconf.php');
                } else {
-                       $temp_TYPO3_LOADED_EXT = $TYPO3_LOADED_EXT;
+                       $temp_TYPO3_LOADED_EXT = $GLOBALS['TYPO3_LOADED_EXT'];
                        foreach ($temp_TYPO3_LOADED_EXT as $_EXTKEY => $temp_lEDat) {
                                if (is_array($temp_lEDat) && $temp_lEDat['ext_localconf.php']) {
-                                       $_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
+                                               // Make sure $TYPO3_CONF_VARS is also available within the included files
+                                       global $TYPO3_CONF_VARS;
+                                       $_EXTCONF = $TYPO3_CONF_VARS['EXT']['extConf'][$_EXTKEY];
                                        require($temp_lEDat['ext_localconf.php']);
                                }
                        }