[TASK] Remove unused code in PageLayoutView.php 62/25662/9
authorJan Helke <typo3@helke.de>
Fri, 30 Jan 2015 18:04:25 +0000 (19:04 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 1 Mar 2015 19:45:57 +0000 (20:45 +0100)
Changing the backend view to use grid elements caused an ancient
piece of code in PageLayoutView.php to be never executed. In fact
an if statement in PageLayoutController.php always evaluates to
"FALSE" which lets the code in PageLayoutView.php never get
executed.

Change-Id: I4f97690b54efeb7659f86f1ef15fa8603e97f69b
Resolves: #53898
Releases: master
Reviewed-on: http://review.typo3.org/25662
Reviewed-by: Jo Hasenau <info@cybercraft.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Frederic Gaus <frederic.gaus@flagbit.de>
Tested-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/View/PageLayoutView.php

index 0b35614..1a5c1c1 100644 (file)
@@ -935,13 +935,6 @@ class PageLayoutController {
                                $dblist->tt_contentConfig['showCommands'] = 1;
                                // Boolean: Display info-marks or not
                                $dblist->tt_contentConfig['showInfo'] = 1;
-                               // Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown
-                               // in the total width of the page
-                               $dblist->tt_contentConfig['single'] = 0;
-                               if ($this->MOD_SETTINGS['function'] == 4) {
-                                       // Grid view
-                                       $dblist->tt_contentConfig['showAsGrid'] = 1;
-                               }
                                // Setting up the tt_content columns to show:
                                if (is_array($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'])) {
                                        $colList = array();
@@ -956,14 +949,6 @@ class PageLayoutController {
                                if ($this->colPosList !== '') {
                                        $colList = array_intersect(GeneralUtility::intExplode(',', $this->colPosList), $colList);
                                }
-                               // If only one column found, display the single-column view.
-                               if (count($colList) === 1 && !$this->MOD_SETTINGS['function'] === 4) {
-                                       // Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol']
-                                       // is shown in the total width of the page
-                                       $dblist->tt_contentConfig['single'] = 1;
-                                       // The column(s) to show if single mode (under each other)
-                                       $dblist->tt_contentConfig['showSingleCol'] = current($colList);
-                               }
                                // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
                                $dblist->tt_contentConfig['cols'] = implode(',', $colList);
                                $dblist->tt_contentConfig['activeCols'] = $this->activeColPosList;
index 9dfb5a1..dbfcd23 100644 (file)
@@ -114,16 +114,10 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         * @var array
         */
        public $tt_contentConfig = array(
-               'showInfo' => 1,
                // Boolean: Display info-marks or not
-               'showCommands' => 1,
+               'showInfo' => 1,
                // Boolean: Display up/down arrows and edit icons for tt_content records
-               'single' => 1,
-               // Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown in the total width of the page
-               'showAsGrid' => 0,
-               // Boolean: If set, the content of columns is shown in grid
-               'showSingleCol' => 0,
-               // The column(s) to show if single mode (under each other)
+               'showCommands' => 1,
                'languageCols' => 0,
                'languageMode' => 0,
                'languageColsPointer' => 0,