Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Classes/Tca/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;

Expand Down Expand Up @@ -83,6 +84,7 @@ public function configureContainer(ContainerConfiguration $containerConfiguratio
public function getContentDefenderConfiguration(string $cType, int $colPos): array
{
$contentDefenderConfiguration = [];
$typo3Version = ((new Typo3Version())->getMajorVersion());
$rows = $this->getGrid($cType);
foreach ($rows as $columns) {
foreach ($columns as $column) {
Expand All @@ -93,9 +95,15 @@ public function getContentDefenderConfiguration(string $cType, int $colPos): arr
$contentDefenderConfiguration['disallowed.'] = $column['disallowed'] ?? [];
$contentDefenderConfiguration['maxitems'] = $column['maxitems'] ?? 0;
if ($contentDefenderConfiguration['allowedContentTypes'] === '' && $contentDefenderConfiguration['allowed.'] !== []) {
if ($typo3Version > 13) {
trigger_error('use allowedContentTypes instead of allowed.CType', E_USER_DEPRECATED);
}
$contentDefenderConfiguration['allowedContentTypes'] = $contentDefenderConfiguration['allowed.']['CType'] ?? '';
}
if ($contentDefenderConfiguration['disallowedContentTypes'] === '' && $contentDefenderConfiguration['disallowed.'] !== []) {
if ($typo3Version > 13) {
trigger_error('use disallowedContentTypes instead of disallowed.CType', E_USER_DEPRECATED);
}
$contentDefenderConfiguration['disallowedContentTypes'] = $contentDefenderConfiguration['disallowed.']['CType'] ?? '';
}
return $contentDefenderConfiguration;
Expand Down
Loading