From 2e1153069d7d5d1db8bb482b1500d774cd7b610a Mon Sep 17 00:00:00 2001 From: Georg Ringer <georg.ringer@gmail.com> Date: Thu, 27 Nov 2014 19:32:16 +0100 Subject: [PATCH] [TASK] Cleanup calls to compat_version * TCA changes if version is below 4.2 is removed * Check for version greater 4.0 is removed Resolves: #63378 Releases: master Change-Id: I6169bccfcf318aac6c11aa3a25126a3554c8af2a Reviewed-on: http://review.typo3.org/34709 Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de> Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de> Reviewed-by: Markus Klein <klein.t3@reelworx.at> Tested-by: Markus Klein <klein.t3@reelworx.at> --- .../TCA/Overrides/compatibility.php | 45 ------------------- .../TypoScriptFrontendController.php | 13 +++--- 2 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 typo3/sysext/core/Configuration/TCA/Overrides/compatibility.php diff --git a/typo3/sysext/core/Configuration/TCA/Overrides/compatibility.php b/typo3/sysext/core/Configuration/TCA/Overrides/compatibility.php deleted file mode 100644 index d3b1a69b5cab..000000000000 --- a/typo3/sysext/core/Configuration/TCA/Overrides/compatibility.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -defined('TYPO3_MODE') or die(); - -// If the compat version is less than 4.2, pagetype 2 ("Advanced") -// and pagetype 5 ("Not in menu") are added to TCA. -if (!\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('4.2')) { - // Merging in CMS doktypes - array_splice($GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'], 2, 0, array( - array( - 'LLL:EXT:cms/locallang_tca.xlf:pages.doktype.I.0', - '2', - 'i/pages.gif' - ), - array( - 'LLL:EXT:cms/locallang_tca.xlf:pages.doktype.I.3', - '5', - 'i/pages_notinmenu.gif' - ) - )); - // Set the doktype 1 ("Standard") to show less fields - $GLOBALS['TCA']['pages']['types'][1] = array( - // standard - 'showitem' => 'doktype;;2, hidden, nav_hide, title;;3, subtitle, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access, - starttime, endtime, fe_group, extendToSubpages, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.options, - TSconfig;;6;nowrap, storage_pid;;7, l18n_cfg, backend_layout;;8, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.extended, - ' - ); - // Add doktype 2 ("Advanced") - $GLOBALS['TCA']['pages']['types'][2] = array( - 'showitem' => 'doktype;;2, hidden, nav_hide, title;;3, subtitle, nav_title, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.metadata, - abstract;;5, keywords, description, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.files, - media, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access, - starttime, endtime, fe_login_mode, fe_group, extendToSubpages, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.options, - TSconfig;;6;nowrap, storage_pid;;7, l18n_cfg, module, content_from_pid, backend_layout;;8, - --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.extended, - ' - ); -} diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index 5c1d46e38cb0..700ac298b8bc 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -2423,14 +2423,13 @@ class TypoScriptFrontendController { $this->config['config']['typolinkCheckRootline'] = TRUE; } // Set default values for removeDefaultJS and inlineStyle2TempFile so CSS and JS are externalized if compatversion is higher than 4.0 - if (GeneralUtility::compat_version('4.0')) { - if (!isset($this->config['config']['removeDefaultJS'])) { - $this->config['config']['removeDefaultJS'] = 'external'; - } - if (!isset($this->config['config']['inlineStyle2TempFile'])) { - $this->config['config']['inlineStyle2TempFile'] = 1; - } + if (!isset($this->config['config']['removeDefaultJS'])) { + $this->config['config']['removeDefaultJS'] = 'external'; } + if (!isset($this->config['config']['inlineStyle2TempFile'])) { + $this->config['config']['inlineStyle2TempFile'] = 1; + } + if (!isset($this->config['config']['compressJs'])) { $this->config['config']['compressJs'] = 0; } -- GitLab