[BUGFIX] Make category TCA changes cacheable
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / ext_localconf.php
index 60243c5..c00d7ed 100644 (file)
@@ -2,15 +2,17 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
+/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
+$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
 
 if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
-       \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
+       $signalSlotDispatcher->connect(
                'TYPO3\\CMS\\Core\\Resource\\ResourceFactory',
                \TYPO3\CMS\Core\Resource\ResourceFactoryInterface::SIGNAL_PostProcessStorage,
                'TYPO3\\CMS\\Core\\Resource\\Security\\StoragePermissionsAspect',
                'addUserPermissionsToStorage'
        );
-       \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
+       $signalSlotDispatcher->connect(
                'PackageManagement',
                'packagesMayHaveChanged',
                'TYPO3\\CMS\\Core\\Package\\PackageManager',
@@ -18,11 +20,20 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
        );
 }
 
-\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
+$signalSlotDispatcher->connect(
        'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
        \TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileDelete,
        'TYPO3\\CMS\\Core\\Resource\\Processing\\FileDeletionAspect',
        'removeFromRepository'
 );
 
+$signalSlotDispatcher->connect(
+       'TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility',
+       'tcaIsBeingBuilt',
+       'TYPO3\\CMS\\Core\\Category\\CategoryRegistry',
+       'addCategoryRegistryTcaChanges'
+);
+
+unset($signalSlotDispatcher);
+
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['dumpFile'] = 'EXT:core/Resources/PHP/FileDumpEID.php';