From 1e6df9d0a0c158ac2e686cce76144eb5bd9c9405 Mon Sep 17 00:00:00 2001 From: Jan Helke <typo3@helke.de> Date: Fri, 30 Jan 2015 19:04:25 +0100 Subject: [PATCH] [TASK] Remove unused code in PageLayoutView.php 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> --- .../Classes/Controller/PageLayoutController.php | 15 --------------- .../backend/Classes/View/PageLayoutView.php | 10 ++-------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php index 0b3561463534..1a5c1c14450f 100644 --- a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php +++ b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php @@ -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; diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php index 9dfb5a160b96..dbfcd236cab4 100644 --- a/typo3/sysext/backend/Classes/View/PageLayoutView.php +++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php @@ -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, -- GitLab