Added feature #13379: Introduced a Sprite Icon API to render icons from sprites ...
[Packages/TYPO3.CMS.git] / typo3 / class.db_list.inc
index ad5c78c..5a7a532 100644 (file)
@@ -178,7 +178,7 @@ class recordList extends t3lib_recordList {
                $this->counter=0;
                $this->JScode='';
                $this->HTMLcode='';
-        
+
                        // limits
                if(isset($this->modTSconfig['properties']['itemsLimitPerTable'])) {
                        $this->itemsLimitPerTable = t3lib_div::intInRange(intval($this->modTSconfig['properties']['itemsLimitPerTable']), 1, 10000);
@@ -186,7 +186,7 @@ class recordList extends t3lib_recordList {
                if(isset($this->modTSconfig['properties']['itemsLimitSingleTable'])) {
                        $this->itemsLimitSingleTable = t3lib_div::intInRange(intval($this->modTSconfig['properties']['itemsLimitSingleTable']), 1, 10000);
                }
-               
+
                        // Set select levels:
                $sL=intval($this->searchLevels);
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
@@ -212,7 +212,7 @@ class recordList extends t3lib_recordList {
                        $GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc);
                        if (t3lib_div::_GP('returnUrl')) {
                                $location = t3lib_div::_GP('returnUrl');
-                               t3lib_div::redirect($location);
+                               t3lib_utility_Http::redirect($location);
                        }
                }
 
@@ -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;
                                }
 
@@ -819,8 +827,7 @@ class recordList extends t3lib_recordList {
                                $returnUrl = '&returnUrl='.rawurlencode($this->listURL());
                                $location = $GLOBALS['BACK_PATH'].'alt_doc.php?'.$params.$returnUrl;
 
-                               header('Location: '.t3lib_div::locationHeaderUrl($location));
-                               exit;
+                               t3lib_utility_Http::redirect($location);
                        }
                }
        }