[BUGFIX] Move TCA modification of EXT:cms to TCA/Overrides. 48/30648/6
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 10 Jun 2014 18:52:23 +0000 (20:52 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 21 Jun 2014 16:53:59 +0000 (18:53 +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.

Change-Id: Idb1be39c754d5566e52623103477b94887077cdb
Resolves: #59463
Related: #59414
Releases: 6.3, 6.2
Reviewed-on: https://review.typo3.org/30648
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Sebastian Fischer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/cms/Configuration/TCA/Overrides/pages_language_overlay.php [new file with mode: 0644]
typo3/sysext/cms/Configuration/TCA/Overrides/tt_content.php [new file with mode: 0644]
typo3/sysext/cms/ext_tables.php

diff --git a/typo3/sysext/cms/Configuration/TCA/Overrides/pages_language_overlay.php b/typo3/sysext/cms/Configuration/TCA/Overrides/pages_language_overlay.php
new file mode 100644 (file)
index 0000000..38a1fd9
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
+// Keep old code (pre-FAL) for installations that haven't upgraded yet.
+// @deprecated since TYPO3 6.0, please remove at earliest in TYPO3 6.2
+// existing installation - and files are merged, nothing to do
+if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'pages_language_overlay:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
+       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[pages_language_overlay][columns][media] yet. Please do so before TYPO3 v7.');
+       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
+       $GLOBALS['TCA']['pages_language_overlay']['columns']['media']['config'] = array(
+               'type' => 'group',
+               'internal_type' => 'file',
+               'allowed' => $GLOBALS['TCA']['pages']['columns']['media']['config']['allowed'],
+               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
+               'uploadfolder' => 'uploads/media',
+               'show_thumbs' => '1',
+               'size' => '3',
+               'maxitems' => '100',
+               'minitems' => '0'
+       );
+}
\ No newline at end of file
diff --git a/typo3/sysext/cms/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/cms/Configuration/TCA/Overrides/tt_content.php
new file mode 100644 (file)
index 0000000..e9d0380
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
+// keep old code (pre-FAL) for installations that haven't upgraded yet. please remove this code in TYPO3 7.0
+// @deprecated since TYPO3 6.0, please remove in TYPO3 7.0
+// existing installation - and files are merged, nothing to do
+if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'tt_content:image')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
+       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[tt_content][columns][image] yet. Please do so before TYPO3 v7.');
+       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
+       $GLOBALS['TCA']['tt_content']['columns']['image']['config'] = array(
+               'type' => 'group',
+               'internal_type' => 'file',
+               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
+               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
+               'uploadfolder' => 'uploads/pics',
+               'show_thumbs' => '1',
+               'size' => '3',
+               'maxitems' => '200',
+               'minitems' => '0',
+               'autoSizeMax' => 40
+       );
+}
+
+if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'tt_content:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
+       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[tt_content][columns][media] yet. Please do so before TYPO3 v7.');
+       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
+       $GLOBALS['TCA']['tt_content']['columns']['media']['config'] = array(
+               'type' => 'group',
+               'internal_type' => 'file',
+               'allowed' => '',
+               // Must be empty for disallowed to work.
+               'disallowed' => PHP_EXTENSIONS_DEFAULT,
+               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
+               'uploadfolder' => 'uploads/media',
+               'show_thumbs' => '1',
+               'size' => '3',
+               'maxitems' => '10',
+               'minitems' => '0'
+       );
+}
\ No newline at end of file
index 707063c..46ac899 100644 (file)
@@ -21,61 +21,4 @@ if (!function_exists('user_sortPluginList')) {
                        }
                );
        }
-}
-
-// keep old code (pre-FAL) for installations that haven't upgraded yet. please remove this code in TYPO3 7.0
-// @deprecated since TYPO3 6.0, please remove in TYPO3 7.0
-// existing installation - and files are merged, nothing to do
-if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'tt_content:image')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
-       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[tt_content][columns][image] yet. Please do so before TYPO3 v7.');
-       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
-       $GLOBALS['TCA']['tt_content']['columns']['image']['config'] = array(
-               'type' => 'group',
-               'internal_type' => 'file',
-               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
-               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
-               'uploadfolder' => 'uploads/pics',
-               'show_thumbs' => '1',
-               'size' => '3',
-               'maxitems' => '200',
-               'minitems' => '0',
-               'autoSizeMax' => 40
-       );
-}
-
-if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'tt_content:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
-       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[tt_content][columns][media] yet. Please do so before TYPO3 v7.');
-       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
-       $GLOBALS['TCA']['tt_content']['columns']['media']['config'] = array(
-               'type' => 'group',
-               'internal_type' => 'file',
-               'allowed' => '',
-               // Must be empty for disallowed to work.
-               'disallowed' => PHP_EXTENSIONS_DEFAULT,
-               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
-               'uploadfolder' => 'uploads/media',
-               'show_thumbs' => '1',
-               'size' => '3',
-               'maxitems' => '10',
-               'minitems' => '0'
-       );
-}
-
-// Keep old code (pre-FAL) for installations that haven't upgraded yet.
-// @deprecated since TYPO3 6.0, please remove at earliest in TYPO3 6.2
-// existing installation - and files are merged, nothing to do
-if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'pages_language_overlay:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
-       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[pages_language_overlay][columns][media] yet. Please do so before TYPO3 v7.');
-       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
-       $GLOBALS['TCA']['pages_language_overlay']['columns']['media']['config'] = array(
-               'type' => 'group',
-               'internal_type' => 'file',
-               'allowed' => $TCA['pages']['columns']['media']['config']['allowed'],
-               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
-               'uploadfolder' => 'uploads/media',
-               'show_thumbs' => '1',
-               'size' => '3',
-               'maxitems' => '100',
-               'minitems' => '0'
-       );
-}
+}
\ No newline at end of file