Revert "[TASK] Remove loadTCA calls"
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 13 Feb 2013 15:56:54 +0000 (16:56 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 13 Feb 2013 15:59:00 +0000 (16:59 +0100)
This reverts commit ea2c7405b3c376d23e0fd5c938ae428fcc6f0174

Change-Id: Ib40f996bdeb5ee4d327a77d8af5ff040cafcee88
Related: #45107
Reviewed-on: https://review.typo3.org/18241
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php

index d354aad..c1bc52b 100644 (file)
@@ -346,6 +346,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                $diff_1_record = \t3lib_BEfunc::getRecord($this->table, $diff_1);
                                $diff_2_record = \t3lib_BEfunc::getRecord($this->table, $diff_2);
                                if (is_array($diff_1_record) && is_array($diff_2_record)) {
+                                       \t3lib_div::loadTCA($this->table);
                                        $t3lib_diff_Obj = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
                                        $tRows = array();
                                        $tRows[] = '
@@ -1199,6 +1200,8 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                $pctChange = 'N/A';
                // Check that records are arrays:
                if (is_array($diff_1_record) && is_array($diff_2_record)) {
+                       // Load full table description and initialize diff-object:
+                       \t3lib_div::loadTCA($table);
                        $t3lib_diff_Obj = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
                        // Add header row:
                        $tRows = array();
index 6fb8543..0ec062e 100644 (file)
@@ -1245,6 +1245,7 @@ class DataHandlerHook {
         * @return array
         */
        protected function getPossibleInlineChildTablesOfParentTable($parentTable, array $possibleInlineChildren = array()) {
+               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($parentTable);
                foreach ($GLOBALS['TCA'][$parentTable]['columns'] as $parentField => $parentFieldDefinition) {
                        if (isset($parentFieldDefinition['config']['type'])) {
                                $parentFieldConfiguration = $parentFieldDefinition['config'];
@@ -1277,6 +1278,7 @@ class DataHandlerHook {
         */
        protected 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') {
@@ -1293,4 +1295,4 @@ class DataHandlerHook {
 }
 
 
-?>
+?>
\ No newline at end of file