Skip to content

Commit 0445b72

Browse files
authored
Merge pull request #39 from ghermens/dev/version-switch
[TASK] Remove version switch
2 parents 68211cd + dd05d97 commit 0445b72

File tree

1 file changed

+8
-28
lines changed
  • Configuration/SiteConfiguration/Overrides

1 file changed

+8
-28
lines changed

Configuration/SiteConfiguration/Overrides/sites.php

+8-28
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
use Lochmueller\LanguageDetection\Service\LocaleCollectionSortService;
66
use Lochmueller\LanguageDetection\Service\TcaLanguageSelection;
7-
use TYPO3\CMS\Core\Information\Typo3Version;
8-
use TYPO3\CMS\Core\Utility\GeneralUtility;
97
use TYPO3\CMS\Core\Utility\HttpUtility;
10-
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
118

129
$GLOBALS['SiteConfiguration']['site']['columns']['enableLanguageDetection'] = [
1310
'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:enable',
@@ -69,31 +66,14 @@
6966
],
7067
];
7168

72-
$version11Branch = VersionNumberUtility::convertVersionNumberToInteger(GeneralUtility::makeInstance(Typo3Version::class)->getBranch()) >= VersionNumberUtility::convertVersionNumberToInteger('11.2');
73-
74-
if ($version11Branch) {
75-
$GLOBALS['SiteConfiguration']['site']['columns']['fallbackDetectionLanguage'] = [
76-
'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:fallback.detection.language',
77-
'config' => [
78-
'type' => 'select',
79-
'renderType' => 'selectSingle',
80-
'itemsProcFunc' => TcaLanguageSelection::class . '->get',
81-
],
82-
];
83-
} else {
84-
$GLOBALS['SiteConfiguration']['site']['columns']['fallbackDetectionLanguage'] = [
85-
'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:fallback.detection.language',
86-
'config' => [
87-
'type' => 'select',
88-
'renderType' => 'selectSingle',
89-
'special' => 'languages',
90-
'items' => [
91-
['', ''],
92-
],
93-
'default' => '',
94-
],
95-
];
96-
}
69+
$GLOBALS['SiteConfiguration']['site']['columns']['fallbackDetectionLanguage'] = [
70+
'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:fallback.detection.language',
71+
'config' => [
72+
'type' => 'select',
73+
'renderType' => 'selectSingle',
74+
'itemsProcFunc' => TcaLanguageSelection::class . '->get',
75+
],
76+
];
9777

9878
$GLOBALS['SiteConfiguration']['site']['columns']['allowAllPaths'] = [
9979
'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:allow.all.paths',

0 commit comments

Comments
 (0)