Fixed bug #13386: Bug: mod.web_list.hideTables doesn't accept spaces
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Mar 2010 13:12:01 +0000 (13:12 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Mar 2010 13:12:01 +0000 (13:12 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7173 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.db_list.inc

index 35d9e32..5462c25 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-03-26  Christian Kuhn  <lolli@schwarzbu.ch>
 
+       * Fixed bug #13386: Bug: mod.web_list.hideTables doesn't accept spaces
        * Follow-up to bug #13681: Added testcase for t3lib_div::revExplode
        * Fixed bug #13681: Improve performance of t3lib_div::revExplode
 
index ba4d577..5a7a532 100644 (file)
@@ -252,9 +252,17 @@ class recordList extends t3lib_recordList {
                                        // Load full table definitions:
                                t3lib_div::loadTCA($tableName);
 
-                                       // Hide tables which are configured via TSConfig not to be shown (also works for admins):
-                               if (isset($this->tableTSconfigOverTCA[$tableName.'.']['hideTable']) ? $this->tableTSconfigOverTCA[$tableName.'.']['hideTable'] :
-                                               (t3lib_div::inList($this->hideTables, $tableName) ? true : $GLOBALS['TCA'][$tableName]['ctrl']['hideTable'])) {
+                                       // 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
+                               if (in_array($tableName, t3lib_div::trimExplode(',', $this->hideTables))) {
+                                       $hideTable = TRUE;
+                               }
+                                       // Override previous selection if table is enabled or hidden by TSconfig TCA override mod.web_list.table
+                               if (isset($this->tableTSconfigOverTCA[$tableName.'.']['hideTable'])) {
+                                       $hideTable = $this->tableTSconfigOverTCA[$tableName.'.']['hideTable'] ? TRUE : FALSE;
+                               }
+                               if ($hideTable) {
                                        continue;
                                }