[BUGFIX] Caching tables of new extensions are not created
authorOliver Hader <oliver@typo3.org>
Mon, 24 Oct 2011 22:34:45 +0000 (00:34 +0200)
committerXavier Perseguers <xavier@typo3.org>
Mon, 24 Oct 2011 23:00:21 +0000 (01:00 +0200)
Creating the caching tables of an extension that has been installed in
the same process does not work. Since the cachingConfiguration of the
new extension is not forwarded to the cache manager, the new tables
are just not known there.

Change-Id: I0e72cffc43165be30bde6e7f3ec2c19c1f668bb2
Fixes: #31249
Reviewed-on: http://review.typo3.org/6274
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/em/classes/install/class.tx_em_install.php

index 0b99f57..80f1f29 100644 (file)
@@ -1624,6 +1624,12 @@ class tx_em_Install {
        function forceDBupdates($extKey, $extInfo) {
                // Updating tables and fields?
                if (is_array($extInfo['files']) && in_array('ext_tables.sql', $extInfo['files'])) {
+                               // Update the cache configurations with information of new extensions,
+                               // that have been installed during the current process
+                       $GLOBALS['typo3CacheManager']->setCacheConfigurations(
+                               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']
+                       );
+
                        $fileContent = t3lib_div::getUrl(tx_em_Tools::getExtPath($extKey, $extInfo['type']) . 'ext_tables.sql');
                        $fileContent .= t3lib_cache::getDatabaseTableDefinitions();
 
@@ -1674,4 +1680,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/install/class.tx_em_install.php']);
 }
 
-?>
+?>
\ No newline at end of file