Project

General

Profile

Actions

Task #105908

open

Simplify TCA file extension preparation from placeholders

Added by Mathias Brodala 5 days ago. Updated 5 days ago.

Status:
Under Review
Priority:
Should have
Category:
FormEngine aka TCEforms
Target version:
Start date:
2025-01-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #98479: New TCA type "file"ClosedOliver Bartsch2022-09-30

Actions
Actions #1

Updated by Mathias Brodala 5 days ago

Actions #2

Updated by Gerrit Code Review 5 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87686

Actions #3

Updated by Gerrit Code Review 5 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87686

Actions

Also available in: Atom PDF