Review main Merged

36674[BUGFIX] Implement check against File type restriction in Extractors

Fabien Udriot CR +2 V +2 Normal +135 −1 updated 04/18/16, 09:25

Commit message

The Metadata Extractor interface provides the possibility to limit
the scope of the extraction to only certain file types, e.g. text, image,
video, audio, application. This can be defined in every Extactor
in method ExtractorInterface::getFileTypeRestrictions()

However, this check is not implemented in the Indexer and defining
any value as File type restriction will have no effect currently.
This patch fixes the situation.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Daniel Goerz +1
    • Morton Jonuschat +1
  • Verified V +2
    • Wouter Wolters +2
    • Morton Jonuschat +1

Issues 1

Files 2

Review log 14

  1. Fabien Udriot uploaded patch set 1 02/05/15, 17:32

  2. Frans Saris commented on patch set 1 02/06/15, 20:06

    Can/should the check not be part of the canProcess().
  3. Fabien Udriot commented on patch set 1 02/07/15, 15:16

    You mean the "canProcess" in the extractor itself? My understanding is / was that ExtractorInterface::getFileTypeRestrictions() returns a kind of filter of file type. Checkout the interface: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Resource/Index/ExtractorInterface.php#L30
  4. Frans Saris commented on patch set 1 CR -1 02/27/15, 07:25

    Indexer.php:133

    It think this should be renamed to something like: extractorCanHandleFileType Function should also return TRUE if the extractor can handle the filetype
  5. Morton Jonuschat uploaded patch set 2 11/13/15, 13:01

  6. Morton Jonuschat voted on patch set 2 CR +1 V +1 11/13/15, 14:46

  7. Wouter Wolters uploaded patch set 3 11/13/15, 18:57

  8. Wouter Wolters commented on patch set 3 CR +1 V +1 11/13/15, 18:58

    Verified by unit tests
  9. Morton Jonuschat voted on patch set 3 CR +1 V +1 11/13/15, 19:04

  10. Daniel Goerz voted on patch set 3 CR +1 11/13/15, 19:10

  11. Wouter Wolters voted on patch set 3 CR +2 V +2 11/13/15, 19:28

  12. Gerrit merged patch set 3 11/13/15, 19:28

  13. Stephan Großberndt commented on patch set 4 12/16/15, 19:23

    Is there a reason why this has Releases: 6.2 but no backport?
  14. Stephan Großberndt commented on patch set 4 04/18/16, 09:25

    As discussed with Frans this patch will not be backported to 6.2