[BUGFIX] Move TCA modification of EXT:felogin to TCA/Overrides. 29/30629/9
authorJost Baron <jost@netzkoenig.de>
Mon, 9 Jun 2014 10:15:55 +0000 (12:15 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 5 Jul 2014 13:10:49 +0000 (15:10 +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 and spoil
proper caching.

Resolves: #59462
Related: #59414
Releases: 6.2
Change-Id: I0bd42865f199b7fcccc1ee9133776271a1af2bcd
Reviewed-on: https://review.typo3.org/30629
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/felogin/Configuration/TCA/Overrides/fe_groups.php [new file with mode: 0644]
typo3/sysext/felogin/Configuration/TCA/Overrides/fe_users.php [new file with mode: 0644]
typo3/sysext/felogin/Configuration/TCA/Overrides/tt_content.php [new file with mode: 0644]
typo3/sysext/felogin/ext_tables.php [deleted file]

diff --git a/typo3/sysext/felogin/Configuration/TCA/Overrides/fe_groups.php b/typo3/sysext/felogin/Configuration/TCA/Overrides/fe_groups.php
new file mode 100644 (file)
index 0000000..b838e9f
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+// Adds the redirect field to the fe_groups table
+$tempColumns = array(
+       'felogin_redirectPid' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_redirectPid',
+               'config' => array(
+                       'type' => 'group',
+                       'internal_type' => 'db',
+                       'allowed' => 'pages',
+                       'size' => 1,
+                       'minitems' => 0,
+                       'maxitems' => 1,
+                       'wizards' => array(
+                               'suggest' => array(
+                                       'type' => 'suggest'
+                               )
+                       )
+               )
+       )
+);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_groups', $tempColumns);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_groups', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');
diff --git a/typo3/sysext/felogin/Configuration/TCA/Overrides/fe_users.php b/typo3/sysext/felogin/Configuration/TCA/Overrides/fe_users.php
new file mode 100644 (file)
index 0000000..361cb73
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+// Adds the redirect field and the forgotHash field to the fe_users-table
+$tempColumns = array(
+       'felogin_redirectPid' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_redirectPid',
+               'config' => array(
+                       'type' => 'group',
+                       'internal_type' => 'db',
+                       'allowed' => 'pages',
+                       'size' => 1,
+                       'minitems' => 0,
+                       'maxitems' => 1,
+                       'wizards' => array(
+                               'suggest' => array(
+                                       'type' => 'suggest'
+                               )
+                       )
+               )
+       ),
+       'felogin_forgotHash' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_forgotHash',
+               'config' => array(
+                       'type' => 'passthrough'
+               )
+       )
+);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');
diff --git a/typo3/sysext/felogin/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/felogin/Configuration/TCA/Overrides/tt_content.php
new file mode 100644 (file)
index 0000000..4b97012
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
+       '*',
+       'FILE:EXT:felogin/flexform.xml',
+       'login'
+);
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
+       'tt_content',
+       'CType',
+       array(
+               'LLL:EXT:cms/locallang_ttc.xlf:CType.I.10',
+               'login',
+               'i/tt_content_login.gif'
+       ),
+       'mailform',
+       'after'
+);
+
+$GLOBALS['TCA']['tt_content']['types']['login']['showitem'] =
+       '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,'
+       . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,'
+       . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.plugin,pi_flexform;;;;1-1-1,'
+       . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,'
+       . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility,'
+       . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access,'
+       . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance,'
+       . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,'
+       . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour,'
+       . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended';
diff --git a/typo3/sysext/felogin/ext_tables.php b/typo3/sysext/felogin/ext_tables.php
deleted file mode 100644 (file)
index ad2fced..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-if (!defined('TYPO3_MODE')) {
-       die('Access denied.');
-}
-$_EXTCONF = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['felogin']);
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:' . $_EXTKEY . '/flexform.xml', 'login');
-
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array(
-       'LLL:EXT:cms/locallang_ttc.xlf:CType.I.10',
-       'login',
-       'i/tt_content_login.gif'
-), 'mailform', 'after');
-$GLOBALS['TCA']['tt_content']['types']['login']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
-                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
-                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.plugin,
-                                                                                                       pi_flexform;;;;1-1-1,
-                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,
-                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility,
-                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access,
-                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance,
-                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,
-                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour,
-                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended';
-// Adds the redirect field to the fe_groups table
-$tempColumns = array(
-       'felogin_redirectPid' => array(
-               'exclude' => 1,
-               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_redirectPid',
-               'config' => array(
-                       'type' => 'group',
-                       'internal_type' => 'db',
-                       'allowed' => 'pages',
-                       'size' => 1,
-                       'minitems' => 0,
-                       'maxitems' => 1,
-                       'wizards' => array(
-                               'suggest' => array(
-                                       'type' => 'suggest'
-                               )
-                       )
-               )
-       )
-);
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_groups', $tempColumns);
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_groups', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');
-// Adds the redirect field and the forgotHash field to the fe_users-table
-$tempColumns = array(
-       'felogin_redirectPid' => array(
-               'exclude' => 1,
-               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_redirectPid',
-               'config' => array(
-                       'type' => 'group',
-                       'internal_type' => 'db',
-                       'allowed' => 'pages',
-                       'size' => 1,
-                       'minitems' => 0,
-                       'maxitems' => 1,
-                       'wizards' => array(
-                               'suggest' => array(
-                                       'type' => 'suggest'
-                               )
-                       )
-               )
-       ),
-       'felogin_forgotHash' => array(
-               'exclude' => 1,
-               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_forgotHash',
-               'config' => array(
-                       'type' => 'passthrough'
-               )
-       )
-);
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns);
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');