[TASK] Cleanup calls to compat_version 09/34709/2
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 27 Nov 2014 18:32:16 +0000 (19:32 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Thu, 27 Nov 2014 19:08:31 +0000 (20:08 +0100)
* 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>
typo3/sysext/core/Configuration/TCA/Overrides/compatibility.php [deleted file]
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.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 (file)
index d3b1a69..0000000
+++ /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,
-       '
-       );
-}
index 5c1d46e..700ac29 100644 (file)
@@ -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;
                                        }