Issue Task Under Review Orphaned

#105908Simplify TCA file extension preparation from placeholders

Mathias Brodala 01/10/25, 07:57 updated 01/10/25, 08:02

Description

The TCA file field supports the placeholders common-image-types, common-media-types and common-text-types as values for allowed and disallowed.

These are resolved from $GLOBALS['TYPO3_CONF_VARS'] within the TcaPreparation::prepareFileExtensions() method.

Currently this happens with with a RegEx match and inline mapping and a special case for common-image-types to use GFX instead of SYS.

This is hard to read and unnecessarily complex. Also it makes it harder to spot these magic strings and the particular $GLOBALS['TYPO3_CONF_VARS'] access in case of changes afterwards.

For these reasons, this should be simplified.

Reviews 1

History 13