Fixed bug #6703: $TCA[table]['ctrl']['hideTable'] not implemented
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 6 Dec 2007 13:11:54 +0000 (13:11 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 6 Dec 2007 13:11:54 +0000 (13:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2803 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.db_list.inc
typo3/db_list.php

index f9dfd07..4c6e72a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Fixed problems with language files in new installer (typo3/sysext/install)
        * Fixed bug #6903: Translated language files are not loaded
+       * Fixed bug #6703: $TCA[table]['ctrl']['hideTable'] not implemented
 
 2007-12-04     Dmitry Dulepov  <dmitry@typo3.org>
 
index 26b2a74..31fbff1 100755 (executable)
@@ -118,6 +118,7 @@ class recordList extends t3lib_recordList {
        var $modSharedTSconfig = array();               // Shared module configuration, used by localization features
        var $pageRecord = array();              // Loaded with page record with version overlay if any.
        var $hideTables = '';                   // Tables which should not get listed
+       var $tableTSconfigOverTCA = array(); //TSconfig which overwrites TCA-Settings
 
                // Internal, dynamic:
        var $JScode = '';                               // JavaScript code accumulation
@@ -225,7 +226,10 @@ class recordList extends t3lib_recordList {
                                t3lib_div::loadTCA($tableName);
 
                                        // Hide tables which are configured via TSConfig not to be shown (also works for admins):
-                               if (t3lib_div::inList($this->hideTables, $tableName))   continue;
+                               if (isset($this->tableTSconfigOverTCA[$tableName.'.']['hideTable']) ? $this->tableTSconfigOverTCA[$tableName.'.']['hideTable'] :
+                                               (t3lib_div::inList($this->hideTables, $tableName) ? true : $GLOBALS['TCA'][$tableName]['ctrl']['hideTable'])) {
+                                       continue;
+                               }
 
                                        // iLimit is set depending on whether we're in single- or multi-table mode
                                if ($this->table)       {
index 0655f1e..1aea128 100755 (executable)
@@ -222,6 +222,7 @@ class SC_db_list {
                $dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
                $dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
                $dblist->hideTables = $this->modTSconfig['properties']['hideTables'];
+               $dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
                $dblist->clickTitleMode = $this->modTSconfig['properties']['clickTitleMode'];
                $dblist->alternateBgColors=$this->modTSconfig['properties']['alternateBgColors']?1:0;
                $dblist->allowedNewTables = t3lib_div::trimExplode(',',$this->modTSconfig['properties']['allowedNewTables'],1);