Project

General

Profile

Actions

Task #56276

closed

Centralize check if file is an image

Added by Alexander Stehlik about 10 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Backend API
Start date:
2014-02-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Sprint Focus:

Description

Currently the check if a file is an image is done on various places in the core, always using the same code:

$isImage = GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension);

It would make sense to centralize this check and maybe optimize the performance.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Task #90305: Centralize imagefile_ext, mediafile_ext and textfile_extClosedBenni Mack2020-02-03

Actions
Actions #1

Updated by Mathias Schreiber over 9 years ago

  • Description updated (diff)
  • Status changed from New to Needs Feedback
  • Assignee set to Mathias Schreiber

Hey Alex,

do you by chance have a list at hand?

Actions #2

Updated by Alexander Opitz almost 9 years ago

  • Status changed from Needs Feedback to New
  • Assignee deleted (Mathias Schreiber)
  • Target version set to 7.5

No list needed IMHO but a target.

Actions #3

Updated by Benni Mack over 8 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #4

Updated by Riccardo De Contardi over 8 years ago

  • Target version changed from 7 LTS to Candidate for Major Version
Actions #5

Updated by Riccardo De Contardi almost 6 years ago

on latest master 9.3-dev I've searched for the string "GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']" and this is the result list:

typo3/sysext/install/Classes/Controller/EnvironmentController.php
typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/backend/Classes/Form/Element/FileInfoElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/filelist/Classes/FileFacade.php
typo3/sysext/filelist/Classes/FileList.php
Actions #6

Updated by Susanne Moog about 4 years ago

  • Is duplicate of Task #90305: Centralize imagefile_ext, mediafile_ext and textfile_ext added
Actions #7

Updated by Susanne Moog about 4 years ago

  • Status changed from New to Closed

Fixed with #90305

Actions

Also available in: Atom PDF