[BUGFIX] Move TCA for fe_users and fe_groups into TCA/Overrides 20/30620/8
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 7 Jun 2014 06:58:30 +0000 (08:58 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 10 Jun 2014 11:55:42 +0000 (13:55 +0200)
TCA manipulation code must no longer reside in ext_tables.php, but
moved to Configuration/TCA/Overrides/<tablename>.php. Leftovers
in ext_tables might disturb loading order of TCA changes.

Change-Id: Ie919a856fbd8242d19110c8db8d01ff7865c913c
Resolves: #59397
Releases: 6.2
Reviewed-on: https://review.typo3.org/30620
Reviewed-by: Krzysztof Adamczyk
Tested-by: Krzysztof Adamczyk
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/extbase/Configuration/TCA/Overrides/fe_groups.php [new file with mode: 0644]
typo3/sysext/extbase/Configuration/TCA/Overrides/fe_users.php [new file with mode: 0644]
typo3/sysext/extbase/ext_tables.php

diff --git a/typo3/sysext/extbase/Configuration/TCA/Overrides/fe_groups.php b/typo3/sysext/extbase/Configuration/TCA/Overrides/fe_groups.php
new file mode 100644 (file)
index 0000000..67c3375
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+if (!isset($GLOBALS['TCA']['fe_groups']['ctrl']['type'])) {
+       $tca = array(
+               'ctrl' => array(
+                       'type' => 'tx_extbase_type',
+               ),
+               'columns' => array(
+                       'tx_extbase_type' => array(
+                               'exclude' => 1,
+                               'label' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_groups.tx_extbase_type',
+                               'config' => array(
+                                       'type' => 'select',
+                                       'items' => array(
+                                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_groups.tx_extbase_type.0', '0'),
+                                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_groups.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUserGroup', 'Tx_Extbase_Domain_Model_FrontendUserGroup')
+                                       ),
+                                       'size' => 1,
+                                       'maxitems' => 1,
+                                       'default' => '0'
+                               )
+                       )
+               ),
+               'types' => array(
+                       'Tx_Extbase_Domain_Model_FrontendUserGroup' => $GLOBALS['TCA']['fe_groups']['types']['0'],
+               ),
+       );
+       $GLOBALS['TCA']['fe_groups'] = array_replace_recursive($GLOBALS['TCA']['fe_groups'], $tca);
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_groups', 'tx_extbase_type');
+} else {
+       $GLOBALS['TCA']['fe_groups']['types']['Tx_Extbase_Domain_Model_FrontendUserGroup'] = $GLOBALS['TCA']['fe_groups']['types']['0'];
+}
diff --git a/typo3/sysext/extbase/Configuration/TCA/Overrides/fe_users.php b/typo3/sysext/extbase/Configuration/TCA/Overrides/fe_users.php
new file mode 100644 (file)
index 0000000..4cf5112
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+if (!isset($GLOBALS['TCA']['fe_users']['ctrl']['type'])) {
+       $tca = array(
+               'ctrl' => array(
+                       'type' => 'tx_extbase_type',
+               ),
+               'columns' => array(
+                       'tx_extbase_type' => array(
+                               'exclude' => 1,
+                               'label' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type',
+                               'config' => array(
+                                       'type' => 'select',
+                                       'items' => array(
+                                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.0', '0'),
+                                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser', 'Tx_Extbase_Domain_Model_FrontendUser')
+                                       ),
+                                       'size' => 1,
+                                       'maxitems' => 1,
+                                       'default' => '0'
+                               )
+                       )
+               ),
+               'types' => array(
+                       'Tx_Extbase_Domain_Model_FrontendUser' => $GLOBALS['TCA']['fe_users']['types']['0'],
+               ),
+       );
+       $GLOBALS['TCA']['fe_users'] = array_replace_recursive($GLOBALS['TCA']['fe_users'], $tca);
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'tx_extbase_type');
+} else {
+       $GLOBALS['TCA']['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser'] = $GLOBALS['TCA']['fe_users']['types']['0'];
+}
index 7a40f00..f3c9fc1 100644 (file)
@@ -7,50 +7,7 @@ if (TYPO3_MODE == 'BE') {
        $TBE_MODULES['_dispatcher'][] = 'TYPO3\\CMS\\Extbase\\Core\\ModuleRunnerInterface';
 }
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['extbase'][] = 'TYPO3\\CMS\\Extbase\\Utility\\ExtbaseRequirementsCheckUtility';
-if (!isset($TCA['fe_users']['ctrl']['type'])) {
-       $tempColumns = array(
-               'tx_extbase_type' => array(
-                       'exclude' => 1,
-                       'label' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type',
-                       'config' => array(
-                               'type' => 'select',
-                               'items' => array(
-                                       array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.0', '0'),
-                                       array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser', 'Tx_Extbase_Domain_Model_FrontendUser')
-                               ),
-                               'size' => 1,
-                               'maxitems' => 1,
-                               'default' => '0'
-                       )
-               )
-       );
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns);
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'tx_extbase_type');
-       $TCA['fe_users']['ctrl']['type'] = 'tx_extbase_type';
-}
-$TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser'] = $TCA['fe_users']['types']['0'];
-if (!isset($TCA['fe_groups']['ctrl']['type'])) {
-       $tempColumns = array(
-               'tx_extbase_type' => array(
-                       'exclude' => 1,
-                       'label' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_groups.tx_extbase_type',
-                       'config' => array(
-                               'type' => 'select',
-                               'items' => array(
-                                       array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_groups.tx_extbase_type.0', '0'),
-                                       array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:fe_groups.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUserGroup', 'Tx_Extbase_Domain_Model_FrontendUserGroup')
-                               ),
-                               'size' => 1,
-                               'maxitems' => 1,
-                               'default' => '0'
-                       )
-               )
-       );
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_groups', $tempColumns);
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_groups', 'tx_extbase_type');
-       $TCA['fe_groups']['ctrl']['type'] = 'tx_extbase_type';
-}
-$TCA['fe_groups']['types']['Tx_Extbase_Domain_Model_FrontendUserGroup'] = $TCA['fe_groups']['types']['0'];
+
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Extbase\\Scheduler\\Task'] = array(
        'extension' => $_EXTKEY,
        'title' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:task.name',