[!!!][TASK] Get rid of loadTCA and simplify FE cache behavior 78/17978/5
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Feb 2013 11:13:25 +0000 (12:13 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 5 Feb 2013 11:14:44 +0000 (12:14 +0100)
The frontend rendering aims to not load the full TCA including
columns settings to reduce rendering time for full cache pages.

This approach is ridiculous complex and using it is so hard to get
right for developers that even core patches in this area are
usually broken. The current situation is neither simple
nor transparent.

Currently, if no page cache entry exists during rendering, the whole
ext_tables.php are executed, the page is rendered and stuffed to
cache. While the full TCA is available at this point, it is reduced
to the 'ctrl' sections for the next run, without 'columns', and
stuffed to cache. On next access, the cache entry is used,
ext_tables.php and TCA is not fully loaded. This leads to all sort of
problems, if for example those pages contain USER_INT plugins that
rely on some TCA settings. Furthermore, it might happen, that
different plugins or the core then requires the ext_tables files more
than once, which leads to funny problems if some developer does not
know this and uses require_once instead of require inside
ext_tables.php. Issues like that are very hard to track down.

The current implementation relies on the methods TSFE->includeTCA(),
TSFE->getCompressedTCarray() and GeneralUtility->loadTCA(), where
especially includeTCA() with its parameter is so hard to understand
that it is impossible to use in a correct way without digging through
the content rendering for hours.

The patch obsoletes all three of the above methods. Instead, from now
on, the bootstrap in the frontend is configured to always load the
full TCA including columns sections, even in full cached context.
The only exception are eID scripts, but the existing API to load
additional TCA in the eID controller is modified to also load all.

On the downside, this patch costs around 30% of additional
performance for the rendering of full cached pages. As soon as there
is some USER_INT on a page, or if a page is not cached, the overhead
is around zero. So, this patch costs performance for 'simple' pages,
while it is of no effect for anything more complex.

The goal is to reduce developer headaches at this point and to
make the frontend rendering better predictable and more easy
to maintain. It is furthermore one step to implement a better
configuration handling in the long run.

Change-Id: I5aecd542abe92f2de4ee0d40b5db44c493d304a3
Resolves: #45107
Releases: 6.1
Reviewed-on: https://review.typo3.org/17978
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
65 files changed:
t3lib/class.t3lib_userauthgroup.php
t3lib/stddb/tables.php
typo3/show_item.php
typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/Wizard/EditController.php
typo3/sysext/backend/Classes/Form/DataPreprocessor.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/Element/SuggestElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php
typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Tests/Unit/Utility/ExtensionMangementUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/Fixtures/RuntimeException.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php
typo3/sysext/css_styled_content/ext_tables.php
typo3/sysext/felogin/ext_tables.php
typo3/sysext/form/ext_tables.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Utility/EidUtility.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/ext_tables.php
typo3/sysext/install/Classes/Installer.php
typo3/sysext/lang/locallang_csh_em.xlf
typo3/sysext/lowlevel/Classes/CleanFlexformCommand.php
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/openid/ext_tables.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/rtehtmlarea/hooks/softref/ext_tables.php
typo3/sysext/saltedpasswords/ext_tables.php
typo3/sysext/statictemplates/ext_tables.php
typo3/sysext/statictemplates/media/scripts/fe_adminLib.inc
typo3/sysext/t3editor/ext_tables.php
typo3/sysext/t3skin/ext_tables.php
typo3/sysext/tstemplate_info/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php

index 0eaec1d..be698f3 100644 (file)
@@ -493,7 +493,6 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
                        }
                        break;
                case 'individual':
-                       t3lib_div::loadTCA($table);
                        if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$field])) {
                                $items = $GLOBALS['TCA'][$table]['columns'][$field]['config']['items'];
                                if (is_array($items)) {
@@ -590,7 +589,6 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
         */
        public function recordEditAccessInternals($table, $idOrRow, $newRecord = FALSE, $deletedRecord = FALSE, $checkFullLanguageAccess = FALSE) {
                if (isset($GLOBALS['TCA'][$table])) {
-                       t3lib_div::loadTCA($table);
                        // Always return TRUE for Admin users.
                        if ($this->isAdmin()) {
                                return TRUE;
index 418c989..b45f78a 100644 (file)
@@ -53,8 +53,8 @@
  * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
  *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- * @see tslib_fe::includeTCA(), typo3/init.php, t3lib/stddb/load_ext_tables.php
  */
+
 /**
  * $PAGES_TYPES defines the various types of pages (field: doktype) the system
  * can handle and what restrictions may apply to them.
@@ -184,8 +184,6 @@ $TCA['pages'] = array(
                'searchFields' => 'title,alias,nav_title,subtitle,url,keywords,description,abstract,author,author_email'
        )
 );
-// Initialize the additional configuration of the table 'pages':
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('pages');
 /**
  * Table "be_users":
  * Backend Users for TYPO3.
index b2774dc..7dd87b1 100644 (file)
@@ -64,7 +64,6 @@ class transferData extends \TYPO3\CMS\Backend\Form\DataPreprocessor {
         * @todo Define visibility
         */
        public function regItem($table, $id, $field, $content) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                switch ($config['type']) {
                case 'input':
index 7da136e..60b0177 100644 (file)
@@ -102,7 +102,6 @@ class TranslationConfigurationProvider {
         */
        public function translationInfo($table, $uid, $sys_language_uid = 0, $row = NULL, $selFieldList = '') {
                if ($GLOBALS['TCA'][$table] && $uid) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if ($row === NULL) {
                                $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
                        }
index d693889..4f5e0da 100644 (file)
@@ -119,7 +119,6 @@ class ElementInformationController {
                // Checking if the $table value is really a table and if the user has
                // access to it.
                if (isset($GLOBALS['TCA'][$this->table])) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($this->table);
                        $this->type = 'db';
                        $this->uid = intval($this->uid);
                        // Check permissions and uid value:
@@ -150,7 +149,6 @@ class ElementInformationController {
                                $this->access = $this->fileObject->checkActionPermission('read');
                                $this->type = 'file';
                                $this->table = 'sys_file';
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($this->table);
                                try {
                                        $this->row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($this->table, $this->fileObject->getUid());
                                } catch (\Exception $e) {
@@ -387,7 +385,6 @@ class ElementInformationController {
         * @return string Field name
         */
        public function getFieldName($tableName, $fieldName) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                if ($GLOBALS['TCA'][$tableName]['columns'][$fieldName]['label'] !== NULL) {
                        $field = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$tableName]['columns'][$fieldName]['label']);
                        if (trim($field) === '') {
index 3e20fb2..be6de43 100644 (file)
@@ -417,8 +417,6 @@ class NewContentElementController {
         * @todo Define visibility
         */
        public function removeInvalidElements(&$wizardItems) {
-               // Load full table definition:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
                // Get TCEFORM from TSconfig of current page
                $row = array('pid' => $this->id);
                $TCEFORM_TSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getTCEFORM_TSconfig('tt_content', $row);
index c7c2b9c..c4b8d83 100644 (file)
@@ -813,8 +813,6 @@ class PageLayoutController {
                // Traverse the list of table names which has records on this page (that array is populated
                // by the $dblist object during the function getTableMenu()):
                foreach ($dblist->activeTables as $table => $value) {
-                       // Load full table definitions:
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if (!isset($dblist->externalTables[$table])) {
                                $q_count = $this->getNumberOfHiddenElements();
                                $h_func_b = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"') . '<label for="checkTt_content_showHidden">' . (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($GLOBALS['LANG']->getLL('hiddenCE')) : $GLOBALS['LANG']->getLL('hiddenCE') . ' (' . $q_count . ')') . '</label>';
index d2754de..7be6863 100644 (file)
@@ -47,7 +47,6 @@ class EditController {
                        // Initialize:
                        $table = $this->P['table'];
                        $field = $this->P['field'];
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                        $fTable = $this->P['currentValue'] < 0 ? $config['neg_foreign_table'] : $config['foreign_table'];
                        // Detecting the various allowed field type setups and acting accordingly.
index 106eef8..bafebfd 100644 (file)
@@ -112,7 +112,6 @@ class DataPreprocessor {
                        $idList = $this->prevPageID;
                }
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // For each ID value (integer) we
                        $ids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $idList, 1);
                        foreach ($ids as $id) {
@@ -216,7 +215,6 @@ class DataPreprocessor {
                }
                // Init:
                $uniqueItemRef = $table . '_' . $id;
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Fetches the true PAGE TSconfig pid to use later, if needed. (Until now, only for the RTE, but later..., who knows?)
                list($tscPID) = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid($table, $id, $pid);
                $TSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getTCEFORM_TSconfig($table, array_merge($row, array('uid' => $id, 'pid' => $pid)));
@@ -260,7 +258,6 @@ class DataPreprocessor {
                $totalRecordContent = array();
                // Traverse the configured columns for the table (TCA):
                // For each column configured, we will perform processing if needed based on the type (eg. for "group" and "select" types this is needed)
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $copyOfColumns = $GLOBALS['TCA'][$table]['columns'];
                foreach ($copyOfColumns as $field => $fieldConfig) {
                        // Set $data variable for the field, either inputted value from $row - or if not found, the default value as defined in the "config" array
index 6d04846..43f6827 100644 (file)
@@ -181,7 +181,6 @@ class InlineElement {
                // Init:
                $config = $PA['fieldConf']['config'];
                $foreign_table = $config['foreign_table'];
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($foreign_table);
                if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table)) {
                        $language = intval($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
                }
@@ -1803,7 +1802,6 @@ class InlineElement {
                                if ($i > 0 && $i % 3 == 0) {
                                        // Load the TCA configuration of the table field and store it in the stack
                                        if ($loadConfig) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($unstable['table']);
                                                $unstable['config'] = $GLOBALS['TCA'][$unstable['table']]['columns'][$unstable['field']]['config'];
                                                // Fetch TSconfig:
                                                $TSconfig = $this->fObj->setTSconfig($unstable['table'], array('uid' => $unstable['uid'], 'pid' => $this->inlineFirstPid), $unstable['field']);
index 3179832..7a7fd5e 100644 (file)
@@ -113,7 +113,6 @@ class SuggestElement {
                $field = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('field');
                $uid = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('uid');
                $pageId = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('pid');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // If the $uid is numeric, we have an already existing element, so get the
                // TSconfig of the page itself or the element container (for non-page elements)
                // otherwise it's a new element, so use given id of parent page (i.e., don't modify it here)
@@ -165,7 +164,6 @@ class SuggestElement {
                // fetch the records for each query table. A query table is a table from which records are allowed to
                // be added to the TCEForm selector, originally fetched from the "allowed" config option in the TCA
                foreach ($queryTables as $queryTable) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($queryTable);
                        // if the table does not exist, skip it
                        if (!is_array($GLOBALS['TCA'][$queryTable]) || !count($GLOBALS['TCA'][$queryTable])) {
                                continue;
index f0307df..292ceb6 100644 (file)
@@ -660,7 +660,6 @@ class FormEngine {
         */
        public function getSoloField($table, $row, $theFieldToReturn) {
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $typeNum = $this->getRTypeNum($table, $row);
                        if ($GLOBALS['TCA'][$table]['types'][$typeNum]) {
                                $itemList = $GLOBALS['TCA'][$table]['types'][$typeNum]['showitem'];
@@ -714,8 +713,6 @@ class FormEngine {
                        }
                }
                if ($GLOBALS['TCA'][$table]) {
-                       // Load the full TCA for the table.
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // Get dividers2tabs setting from TCA of the current table:
                        $dividers2tabs = &$GLOBALS['TCA'][$table]['ctrl']['dividers2tabs'];
                        // Load the description content for the table.
@@ -910,7 +907,6 @@ class FormEngine {
         * @todo Define visibility
         */
        public function getListedFields($table, $row, $list) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($this->edit_showFieldHelp || $this->doLoadTableDescr($table)) {
                        $GLOBALS['LANG']->loadSingleTableDescription($table);
                }
@@ -1007,8 +1003,6 @@ class FormEngine {
                $PA['palette'] = $palette;
                $PA['extra'] = $extra;
                $PA['pal'] = $pal;
-               // Make sure to load full $GLOBALS['TCA'] array for the table:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Get the TCA configuration for the current field:
                $PA['fieldConf'] = $GLOBALS['TCA'][$table]['columns'][$field];
                $PA['fieldConf']['config']['form_type'] = $PA['fieldConf']['config']['form_type'] ? $PA['fieldConf']['config']['form_type'] : $PA['fieldConf']['config']['type'];
@@ -3160,7 +3154,6 @@ function ' . $evalData . '(value) {
                                }
                                if ($foreignUid) {
                                        $foreignRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($foreignTable, $foreignUid, $foreignTypeField);
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($foreignTable);
                                        $this->registerDefaultLanguageData($foreignTable, $foreignRow);
                                        if ($foreignRow[$foreignTypeField]) {
                                                $foreignTypeFieldConfig = $GLOBALS['TCA'][$table]['columns'][$field];
@@ -3400,7 +3393,6 @@ function ' . $evalData . '(value) {
         * @return array The palette elements
         */
        public function loadPaletteElements($table, $row, $palette, $itemList = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $parts = array();
                // Getting excludeElements, if any.
                if (!is_array($this->excludeElements)) {
@@ -4285,7 +4277,6 @@ function ' . $evalData . '(value) {
         */
        public function getSingleHiddenField($table, $field, $row) {
                $item = '';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($GLOBALS['TCA'][$table]['columns'][$field]) {
                        $uid = $row['uid'];
                        $itemName = $this->prependFormFieldNames . '[' . $table . '][' . $uid . '][' . $field . ']';
@@ -5808,7 +5799,6 @@ function ' . $evalData . '(value) {
         */
        public function getDefaultRecord($table, $pid = 0) {
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $row = array();
                        if ($pid < 0 && $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues']) {
                                // Fetches the previous record:
index 6ef469c..cccdfcf 100644 (file)
@@ -541,7 +541,6 @@ class RecordHistory {
                        $t3lib_diff_Obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
                        $fieldsToDisplay = array_keys($entry['newRecord']);
                        foreach ($fieldsToDisplay as $fN) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                if (is_array($GLOBALS['TCA'][$table]['columns'][$fN]) && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] != 'passthrough') {
                                        // Create diff-result:
                                        $diffres = $t3lib_diff_Obj->makeDiffDisplay(\TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($table, $fN, $entry['oldRecord'][$fN], 0, 1), \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($table, $fN, $entry['newRecord'][$fN], 0, 1));
@@ -812,7 +811,6 @@ class RecordHistory {
         */
        public function removeFilefields($table, $dataArray) {
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $config) {
                                if ($config['config']['type'] == 'group' && $config['config']['internal_type'] == 'file') {
                                        unset($dataArray[$field]);
index df4bb50..d5bac9e 100644 (file)
@@ -162,7 +162,6 @@ class ElementBrowserRecordList extends \TYPO3\CMS\Recordlist\RecordList\Database
                // Check validity of the input data and load TCA
                if (isset($TCA[$tableName])) {
                        $this->relatingTable = $tableName;
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                        if ($fieldName && isset($TCA[$tableName]['columns'][$fieldName])) {
                                $this->relatingField = $fieldName;
                        }
index 4bc8089..87444e9 100644 (file)
@@ -311,8 +311,6 @@ class LiveSearch {
        protected function makeQuerySearchByTable($tableName, array $fieldsToSearchWithin) {
                $queryPart = '';
                $whereParts = array();
-               // Load the full TCA for the table, as we need to access column configuration
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                // If the search string is a simple integer, assemble an equality comparison
                if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->queryString)) {
                        foreach ($fieldsToSearchWithin as $fieldName) {
index 506133f..52bfd7a 100644 (file)
@@ -333,9 +333,6 @@ abstract class AbstractTreeView {
                        $this->MOUNTS = array(0 => 0);
                }
                $this->setTreeName();
-               if ($this->table) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($this->table);
-               }
                // Setting this to FALSE disables the use of array-trees by default
                $this->data = FALSE;
                $this->dataLookup = FALSE;
index 6facb31..1ba67c6 100644 (file)
@@ -447,8 +447,6 @@ class BackendUtility {
                $theExcludeArray = array();
                $tc_keys = array_keys($GLOBALS['TCA']);
                foreach ($tc_keys as $table) {
-                       // Load table
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // All field names configured and not restricted to admins
                        if (is_array($GLOBALS['TCA'][$table]['columns'])
                                        && empty($GLOBALS['TCA'][$table]['ctrl']['adminOnly'])
@@ -514,8 +512,6 @@ class BackendUtility {
                $allowDenyOptions = array();
                $tc_keys = array_keys($GLOBALS['TCA']);
                foreach ($tc_keys as $table) {
-                       // Load table
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // All field names configured:
                        if (is_array($GLOBALS['TCA'][$table]['columns'])) {
                                $f_keys = array_keys($GLOBALS['TCA'][$table]['columns']);
@@ -684,7 +680,6 @@ class BackendUtility {
         * @return array
         */
        static public function getTCAtypes($table, $rec, $useFieldNameAsKey = 0) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($GLOBALS['TCA'][$table]) {
                        // Get type value:
                        $fieldValue = self::getTCAtypeValue($table, $rec);
@@ -734,7 +729,6 @@ class BackendUtility {
         */
        static public function getTCAtypeValue($table, $row) {
                $typeNum = 0;
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($GLOBALS['TCA'][$table]) {
                        $field = $GLOBALS['TCA'][$table]['ctrl']['type'];
                        if (strpos($field, ':') !== FALSE) {
@@ -1470,8 +1464,6 @@ class BackendUtility {
         * @return string Thumbnail image tag.
         */
        static public function thumbCode($row, $table, $field, $backPath, $thumbScript = '', $uploaddir = NULL, $abs = 0, $tparams = '', $size = '', $linkInfoPopup = TRUE) {
-               // Load table.
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $tcaConfig = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                // Check and parse the size parameter
                $sizeParts = array(64, 64);
@@ -1728,8 +1720,6 @@ class BackendUtility {
         * @return string Label for item entry
         */
        static public function getLabelFromItemlist($table, $col, $key) {
-               // Load full TCA for $table
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Check, if there is an "items" array:
                if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$col]) && is_array($GLOBALS['TCA'][$table]['columns'][$col]['config']['items'])) {
                        // Traverse the items-array...
@@ -1783,8 +1773,6 @@ class BackendUtility {
                $labels = array();
                $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $key, TRUE);
                if (count($values) > 0) {
-                       // Load full TCA for $table
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // Check if there is an "items" array
                        if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$column]) && is_array($GLOBALS['TCA'][$table]['columns'][$column]['config']['items'])) {
                                // Loop on all selected values
@@ -1813,8 +1801,6 @@ class BackendUtility {
         * @return string
         */
        static public function getItemLabel($table, $col, $printAllWrap = '') {
-               // Load full TCA for $table
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Check if column exists
                if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$col])) {
                        return $GLOBALS['TCA'][$table]['columns'][$col]['label'];
@@ -1940,8 +1926,6 @@ class BackendUtility {
                        // No need to load TCA as uid is not in TCA-array
                        return $value;
                }
-               // Load full TCA for $table
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Check if table and field is configured:
                if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$col])) {
                        // Depending on the fields configuration, make a meaningful output value.
@@ -3025,7 +3009,6 @@ class BackendUtility {
         */
        static public function exec_foreign_table_where_query($fieldValue, $field = '', $TSconfig = array(), $prefix = '') {
                $foreign_table = $fieldValue['config'][$prefix . 'foreign_table'];
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($foreign_table);
                $rootLevel = $GLOBALS['TCA'][$foreign_table]['ctrl']['rootLevel'];
                $fTWHERE = $fieldValue['config'][$prefix . 'foreign_table_where'];
                if (strstr($fTWHERE, '###REC_FIELD_')) {
@@ -4063,7 +4046,6 @@ class BackendUtility {
         */
        static public function getTcaFieldConfiguration($table, $field) {
                $configuration = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) {
                        $configuration = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                }
index 8bd9801..7baa2ee 100644 (file)
@@ -182,8 +182,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         * @todo Define visibility
         */
        public function getTable($table, $id) {
-               // Load full table definition:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (isset($this->externalTables[$table])) {
                        return $this->getExternalTables($id, $table);
                } else {
@@ -893,7 +891,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
        public function dataFields($fieldArr, $table, $row, $out = array()) {
                // Check table validity:
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $thumbsCol = $GLOBALS['TCA'][$table]['ctrl']['thumbnail'];
                        // Traverse fields:
                        foreach ($fieldArr as $fieldName) {
@@ -940,7 +937,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         * @todo Define visibility
         */
        public function headerFields($fieldArr, $table, $out = array()) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                foreach ($fieldArr as $fieldName) {
                        $ll = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$fieldName]['label'], 1);
                        $out[$fieldName] = $ll ? $ll : '&nbsp;';
@@ -1140,8 +1136,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         */
        public function tt_content_drawHeader($row, $space = 0, $disableMoveAndNewButtons = FALSE, $langMode = FALSE, $dragDropEnabled = FALSE) {
                $out = '';
-               // Load full table description:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
                // If show info is set...;
                if ($this->tt_contentConfig['showInfo'] && $GLOBALS['BE_USER']->recordEditAccessInternals('tt_content', $row)) {
                        // Render control panel for the element:
index ef6d755..0bc1343 100644 (file)
@@ -164,7 +164,6 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider getCommonSelectFieldsReturnsCorrectFieldsDataProvider
         */
        public function getCommonSelectFieldsReturnsCorrectFields($table, $prefix = '', array $presetFields, array $tca, $expectedFields = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $tcaBackup = $GLOBALS['TCA'][$table];
                unset($GLOBALS['TCA'][$table]);
                $GLOBALS['TCA'][$table] = $tca;
@@ -251,7 +250,6 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider getLabelFromItemlistReturnsCorrectFieldsDataProvider
         */
        public function getLabelFromItemlistReturnsCorrectFields($table, $col = '', $key = '', array $tca, $expectedLabel = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $tcaBackup = $GLOBALS['TCA'][$table];
                unset($GLOBALS['TCA'][$table]);
                $GLOBALS['TCA'][$table] = $tca;
@@ -320,7 +318,6 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider getLabelFromItemListMergedReturnsCorrectFieldsDataProvider
         */
        public function getLabelFromItemListMergedReturnsCorrectFields($pageId, $table, $column = '', $key = '', array $tca, $expectedLabel = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $tcaBackup = $GLOBALS['TCA'][$table];
                unset($GLOBALS['TCA'][$table]);
                $GLOBALS['TCA'][$table] = $tca;
index 1652cd7..09314e1 100644 (file)
@@ -140,9 +140,11 @@ if ($TSFE->isBackendUserLoggedIn()) {
                $BE_USER->frontendEdit->initConfigOptions();
        }
 }
-// Get compressed $TCA-Array();
-// After this, we should now have a valid $TCA, though minimized
-$TSFE->getCompressedTCarray();
+
+$GLOBALS['TT']->push('Load extension tables');
+\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadExtensionTables(TRUE);
+$GLOBALS['TT']->pull();
+
 // Starts the template
 $TT->push('Start Template', '');
 $TSFE->initTemplate();
index 2835d56..b8d3ab4 100644 (file)
@@ -652,7 +652,6 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        }
                        break;
                case 'individual':
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$field])) {
                                $items = $GLOBALS['TCA'][$table]['columns'][$field]['config']['items'];
                                if (is_array($items)) {
@@ -749,7 +748,6 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         */
        public function recordEditAccessInternals($table, $idOrRow, $newRecord = FALSE, $deletedRecord = FALSE, $checkFullLanguageAccess = FALSE) {
                if (isset($GLOBALS['TCA'][$table])) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // Always return TRUE for Admin users.
                        if ($this->isAdmin()) {
                                return TRUE;
index 60f44d2..860fd38 100644 (file)
@@ -85,7 +85,6 @@ class CategoryCollection extends \TYPO3\CMS\Core\Collection\AbstractRecordCollec
         * @return \TYPO3\CMS\Core\Collection\CollectionInterface
         */
        static public function load($id, $fillItems = FALSE, $tableName = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA(static::$storageTableName);
                $collectionRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', static::$storageTableName, 'uid=' . intval($id) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause(static::$storageTableName));
                $collectionRecord['table_name'] = $tableName;
                return self::create($collectionRecord, $fillItems);
index fe0e515..9f321e9 100644 (file)
@@ -319,7 +319,6 @@ abstract class AbstractRecordCollection implements \TYPO3\CMS\Core\Collection\Re
         * @return \TYPO3\CMS\Core\Collection\CollectionInterface
         */
        static public function load($id, $fillItems = FALSE) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA(static::$storageTableName);
                $collectionRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', static::$storageTableName, 'uid=' . intval($id) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause(static::$storageTableName));
                return self::create($collectionRecord, $fillItems);
        }
index 59e3174..b6f7a6f 100644 (file)
@@ -793,6 +793,7 @@ class Bootstrap {
                global $_EXTKEY;
                // Include standard tables.php file
                require PATH_t3lib . 'stddb/tables.php';
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtTables($allowCaching);
                // Load additional ext tables script if the file exists
                $extTablesFile = PATH_typo3conf . TYPO3_extTableDef_script;
index 84e189b..7254287 100644 (file)
@@ -770,9 +770,6 @@ class DataHandler {
                                        if (is_array($incomingFieldArray)) {
                                                // Handle native date/time fields
                                                $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
-                                               if (!isset($GLOBALS['TCA'][$table]['columns'])) {
-                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-                                               }
                                                foreach ($GLOBALS['TCA'][$table]['columns'] as $column => $config) {
                                                        if (isset($incomingFieldArray[$column])) {
                                                                if (isset($config['config']['dbType']) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList('date,datetime', $config['config']['dbType'])) {
@@ -1092,7 +1089,6 @@ class DataHandler {
         * @todo Define visibility
         */
        public function placeholderShadowing($table, $id) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($liveRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $id, '*')) {
                        if ((int) $liveRec['t3ver_state'] > 0) {
                                $justStoredRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
@@ -1132,7 +1128,6 @@ class DataHandler {
         */
        public function fillInFieldArray($table, $id, $fieldArray, $incomingFieldArray, $realPid, $status, $tscPID) {
                // Initialize:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $originalLanguageRecord = NULL;
                $originalLanguage_diffStorage = NULL;
                $diffStorageFlag = FALSE;
@@ -1342,7 +1337,6 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkValue($table, $field, $value, $id, $status, $realPid, $tscPID) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Result array
                $res = array();
                $recFID = $table . ':' . $id . ':' . $field;
@@ -2172,7 +2166,6 @@ class DataHandler {
         */
        public function getUnique($table, $field, $value, $id, $newPid = 0) {
                // Initialize:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $whereAdd = '';
                $newValue = '';
                if (intval($newPid)) {
@@ -2776,7 +2769,6 @@ class DataHandler {
                $uid = ($origUid = intval($uid));
                // Only copy if the table is defined in $GLOBALS['TCA'], a uid is given and the record wasn't copied before:
                if ($GLOBALS['TCA'][$table] && $uid && !$this->isRecordCopied($table, $uid)) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // This checks if the record can be selected which is all that a copy action requires.
                        if ($this->doesRecordExist($table, $uid, 'show')) {
                                $fullLanguageCheckNeeded = $table != 'pages';
@@ -2989,7 +2981,6 @@ class DataHandler {
                }
                // Only copy if the table is defined in TCA, a uid is given and the record wasn't copied before:
                if ($GLOBALS['TCA'][$table] && $uid && !$this->isRecordCopied($table, $uid)) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if ($this->doesRecordExist($table, $uid, 'show')) {
                                // Set up fields which should not be processed. They are still written - just passed through no-questions-asked!
                                $nonFields = array('uid', 'pid', 't3ver_id', 't3ver_oid', 't3ver_wsid', 't3ver_label', 't3ver_state', 't3ver_count', 't3ver_stage', 't3ver_tstamp', 'perms_userid', 'perms_groupid', 'perms_user', 'perms_group', 'perms_everybody');
@@ -3633,7 +3624,6 @@ class DataHandler {
         * @todo Define visibility
         */
        public function moveRecord_procFields($table, $uid, $destPid) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $conf = $GLOBALS['TCA'][$table]['columns'];
                $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
                if (is_array($row)) {
@@ -3745,7 +3735,6 @@ class DataHandler {
                $uid = intval($uid);
                if ($GLOBALS['TCA'][$table] && $uid && $this->isNestedElementCallRegistered($table, $uid, 'localize') === FALSE) {
                        $this->registerNestedElementCall($table, $uid, 'localize');
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if ($GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] || $table === 'pages') {
                                if ($langRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_language', intval($language), 'uid,title')) {
                                        if ($this->doesRecordExist($table, $uid, 'show')) {
@@ -3757,7 +3746,6 @@ class DataHandler {
                                                                        if ($table === 'pages') {
                                                                                $pass = $GLOBALS['TCA'][$table]['ctrl']['transForeignTable'] === 'pages_language_overlay' && !\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $uid, (' AND ' . $GLOBALS['TCA']['pages_language_overlay']['ctrl']['languageField'] . '=' . intval($langRec['uid'])));
                                                                                $Ttable = 'pages_language_overlay';
-                                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($Ttable);
                                                                        } else {
                                                                                $pass = !\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization($table, $uid, $langRec['uid'], ('AND pid=' . intval($row['pid'])));
                                                                                $Ttable = $table;
@@ -4086,7 +4074,6 @@ class DataHandler {
                                                }
                                        } else {
                                                // Fetches all fields with flexforms and look for files to delete:
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                                foreach ($GLOBALS['TCA'][$table]['columns'] as $fieldName => $cfg) {
                                                        $conf = $cfg['config'];
                                                        switch ($conf['type']) {
@@ -4341,7 +4328,6 @@ class DataHandler {
         * @todo Define visibility
         */
        public function deleteRecord_procFields($table, $uid, $undeleteRecord = FALSE) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $conf = $GLOBALS['TCA'][$table]['columns'];
                $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, '*', '', FALSE);
                foreach ($row as $field => $value) {
@@ -4637,7 +4623,6 @@ class DataHandler {
        public function remapListedDBRecords() {
                if (count($this->registerDBList)) {
                        foreach ($this->registerDBList as $table => $records) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                foreach ($records as $uid => $fields) {
                                        $newData = array();
                                        $theUidToUpdate = $this->copyMappingArray_merged[$table][$uid];
@@ -5392,7 +5377,6 @@ class DataHandler {
        public function getExcludeListArray() {
                $list = array();
                foreach (array_keys($GLOBALS['TCA']) as $table) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if (isset($GLOBALS['TCA'][$table]['columns'])) {
                                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $config) {
                                        if ($config['exclude'] && !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->BE_USER->groupData['non_exclude_fields'], ($table . ':' . $field))) {
@@ -5932,7 +5916,6 @@ class DataHandler {
         * @todo Define visibility
         */
        public function newFieldArray($table) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $fieldArray = array();
                if (is_array($GLOBALS['TCA'][$table]['columns'])) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $content) {
@@ -6306,7 +6289,6 @@ class DataHandler {
         */
        public function fixUniqueInPid($table, $uid) {
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $curData = $this->recordInfo($table, $uid, '*');
                        $newData = array();
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $conf) {
@@ -6341,7 +6323,6 @@ class DataHandler {
         */
        public function fixCopyAfterDuplFields($table, $uid, $prevUid, $update, $newData = array()) {
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields']) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $prevData = $this->recordInfo($table, $prevUid, '*');
                        $theFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], 1);
                        foreach ($theFields as $field) {
@@ -6365,7 +6346,6 @@ class DataHandler {
         */
        public function extFileFields($table) {
                $listArr = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (isset($GLOBALS['TCA'][$table]['columns'])) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
                                if ($configArr['config']['type'] == 'group' && ($configArr['config']['internal_type'] == 'file' || $configArr['config']['internal_type'] == 'file_reference')) {
@@ -6385,7 +6365,6 @@ class DataHandler {
         */
        public function getUniqueFields($table) {
                $listArr = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($GLOBALS['TCA'][$table]['columns']) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
                                if ($configArr['config']['type'] === 'input') {
@@ -6531,7 +6510,6 @@ class DataHandler {
         * @todo Define visibility
         */
        public function extFileFunctions($table, $field, $filelist, $func) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $uploadFolder = $GLOBALS['TCA'][$table]['columns'][$field]['config']['uploadfolder'];
                if ($uploadFolder && trim($filelist) && $GLOBALS['TCA'][$table]['columns'][$field]['config']['internal_type'] == 'file') {
                        $uploadPath = $this->destPathFromUploadFolder($uploadFolder);
index 6a4e8c1..7355f2f 100644 (file)
@@ -242,7 +242,6 @@ class QueryGenerator {
        public function makeFieldList() {
                $fieldListArr = array();
                if (is_array($GLOBALS['TCA'][$this->table])) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($this->table);
                        foreach ($GLOBALS['TCA'][$this->table]['columns'] as $fN => $value) {
                                $fieldListArr[] = $fN;
                        }
@@ -277,7 +276,6 @@ class QueryGenerator {
        public function init($name, $table, $fieldList = '') {
                // Analysing the fields in the table.
                if (is_array($GLOBALS['TCA'][$table])) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $this->name = $name;
                        $this->table = $table;
                        $this->fieldList = $fieldList ? $fieldList : $this->makeFieldList();
@@ -871,7 +869,6 @@ class QueryGenerator {
                                }
                                $counter = 1;
                                if (is_array($GLOBALS['TCA'][$from_table])) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($from_table);
                                        $labelField = $GLOBALS['TCA'][$from_table]['ctrl']['label'];
                                        $altLabelField = $GLOBALS['TCA'][$from_table]['ctrl']['label_alt'];
                                        if ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items']) {
index 08b200f..d268fed 100644 (file)
@@ -497,7 +497,6 @@ class QueryView {
                if ($swords) {
                        foreach ($GLOBALS['TCA'] as $table => $value) {
                                // Get fields list
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                $conf = $GLOBALS['TCA'][$table];
                                // Avoid querying tables with no columns
                                if (empty($conf['columns'])) {
@@ -601,7 +600,6 @@ class QueryView {
        public function getProcessedValueExtra($table, $fN, $fV, $conf, $splitString) {
                // Analysing the fields in the table.
                if (is_array($GLOBALS['TCA'][$table])) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $fC = $GLOBALS['TCA'][$table]['columns'][$fN];
                        $fields = $fC['config'];
                        $fields['exclude'] = $fC['exclude'];
@@ -869,7 +867,6 @@ class QueryView {
                                }
                                $counter = 1;
                                if (is_array($GLOBALS['TCA'][$from_table])) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($from_table);
                                        $labelField = $GLOBALS['TCA'][$from_table]['ctrl']['label'];
                                        $altLabelField = $GLOBALS['TCA'][$from_table]['ctrl']['label_alt'];
                                        if ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items']) {
index 53f5fa9..c5bada1 100644 (file)
@@ -200,7 +200,6 @@ class ReferenceIndex {
                                        }
                                }
                                // Word indexing:
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $conf) {
                                        if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('input,text', $conf['config']['type']) && strcmp($record[$field], '') && !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($record[$field])) {
                                                $this->words_strings[$field] = $record[$field];
@@ -341,8 +340,6 @@ class ReferenceIndex {
         * @todo Define visibility
         */
        public function getRelations($table, $row, $onlyField = '') {
-               // Load full table description
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Initialize:
                $uid = $row['uid'];
                $nonFields = explode(',', 'uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,pid');
index 0ded8a3..c9f9269 100644 (file)
@@ -195,7 +195,6 @@ class RelationHandler {
                        $this->MM_oppositeTable = $tmp[0];
                        unset($tmp);
                        // Only add the current table name if there is more than one allowed field
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($this->MM_oppositeTable);
                        // We must be sure this has been done at least once before accessing the "columns" part of TCA for a table.
                        $this->MM_oppositeFieldConf = $GLOBALS['TCA'][$this->MM_oppositeTable]['columns'][$this->MM_oppositeField]['config'];
                        if ($this->MM_oppositeFieldConf['allowed']) {
index 439a467..93cae6f 100644 (file)
@@ -59,7 +59,6 @@ class FrontendEditingController {
                $this->TSFE_EDIT = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('TSFE_EDIT');
                // Include classes for editing IF editing module in Admin Panel is open
                if ($GLOBALS['BE_USER']->isFrontendEditingActive()) {
-                       $GLOBALS['TSFE']->includeTCA(0);
                        if ($this->isEditAction()) {
                                $this->editAction();
                        }
index 32fe298..49f3999 100644 (file)
@@ -303,7 +303,6 @@ class DatabaseIntegrityCheck {
                $this->lostPagesList = '';
                if ($pid_list) {
                        foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                $pid_list_tmp = $pid_list;
                                if (!isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) || !$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                        // Remove preceding "-1," for non-versioned tables
@@ -363,7 +362,6 @@ class DatabaseIntegrityCheck {
                $list_n = array();
                if ($pid_list) {
                        foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                $pid_list_tmp = $pid_list;
                                if (!isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) || !$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                        // Remove preceding "-1," for non-versioned tables
@@ -392,7 +390,6 @@ class DatabaseIntegrityCheck {
        public function getGroupFields($mode) {
                $result = array();
                foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $cols = $GLOBALS['TCA'][$table]['columns'];
                        foreach ($cols as $field => $config) {
                                if ($config['config']['type'] == 'group') {
@@ -421,7 +418,6 @@ class DatabaseIntegrityCheck {
        public function getFileFields($uploadfolder) {
                $result = array();
                foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $cols = $GLOBALS['TCA'][$table]['columns'];
                        foreach ($cols as $field => $config) {
                                if ($config['config']['type'] == 'group' && $config['config']['internal_type'] == 'file' && $config['config']['uploadfolder'] == $uploadfolder) {
@@ -442,7 +438,6 @@ class DatabaseIntegrityCheck {
        public function getDBFields($theSearchTable) {
                $result = array();
                foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $cols = $GLOBALS['TCA'][$table]['columns'];
                        foreach ($cols as $field => $config) {
                                if ($config['config']['type'] == 'group' && $config['config']['internal_type'] == 'db') {
@@ -469,7 +464,6 @@ class DatabaseIntegrityCheck {
                if (is_array($fkey_arrays)) {
                        foreach ($fkey_arrays as $table => $field_list) {
                                if ($GLOBALS['TCA'][$table] && trim($field_list)) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                        $fieldArr = explode(',', $field_list);
                                        if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dbal')) {
                                                $fields = $GLOBALS['TYPO3_DB']->admin_get_fields($table);
@@ -664,7 +658,6 @@ class DatabaseIntegrityCheck {
                foreach ($fileFields as $info) {
                        $table = $info[0];
                        $field = $info[1];
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,pid,' . $GLOBALS['TCA'][$table]['ctrl']['label'] . ',' . $field, $table, $field . ' LIKE \'%' . $GLOBALS['TYPO3_DB']->quoteStr($id, $table) . '%\'');
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
                                // Now this is the field, where the reference COULD come from. But we're not garanteed, so we must carefully examine the data.
index 25de4a4..6428579 100644 (file)
@@ -99,7 +99,6 @@ class DriverRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                }
                foreach ($this->driverConfigurations as $driver) {
                        $label = $driver['label'] ?: $driver['class'];
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('sys_file_storage');
                        $driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
                        $driverFieldConfig['items'][] = array($label, $driver['shortName']);
                        if ($driver['flexFormDS']) {
index f641500..d34aa1e 100644 (file)
@@ -67,7 +67,6 @@ class TreeDataProviderFactory {
                                if ($tableName == $table) {
                                        $unselectableUids[] = $currentValue['uid'];
                                }
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                        } else {
                                throw new \InvalidArgumentException('TCA Tree configuration is invalid: "foreign_table" not set', 1288215888);
                        }
index b9945b3..2ca6f88 100644 (file)
@@ -221,7 +221,6 @@ class ExtensionManagementUtility {
         * @return void
         */
        static public function addTCAcolumns($table, $columnArray, $addTofeInterface = 0) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (is_array($columnArray) && is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'])) {
                        // Candidate for \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge() if integer-keys will some day make trouble...
                        $GLOBALS['TCA'][$table]['columns'] = array_merge($GLOBALS['TCA'][$table]['columns'], $columnArray);
@@ -246,7 +245,6 @@ class ExtensionManagementUtility {
         * @return void
         */
        static public function addToAllTCAtypes($table, $str, $specificTypesList = '', $position = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $str = trim($str);
                $palettesChanged = array();
                if ($str && is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['types'])) {
@@ -311,7 +309,6 @@ class ExtensionManagementUtility {
        static public function addFieldsToAllPalettesOfField($table, $field, $addFields, $insertionPosition = '') {
                $generatedPalette = '';
                $processedPalettes = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (isset($GLOBALS['TCA'][$table]['columns'][$field])) {
                        $types = &$GLOBALS['TCA'][$table]['types'];
                        if (is_array($types)) {
@@ -353,7 +350,6 @@ class ExtensionManagementUtility {
         * @return void
         */
        static public function addFieldsToPalette($table, $palette, $addFields, $insertionPosition = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (isset($GLOBALS['TCA'][$table])) {
                        $paletteData = &$GLOBALS['TCA'][$table]['palettes'][$palette];
                        // If palette already exists, merge the data:
@@ -409,7 +405,6 @@ class ExtensionManagementUtility {
                if ($relativePosition !== '' && $relativePosition !== 'before' && $relativePosition !== 'after' && $relativePosition !== 'replace') {
                        throw new \InvalidArgumentException('Relative position must be either empty or one of "before", "after", "replace".', 1303236967);
                }
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (!is_array($GLOBALS['TCA'][$table]['columns'][$field]['config']['items'])) {
                        throw new \RuntimeException('Given select field item list was not found.', 1303237468);
                }
@@ -1179,7 +1174,6 @@ class ExtensionManagementUtility {
                if ($_EXTKEY && !$itemArray[2]) {
                        $itemArray[2] = self::extRelPath($_EXTKEY) . $GLOBALS['TYPO3_LOADED_EXT'][$_EXTKEY]['ext_icon'];
                }
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
                if (is_array($GLOBALS['TCA']['tt_content']['columns']) && is_array($GLOBALS['TCA']['tt_content']['columns'][$type]['config']['items'])) {
                        foreach ($GLOBALS['TCA']['tt_content']['columns'][$type]['config']['items'] as $k => $v) {
                                if (!strcmp($v[1], $itemArray[1])) {
@@ -1202,7 +1196,6 @@ class ExtensionManagementUtility {
         * @see addPlugin()
         */
        static public function addPiFlexFormValue($piKeyToMatch, $value, $CTypeToMatch = 'list') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
                if (is_array($GLOBALS['TCA']['tt_content']['columns']) && is_array($GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'])) {
                        $GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'][$piKeyToMatch . ',' . $CTypeToMatch] = $value;
                }
@@ -1219,7 +1212,6 @@ class ExtensionManagementUtility {
         * @return void
         */
        static public function addToInsertRecords($table, $content_table = 'tt_content', $content_field = 'records') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($content_table);
                if (is_array($GLOBALS['TCA'][$content_table]['columns']) && isset($GLOBALS['TCA'][$content_table]['columns'][$content_field]['config']['allowed'])) {
                        $GLOBALS['TCA'][$content_table]['columns'][$content_field]['config']['allowed'] .= ',' . $table;
                }
@@ -1306,7 +1298,6 @@ tt_content.' . $key . $prefix . ' {
         * @see addTypoScript()
         */
        static public function addStaticFile($extKey, $path, $title) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('sys_template');
                if ($extKey && $path && is_array($GLOBALS['TCA']['sys_template']['columns'])) {
                        $value = str_replace(',', '', 'EXT:' . $extKey . '/' . $path);
                        $itemArray = array(trim($title . ' (' . $extKey . ')'), $value);
@@ -1657,6 +1648,7 @@ tt_content.' . $key . $prefix . ' {
                                // and are explicitly set in cached file as well
                                $_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
                                require $extensionInformation['ext_tables.php'];
+                               static::loadNewTcaColumnsConfigFiles();
                        }
                }
        }
@@ -1694,6 +1686,7 @@ tt_content.' . $key . $prefix . ' {
                        // Add ext_tables.php content of extension
                        $phpCodeToCache[] = trim(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($extensionDetails['ext_tables.php']));
                        $phpCodeToCache[] = '';
+                       $phpCodeToCache[] = '\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();';
                        $phpCodeToCache[] = '';
                }
                $phpCodeToCache = implode(LF, $phpCodeToCache);
@@ -1703,6 +1696,45 @@ tt_content.' . $key . $prefix . ' {
        }
 
        /**
+        * Loads "columns" of a $TCA table definition if extracted
+        * to a "dynamicConfigFile". This method is called after each
+        * single ext_tables.php files was included to immediately have
+        * the full $TCA ready for the next extension.
+        *
+        * $TCA[$tableName]['ctrl']['dynamicConfigFile'] must be the
+        * absolute path to a file.
+        *
+        * Example:
+        * dynamicConfigFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/SysNote.php',
+        *
+        * @return void
+        * @throws \RuntimeException
+        * @internal Internal use ONLY. It is called by cache files and can not be protected. Do not call yourself!
+        */
+       static public function loadNewTcaColumnsConfigFiles() {
+               global $TCA;
+
+               foreach ($TCA as $tableName => $configuration) {
+                       if (!isset($TCA[$tableName]['columns'])) {
+                               $columnsConfigFile = $TCA[$tableName]['ctrl']['dynamicConfigFile'];
+                               if ($columnsConfigFile) {
+                                       if (GeneralUtility::isAbsPath($columnsConfigFile)) {
+                                               include($columnsConfigFile);
+                                       } elseif (strpos($columnsConfigFile, 'T3LIB:') === 0) {
+                                               // Resolve T3LIB prefix, internal core use only.
+                                               include(PATH_t3lib . 'stddb/' . substr($columnsConfigFile, 6));
+                                       } else {
+                                               throw new \RuntimeException(
+                                                       'Columns configuration file not found',
+                                                       1341151261
+                                               );
+                                       }
+                               }
+                       }
+               }
+       }
+
+       /**
         * Cache identifier for concatenated ext_tables.php files
         *
         * @return string
@@ -1989,8 +2021,6 @@ tt_content.' . $key . $prefix . ' {
         * @see addToAllTCAtypes
         */
        static public function makeCategorizable($extensionKey, $tableName, $fieldName = 'categories', array $options = array()) {
-               // Load TCA first
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                // Update the category registry
                $result = \TYPO3\CMS\Core\Category\CategoryRegistry::getInstance()->add($extensionKey, $tableName, $fieldName);
                if ($result === FALSE) {
index 45a6c5e..e8f5021 100644 (file)
@@ -3861,31 +3861,13 @@ Connection: close
         * 2) columns must not be an array (which it is always if whole table loaded), and
         * 3) there is a value for dynamicConfigFile (filename in typo3conf)
         *
-        * Note: For the frontend this loads only 'ctrl' and 'feInterface' parts.
-        * For complete TCA use $GLOBALS['TSFE']->includeTCA() instead.
-        *
         * @param string $table Table name for which to load the full TCA array part into $GLOBALS['TCA']
         * @return void
+        * @deprecated since 6.1, will be removed two versions later
         */
        static public function loadTCA($table) {
-               // Needed for inclusion of the dynamic config files.
-               global $TCA;
-               if (isset($TCA[$table])) {
-                       $tca = &$TCA[$table];
-                       if (is_array($tca['ctrl']) && !$tca['columns']) {
-                               $dcf = $tca['ctrl']['dynamicConfigFile'];
-                               if ($dcf) {
-                                       if (!strcmp(substr($dcf, 0, 6), 'T3LIB:')) {
-                                               include PATH_t3lib . 'stddb/' . substr($dcf, 6);
-                                       } elseif (self::isAbsPath($dcf) && @is_file($dcf)) {
-                                               // Absolute path...
-                                               include $dcf;
-                                       } else {
-                                               include PATH_typo3conf . $dcf;
-                                       }
-                               }
-                       }
-               }
+               // This method is obsolete, full TCA is always loaded in all context except eID
+               static::logDeprecatedFunction();
        }
 
        /**
index 7dd7cf6..90a31f2 100644 (file)
@@ -206,12 +206,6 @@ class RootlineUtility {
         */
        protected function getRecordArray($uid) {
                if (!isset(self::$pageRecordCache[$this->getCacheIdentifier($uid)])) {
-                       if (!is_array($GLOBALS['TCA']['pages']['columns'])) {
-                               if (isset($GLOBALS['TSFE'])) {
-                                       $GLOBALS['TSFE']->includeTCA($GLOBALS['TSFE']->TCAloaded);
-                               }
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('pages');
-                       }
                        $row = $this->databaseConnection->exec_SELECTgetSingleRow(implode(',', self::$rootlineFields), 'pages', 'uid = ' . intval($uid) . ' AND pages.deleted = 0 AND pages.doktype <> ' . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_RECYCLER);
                        if (empty($row)) {
                                throw new \RuntimeException('Could not fetch page data for uid ' . $uid . '.', 1343589451);
index 8a332b1..f1c6e83 100644 (file)
@@ -85,6 +85,7 @@ class ExtensionManagementUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * Create a subclass with protected methods made public
         *
         * @return void
+        * @TODO: Move this to a fixture file
         */
        protected function createAccessibleProxyClass() {
                $namespace = 'TYPO3\\CMS\\Core\\Utility';
@@ -113,7 +114,7 @@ class ExtensionManagementUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
 
        /**
         * @test
-        * @expectedException BadFunctionCallException
+        * @expectedException \BadFunctionCallException
         */
        public function isLoadedThrowsExceptionIfExtensionIsNotLoaded() {
                $this->assertFalse(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded(uniqid('foobar'), TRUE));
@@ -124,7 +125,7 @@ class ExtensionManagementUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
        ///////////////////////////////
        /**
         * @test
-        * @expectedException BadFunctionCallException
+        * @expectedException \BadFunctionCallException
         */
        public function extPathThrowsExceptionIfExtensionIsNotLoaded() {
                $GLOBALS['TYPO3_LOADED_EXT']['foo'] = array();
@@ -141,7 +142,7 @@ class ExtensionManagementUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
 
        /**
         * @test
-        * @expectedException BadFunctionCallException
+        * @expectedException \BadFunctionCallException
         */
        public function extPathThrowsExceptionIfExtensionIsNotLoadedAndTypo3LoadedExtensionsIsEmpty() {
                unset($GLOBALS['TYPO3_LOADED_EXT']);
@@ -862,6 +863,42 @@ throw new \RuntimeException(\'\', 1340559079);
        }
 
        /////////////////////////////////////////
+       // Tests concerning loadNewTcaColumnsConfigFiles
+       /////////////////////////////////////////
+
+       /**
+        * @test
+        * @expectedException \RuntimeException
+        */
+       public function loadNewTcaColumnsConfigFilesIncludesDefinedDynamicConfigFileIfNoColumnsExist() {
+               $GLOBALS['TCA'] = array(
+                       'test' => array(
+                               'ctrl' => array(
+                                       'dynamicConfigFile' => __DIR__ . '/Fixtures/RuntimeException.php'
+                               ),
+                       ),
+               );
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
+       }
+
+       /**
+        * @test
+        */
+       public function loadNewTcaColumnsConfigFilesDoesNotIncludeFileIfColumnsExist() {
+               $GLOBALS['TCA'] = array(
+                       'test' => array(
+                               'ctrl' => array(
+                                       'dynamicConfigFile' => __DIR__ . '/Fixtures/RuntimeException.php'
+                               ),
+                               'columns' => array(
+                                       'foo' => 'bar',
+                               ),
+                       ),
+               );
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
+       }
+
+       /////////////////////////////////////////
        // Tests concerning getExtensionVersion
        /////////////////////////////////////////
        /**
diff --git a/typo3/sysext/core/Tests/Unit/Utility/Fixtures/RuntimeException.php b/typo3/sysext/core/Tests/Unit/Utility/Fixtures/RuntimeException.php
new file mode 100644 (file)
index 0000000..615b450
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+       throw new \RuntimeException('Unit test', 1359900487);
+?>
\ No newline at end of file
index 5c6e9ec..777776a 100644 (file)
@@ -1933,32 +1933,6 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->assertNull($returnValue);
        }
 
-       ////////////////////////////////////////
-       // Tests concerning loadTCA
-       ////////////////////////////////////////
-
-       /**
-        * @test
-        * @expectedException \RuntimeException
-        */
-       public function loadTCAIncludesConfiguredDynamicConfigFile() {
-               $dynamicConfigurationAbsoluteFilePath = PATH_site . 'typo3temp/' . uniqid('testLoadTca_');
-               file_put_contents(
-                       $dynamicConfigurationAbsoluteFilePath,
-                       '<?php throw new \RuntimeException(\'foo\', 1310203814); ?>'
-               );
-               $this->testFilesToDelete[] = $dynamicConfigurationAbsoluteFilePath;
-
-               $testTableName = uniqid('testTable_');
-               $GLOBALS['TCA'][$testTableName] = array(
-                       'ctrl' => array(
-                               'dynamicConfigFile' => $dynamicConfigurationAbsoluteFilePath,
-                       ),
-               );
-
-               Utility\GeneralUtility::loadTCA($testTableName);
-       }
-
        //////////////////////////////////////
        // Tests concerning addSlashesOnArray
        //////////////////////////////////////
index a99f44d..3845d79 100644 (file)
@@ -132,8 +132,6 @@ class HelpModuleController {
                        // There's at least one extra part
                        $extraIdentifierInformation = array();
                        $extraIdentifierInformation[] = array_shift($identifierParts);
-                       // Load the TCA details of the table
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($this->table);
                        // If the ds_pointerField contains a comma, it means the choice of FlexForm DS
                        // is determined by 2 parameters. In this case we have an extra identifier part
                        if (strpos($GLOBALS['TCA'][$this->table]['columns'][$this->field]['config']['ds_pointerField'], ',') !== FALSE) {
@@ -373,8 +371,6 @@ class HelpModuleController {
                if ($table === NULL) {
                        $table = $key;
                }
-               // Load table TCA
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($key);
                // Load descriptions for table $table
                $GLOBALS['LANG']->loadSingleTableDescription($key);
                if (is_array($GLOBALS['TCA_DESCR'][$key]['columns']) && (!$this->limitAccess || $GLOBALS['BE_USER']->check('tables_select', $table))) {
@@ -468,7 +464,6 @@ class HelpModuleController {
                                        }
                                } else {
                                        // "table" reference
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($iP[0]);
                                        if (!isset($GLOBALS['TCA'][$iP[0]]) || (!$iP[1] || is_array($GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]])) && (!$this->limitAccess || $GLOBALS['BE_USER']->check('tables_select', $iP[0]) && (!$iP[1] || !$GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $iP[0] . ':' . $iP[1])))) {
                                                // Checking read access:
                                                if (isset($GLOBALS['TCA_DESCR'][$iP[0]])) {
@@ -567,8 +562,6 @@ class HelpModuleController {
         */
        public function printItem($key, $field, $anchors = FALSE) {
                $out = '';
-               // Load full table definition in $GLOBALS['TCA']
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($key);
                if ($key && (!$field || is_array($GLOBALS['TCA_DESCR'][$key]['columns'][$field]))) {
                        // Make seeAlso references.
                        $seeAlsoRes = $this->make_seeAlso($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['seeAlso'], $anchors ? $key : '');
index 063a355..73388fe 100644 (file)
@@ -258,7 +258,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                // Get the list of files from the field
                                $field = trim($conf['field']) ? trim($conf['field']) : 'media';
                                $fileList = $this->cObj->data[$field];
-                               $GLOBALS['TSFE']->includeTCA();
                                $path = 'uploads/media/';
                                if (is_array($GLOBALS['TCA']['tt_content']['columns'][$field]) && !empty($GLOBALS['TCA']['tt_content']['columns'][$field]['config']['uploadfolder'])) {
                                        // In TCA-Array folders are saved without trailing slash, so $path.$fileName won't work
index 28acfbc..dbef007 100755 (executable)
@@ -6,9 +6,6 @@ if (!defined('TYPO3_MODE')) {
 // Add flexform
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:css_styled_content/flexform_ds.xml', 'table');
 
-// Load TCA before manipulating the column configuration
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
-
 $GLOBALS['TCA']['tt_content']['types']['table']['showitem'] = 'CType;;4;;1-1-1, hidden, header;;3;;2-2-2, linkToTop;;;;4-4-4,
                        --div--;LLL:EXT:cms/locallang_ttc.xml:CType.I.5, layout;;10;;3-3-3, cols, bodytext;;9;nowrap:wizards[table], text_properties, pi_flexform,
                        --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime, fe_group';
index 8f8ada6..fc20269 100644 (file)
@@ -3,7 +3,6 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 $_EXTCONF = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['felogin']);
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:' . $_EXTKEY . '/flexform.xml', 'login');
 
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array(
@@ -42,7 +41,6 @@ $tempColumns = array(
                )
        )
 );
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_groups');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_groups', $tempColumns, 1);
 \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
@@ -72,7 +70,6 @@ $tempColumns = array(
                )
        )
 );
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_users');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns, 1);
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');
 ?>
\ No newline at end of file
index 6e636fa..f18dee1 100644 (file)
@@ -6,9 +6,6 @@ if (!defined('TYPO3_MODE')) {
 // Add Default TS to Include static (from extensions)
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/', 'Default TS');
 
-// Load TCA before manipulating the column configuration
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
-
 $TCA['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array(
        'notNewRecords' => 1,
        'enableByTypeConfig' => 1,
index 5550f08..ede78e7 100644 (file)
@@ -5542,8 +5542,6 @@ class ContentObjectRenderer {
                $table = $conf['table'];
                $field = $conf['field'];
                $delimiter = $conf['delimiter'] ? $conf['delimiter'] : ' ,';
-               $GLOBALS['TSFE']->includeTCA();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$field]) && is_array($GLOBALS['TCA'][$table]['columns'][$field]['config']['items'])) {
                        $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $inputValue);
                        $output = array();
@@ -7817,4 +7815,4 @@ class ContentObjectRenderer {
 
 }
 
-?>
+?>
\ No newline at end of file
index 9855bd4..9703cb6 100644 (file)
@@ -239,12 +239,6 @@ class TypoScriptFrontendController {
         */
        public $config = '';
 
-       // Array of cached information from TCA. This is NOT TCA itself!
-       /**
-        * @todo Define visibility
-        */
-       public $TCAcachedExtras = array();
-
        // TEMPLATE / CACHE
        /**
         * The TypoScript template object. Used to parse the TypoScript template
@@ -656,12 +650,6 @@ class TypoScriptFrontendController {
         */
        public $scriptParseTime = 0;
 
-       // Set ONLY if the full TCA is loaded
-       /**
-        * @todo Define visibility
-        */
-       public $TCAloaded = 0;
-
        // Character set (charset) conversion object:
        /**
         * charset conversion class. May be used by any application.
@@ -2448,65 +2436,36 @@ class TypoScriptFrontendController {
         * (jumpurl/submission of forms)
         *
         *******************************************/
+
        /**
         * Get the compressed $GLOBALS['TCA'] array for use in the front-end
-        * A compressed $GLOBALS['TCA'] array holds only the ctrl- and feInterface-part for each table. But the column-definitions are omitted in order to save some memory and be more efficient.
+        * A compressed $GLOBALS['TCA'] array holds only the ctrl- and feInterface-part for each table.
+        * But the column-definitions are omitted in order to save some memory and be more efficient.
         * Operates on the global variable, $TCA
         *
         * @return void
-        * @see includeTCA()
-        * @todo Define visibility
+        * @deprecated since 6,1, will be removed in two versions.
         */
        public function getCompressedTCarray() {
-               $GLOBALS['TT']->push('Get Compressed TC array');
-               if (!$this->TCAloaded) {
-                       // Create hash string for storage / retrieval of cached content:
-                       $tempHash = md5('tables.php:' . filemtime((TYPO3_extTableDef_script ? PATH_typo3conf . TYPO3_extTableDef_script : PATH_t3lib . 'stddb/tables.php')) . (TYPO3_extTableDef_script ? filemtime(PATH_typo3conf . TYPO3_extTableDef_script) : ''));
-                       list($GLOBALS['TCA'], $this->TCAcachedExtras) = unserialize($this->sys_page->getHash($tempHash));
-                       // If no result, create it:
-                       if (!is_array($GLOBALS['TCA'])) {
-                               $this->includeTCA(0);
-                               $newTc = array();
-                               // Collects other information
-                               $this->TCAcachedExtras = array();
-                               foreach ($GLOBALS['TCA'] as $key => $val) {
-                                       $newTc[$key]['ctrl'] = $val['ctrl'];
-                                       $newTc[$key]['feInterface'] = $val['feInterface'];
-                                       // Collect information about localization exclusion of fields:
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($key);
-                                       if (is_array($GLOBALS['TCA'][$key]['columns'])) {
-                                               $this->TCAcachedExtras[$key]['l10n_mode'] = array();
-                                               foreach ($GLOBALS['TCA'][$key]['columns'] as $fN => $fV) {
-                                                       if ($fV['l10n_mode']) {
-                                                               $this->TCAcachedExtras[$key]['l10n_mode'][$fN] = $fV['l10n_mode'];
-                                                       }
-                                               }
-                                       }
-                               }
-                               $GLOBALS['TCA'] = $newTc;
-                               $this->sys_page->storeHash($tempHash, serialize(array($newTc, $this->TCAcachedExtras)), 'SHORT_TC');
-                       }
-               }
-               $GLOBALS['TT']->pull();
+               // Full TCA is always loaded during bootstrap in FE, this method is obsolete.
+               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
        }
 
        /**
         * Includes TCA definitions from loaded extensions (ext_table.php files).
         * Normally in the frontend only a part of the global $TCA array is loaded,
         * namely the "ctrl" part. Thus it doesn't take up too much memory. To load
-        * full TCA for the table, use \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName) after calling
-        * this function.
+        * full TCA for the table, use \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName)
+        * after calling this function.
         *
-        * @param integer $TCAloaded Probably, keep hands of this value. Just don't set it. (This may affect the first-ever time this function is called since if you set it to zero/FALSE any subsequent call will still trigger the inclusion; In other words, this value will be set in $this->TCAloaded after inclusion and therefore if its FALSE, another inclusion will be possible on the next call. See ->getCompressedTCarray())
+        * @param integer $TCAloaded Probably, keep hands of this value. Just don't set it.
         * @return void
         * @see getCompressedTCarray()
+        * @deprecated since 6.1, will be removed in two versions
         */
        public function includeTCA($TCAloaded = 1) {
-               if (!$this->TCAloaded) {
-                       $GLOBALS['TCA'] = array();
-                       \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadExtensionTables(TRUE);
-                       $this->TCAloaded = $TCAloaded;
-               }
+               // Full TCA is always loaded during bootstrap in FE, this method is obsolete.
+               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
        }
 
        /**
@@ -2594,13 +2553,13 @@ class TypoScriptFrontendController {
                $table_fields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softMergeIfNotBlank'], 1);
                foreach ($table_fields as $TF) {
                        list($tN, $fN) = explode(':', $TF);
-                       $this->TCAcachedExtras[$tN]['l10n_mode'][$fN] = 'mergeIfNotBlank';
+                       $GLOBALS['TCA'][$tN]['columns'][$fN]['l10n_mode'] = 'mergeIfNotBlank';
                }
                // Setting softExclude:
                $table_fields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softExclude'], 1);
                foreach ($table_fields as $TF) {
                        list($tN, $fN) = explode(':', $TF);
-                       $this->TCAcachedExtras[$tN]['l10n_mode'][$fN] = 'exclude';
+                       $GLOBALS['TCA'][$tN]['columns'][$fN]['l10n_mode'] = 'exclude';
                }
                if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'])) {
                        $_params = array();
index 90a4c04..ef1a47d 100644 (file)
@@ -384,7 +384,10 @@ class PageRepository {
                                                                }
                                                                foreach ($row as $fN => $fV) {
                                                                        if ($fN != 'uid' && $fN != 'pid' && isset($olrow[$fN])) {
-                                                                               if ($GLOBALS['TSFE']->TCAcachedExtras[$table]['l10n_mode'][$fN] != 'exclude' && ($GLOBALS['TSFE']->TCAcachedExtras[$table]['l10n_mode'][$fN] != 'mergeIfNotBlank' || strcmp(trim($olrow[$fN]), ''))) {
+                                                                               if (
+                                                                                       $GLOBALS['TCA'][$table]['columns'][$fN]['l10n_mode'] != 'exclude'
+                                                                                       && ($GLOBALS['TCA'][$table]['columns'][$fN]['l10n_mode'] != 'mergeIfNotBlank' || strcmp(trim($olrow[$fN]), ''))
+                                                                               ) {
                                                                                        $row[$fN] = $olrow[$fN];
                                                                                }
                                                                        } elseif ($fN == 'uid') {
index 55b0815..cab732b 100644 (file)
@@ -105,15 +105,13 @@ class EidUtility {
                // but in fact it is not loaded. The check below ensure that
                // TCA is still loaded if such bad extensions are installed
                if (!is_array($GLOBALS['TCA']) || !isset($GLOBALS['TCA']['pages'])) {
-                       // Load TCA using TSFE
-                       self::getTSFE()->includeTCA(FALSE);
+                       \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadExtensionTables(TRUE);
                }
        }
 
        /**
         * Makes TCA for the extension available inside eID. Use this function if
-        * you need not to include the whole $GLOBALS['TCA']. However, you still need to call
-        * \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA() if you want to access column array!
+        * you need not to include the whole $GLOBALS['TCA'].
         *
         * @param string $extensionKey Extension key
         * @return void
index 997e441..c57c3f8 100644 (file)
@@ -111,7 +111,6 @@ class AdminPanelView {
        public function getAdminPanelHeaderData() {
                $result = '';
                // Include BE styles
-               $GLOBALS['TSFE']->includeTCA();
                if (!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) {
                        $result = '<link rel="stylesheet" type="text/css" href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) . '" />';
                }
@@ -664,4 +663,4 @@ class AdminPanelView {
 }
 
 
-?>
+?>
\ No newline at end of file
index 0c9c9f2..b40accd 100644 (file)
@@ -1590,7 +1590,6 @@ class ImportExport {
                        if (is_array($this->import_mapId[$table]) && isset($this->import_mapId[$table][$uid])) {
                                $thisNewUid = \TYPO3\CMS\Backend\Utility\BackendUtility::wsMapId($table, $this->import_mapId[$table][$uid]);
                                if (is_array($this->dat['records'][$table . ':' . $uid]['rels'])) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                        // Traverse relation fields of each record
                                        foreach ($this->dat['records'][$table . ':' . $uid]['rels'] as $field => $config) {
                                                switch ((string) $config['type']) {
@@ -1693,7 +1692,6 @@ class ImportExport {
                                foreach ($recs as $uid => $thisRec) {
                                        // If there are soft references defined, traverse those:
                                        if (isset($GLOBALS['TCA'][$table]) && is_array($thisRec['softrefs'])) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                                // First traversal is to collect softref configuration and split them up based on fields. This could probably also have been done with the "records" key instead of the header.
                                                $fieldsIndex = array();
                                                foreach ($thisRec['softrefs'] as $softrefDef) {
index d09ea3c..4612e19 100755 (executable)
@@ -3,7 +3,6 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:indexed_search/locallang.php:mod_indexed_search', $_EXTKEY));
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
 $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY] = 'layout,select_key,pages';
 // Registers the Extbase plugin to be listed in the Backend.
 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('extbase')) {
index 0be034d..95da75d 100644 (file)
@@ -6475,9 +6475,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
         */
        public function includeTCA() {
                \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadExtensionTables(FALSE);
-               foreach ($GLOBALS['TCA'] as $table => $conf) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-               }
        }
 
        /**********************
index f8068ec..ca2f9bb 100644 (file)
@@ -461,8 +461,6 @@ In effect you can therefore have, say, a "stable" version of an extension instal
 
 &lt;b&gt;Module+:&lt;/b&gt; The extension adds itself to the function menu of an existing backend module.
 
-&lt;b&gt;loadTCA:&lt;/b&gt; The extension includes a function call to t3lib_div::loadTCA for loading a table. This potentially means that the system is slowed down, because the full table description of some table is always included. However there probably is a good reason for this to happen. Probably the extension tries to manipulate the TCA-config for an existing table in order to extend it.
-
 &lt;b&gt;TCA:&lt;/b&gt; The extension contains configuration of a table in $TCA.
 
 &lt;b&gt;Plugin:&lt;/b&gt; The extension adds a frontend plugin to the plugin list in Content Element type "Insert Plugin".
index b6573ee..ad71e11 100644 (file)
@@ -99,7 +99,6 @@ Cleaning XML for FlexForm fields.
         * @todo Define visibility
         */
        public function main_parseTreeCallBack($tableName, $uid, $echoLevel, $versionSwapmode, $rootIsVersion) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                foreach ($GLOBALS['TCA'][$tableName]['columns'] as $colName => $config) {
                        if ($config['config']['type'] == 'flex') {
                                if ($echoLevel > 2) {
index 4a799d0..1a29b6d 100644 (file)
@@ -122,9 +122,6 @@ class ConfigurationView {
                        $arrayBrowser->varName = '$TYPO3_CONF_VARS';
                        break;
                case 1:
-                       foreach ($GLOBALS['TCA'] as $table => $config) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-                       }
                        $theVar = $GLOBALS['TCA'];
                        \TYPO3\CMS\Core\Utility\GeneralUtility::naturalKeySortRecursive($theVar);
                        $arrayBrowser->varName = '$TCA';
@@ -214,14 +211,6 @@ class ConfigurationView {
                                if ($var === '$TCA') {
                                        // check if we are editing the TCA
                                        preg_match_all('/\\[\'([^\']+)\'\\]/', $line, $parts);
-                                       if ($parts[1][1] !== 'ctrl') {
-                                               // anything else than ctrl section requires to load TCA
-                                               $loadTCA = 'TYPO3\\CMS\\Core\\Utility\\GeneralUtility::loadTCA(\'' . $parts[1][0] . '\');';
-                                               if (strpos($extTables, $loadTCA) === FALSE) {
-                                                       // check if the loadTCA statement is not already present in the file
-                                                       $changedLine = $loadTCA . LF . $changedLine;
-                                               }
-                                       }
                                }
                                // insert line in extTables.php
                                $extTables = preg_replace('/<\\?php|\\?>/is', '', $extTables);
index fa59be1..0a80092 100644 (file)
@@ -17,14 +17,12 @@ $tempColumns = array(
        )
 );
 // Add new columns to be_users table
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('be_users');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('be_users', $tempColumns, FALSE);
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('be_users', 'tx_openid_openid;;;;1-1-1', '', 'after:username');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('be_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
 // Prepare new columns for fe_users table
 $tempColumns['tx_openid_openid']['config']['eval'] = 'trim,nospace,uniqueInPid';
 // Add new columns to fe_users table
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_users');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns, FALSE);
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
index 9f994c0..d943e15 100644 (file)
@@ -388,8 +388,6 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                        // Checking if the table should be rendered:
                        // Checks that we see only permitted/requested tables:
                        if ((!$this->table || $tableName == $this->table) && (!$this->tableList || \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->tableList, $tableName)) && $GLOBALS['BE_USER']->check('tables_select', $tableName)) {
-                               // Load full table definitions:
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
                                // Don't show table if hidden by TCA ctrl section
                                $hideTable = $GLOBALS['TCA'][$tableName]['ctrl']['hideTable'] ? TRUE : FALSE;
                                // Don't show table if hidden by pageTSconfig mod.web_list.hideTables
@@ -624,8 +622,6 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                        $result = ' AND 0=1';
                        $searchableFields = $this->getSearchFields($table);
                        if (count($searchableFields) > 0) {
-                               // Loading full table description - we need to traverse fields:
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                                if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->searchString)) {
                                        $whereParts = array(
                                                'uid=' . $this->searchString
@@ -881,7 +877,6 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                $fieldListArr = array();
                // Check table:
                if (is_array($GLOBALS['TCA'][$table]) && isset($GLOBALS['TCA'][$table]['columns']) && is_array($GLOBALS['TCA'][$table]['columns'])) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if (isset($GLOBALS['TCA'][$table]['columns']) && is_array($GLOBALS['TCA'][$table]['columns'])) {
                                // Traverse configured columns and add them to field array, if available for user.
                                foreach ($GLOBALS['TCA'][$table]['columns'] as $fN => $fieldValue) {
index 5f57bd7..e985a77 100644 (file)
@@ -246,8 +246,6 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
         * @todo Define visibility
         */
        public function getTable($table, $id, $rowlist) {
-               // Loading all TCA details for this table:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Init
                $addWhere = '';
                $titleCol = $GLOBALS['TCA'][$table]['ctrl']['label'];
@@ -988,8 +986,6 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
                if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('version') && isset($row['_ORIG_uid'])) {
                        $rowUid = $row['_ORIG_uid'];
                }
-               // Initialize:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $cells = array();
                // If the listed table is 'pages' we have to request the permission settings for each page:
                if ($table == 'pages') {
@@ -1298,7 +1294,6 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
         */
        public function fieldSelectBox($table, $formFields = 1) {
                // Init:
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                $formElements = array('', '');
                if ($formFields) {
                        $formElements = array('<form action="' . htmlspecialchars($this->listURL()) . '" method="post">', '</form>');
index fed03c0..1be670d 100644 (file)
@@ -4,8 +4,6 @@ if (!defined('TYPO3_MODE')) {
 }
 // Adding soft reference keys in tt_content configuration
 // htmlArea RTE soft reference keys are inserted in front so that their tokens are inserted first
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('pages');
 $GLOBALS['TCA']['tt_content']['columns']['header']['config']['softref'] = 'typolink_tag' . ($GLOBALS['TCA']['tt_content']['columns']['header']['config']['softref'] ? ',' . $GLOBALS['TCA']['tt_content']['columns']['header']['config']['softref'] : '');
 $tempTables = array('pages', 'tt_content');
 foreach ($tempTables as $table) {
index 54913cb..4e909de 100644 (file)
@@ -2,7 +2,6 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_users');
 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['max'] = 100;
 if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('FE')) {
        // Get eval field operations methods as array keys
@@ -15,7 +14,6 @@ if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('F
        $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
        unset($operations);
 }
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('be_users');
 $GLOBALS['TCA']['be_users']['columns']['password']['config']['max'] = 100;
 if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('BE')) {
        // Get eval field operations methods as array keys
index 175f23e..c65054d 100644 (file)
@@ -33,7 +33,6 @@ $tempField = array(
                )
        )
 );
-\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('sys_template');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_template', $tempField, 1);
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('sys_template', 'include_static;;2;;5-5-5', '', 'before:includeStaticAfterBasedOn');
 ?>
\ No newline at end of file
index 34dc1b5..4031a6e 100644 (file)
@@ -580,8 +580,6 @@ class user_feAdmin {
                                $fileNameList[] = ($fI2['basename'] . '|') . $infoArr['name'];
                        } else {
                                $this->createFileFuncObj();
-                               $GLOBALS['TSFE']->includeTCA();
-                               t3lib_div::loadTCA($this->theTable);
                                if (is_array($GLOBALS['TCA'][$this->theTable]['columns'][$theField])) {
                                        $uploadPath = $GLOBALS['TCA'][$this->theTable]['columns'][$theField]['config']['uploadfolder'];
                                }
@@ -901,8 +899,6 @@ class user_feAdmin {
        public function deleteFilesFromRecord($uid) {
                $table = $this->theTable;
                $rec = $GLOBALS['TSFE']->sys_page->getRawRecord($table, $uid);
-               $GLOBALS['TSFE']->includeTCA();
-               t3lib_div::loadTCA($table);
                $iFields = array();
                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $conf) {
                        if ($conf['config']['type'] == 'group' && $conf['config']['internal_type'] == 'file') {
index a4c5f8d..65ba022 100644 (file)
@@ -9,7 +9,6 @@ if (TYPO3_MODE === 'BE') {
        $TYPO3_CONF_VARS['BE']['AJAX']['T3Editor_TSrefLoader::getTypes'] = 'EXT:t3editor/Classes/ts_codecompletion/class.tx_t3editor_tsrefloader.php:TYPO3\\CMS\\T3Editor\\TypoScriptReferenceLoader->processAjaxRequest';
        $TYPO3_CONF_VARS['BE']['AJAX']['T3Editor_TSrefLoader::getDescription'] = 'EXT:t3editor/Classes/ts_codecompletion/class.tx_t3editor_tsrefloader.php:TYPO3\\CMS\\T3Editor\\TypoScriptReferenceLoader->processAjaxRequest';
        $TYPO3_CONF_VARS['BE']['AJAX']['CodeCompletion::loadTemplates'] = 'EXT:t3editor/Classes/ts_codecompletion/class.tx_t3editor_codecompletion.php:TYPO3\\CMS\\T3Editor\\CodeCompletion->processAjaxRequest';
-       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
        // Add the t3editor wizard on the bodytext field of tt_content
        $TCA['tt_content']['columns']['bodytext']['config']['wizards']['t3editor'] = array(
                'enableByTypeConfig' => 1,
index a22a560..8293394 100644 (file)
@@ -89,7 +89,6 @@ if (TYPO3_MODE == 'BE' || TYPO3_MODE == 'FE' && isset($GLOBALS['BE_USER'])) {
        // Changing icon for filemounts, needs to be done here as overwriting the original icon would also change the filelist tree's root icon
        $TCA['sys_filemounts']['ctrl']['iconfile'] = '_icon_ftp_2.gif';
        // Adding flags to sys_language
-       \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('sys_language');
        $TCA['sys_language']['ctrl']['typeicon_column'] = 'flag';
        $TCA['sys_language']['ctrl']['typeicon_classes'] = array(
                'default' => 'mimetypes-x-sys_language',
index 097e7f8..20783ef 100644 (file)
@@ -178,7 +178,6 @@ class TypoScriptTemplateInformationModuleFunctionController extends \TYPO3\CMS\B
                $this->pObj->MOD_MENU['includeTypoScriptFileContent'] = TRUE;
                $edit = $this->pObj->edit;
                $e = $this->pObj->e;
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('sys_template');
                // Checking for more than one template an if, set a menu...
                $manyTemplatesMenu = $this->pObj->templateMenu();
                $template_uid = 0;