Commit 3fa018fb authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Remove unused code vot TYPO3 <9LTS

parent bf1482b4
...@@ -66,21 +66,10 @@ abstract class AbstractDataBaseDataProvider extends AbstractBaseDataProvider { ...@@ -66,21 +66,10 @@ abstract class AbstractDataBaseDataProvider extends AbstractBaseDataProvider {
/** @var TypoScriptFrontendController $typoscriptController */ /** @var TypoScriptFrontendController $typoscriptController */
$typoscriptController = $GLOBALS['TSFE']; $typoscriptController = $GLOBALS['TSFE'];
$context = GeneralUtility::makeInstance(Context::class);
// check for language overlay if: $languageAspect = $context->getAspect('language');
// * row is valid $sysLanguageContent = $languageAspect->getContentId();
// * row language is different from currently needed language $sysLanguageContentOl = $languageAspect->getOverlayType();
// * sys_language_contentOL is set
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
$sysLanguageContent = $GLOBALS['TSFE']->sys_language_content;
$sysLanguageContentOl = $GLOBALS['TSFE']->sys_language_contentOL;
} else {
$context = GeneralUtility::makeInstance(Context::class);
$languageAspect = $context->getAspect('language');
$sysLanguageContent = $languageAspect->getContentId();
$sysLanguageContentOl = $languageAspect->getOverlayType();
}
if (\is_array($row) && $row['sys_language_uid'] !== $sysLanguageContent && if (\is_array($row) && $row['sys_language_uid'] !== $sysLanguageContent &&
$sysLanguageContentOl $sysLanguageContentOl
) { ) {
......
...@@ -27,8 +27,6 @@ namespace SGalinski\DfTabs\Utility; ...@@ -27,8 +27,6 @@ namespace SGalinski\DfTabs\Utility;
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
*/ */
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
/** /**
* Class ExtensionUtility * Class ExtensionUtility
* *
...@@ -42,13 +40,6 @@ class ExtensionUtility { ...@@ -42,13 +40,6 @@ class ExtensionUtility {
* @return array * @return array
*/ */
public static function getExtensionConfiguration(): array { public static function getExtensionConfiguration(): array {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
$extConf = \unserialize(
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['df_tabs'], ['allowed_classes' => FALSE]
);
return is_array($extConf) ? $extConf : [];
}
return $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['df_tabs'] ?? []; return $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['df_tabs'] ?? [];
} }
...@@ -58,10 +49,6 @@ class ExtensionUtility { ...@@ -58,10 +49,6 @@ class ExtensionUtility {
* @param array $configuration * @param array $configuration
*/ */
public static function setExtensionConfiguration(array $configuration) { public static function setExtensionConfiguration(array $configuration) {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) { $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['df_tabs'] = $configuration;
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['df_tabs'] = \serialize($configuration);
} else {
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['df_tabs'] = $configuration;
}
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment