[BUGFIX] deleteRecord_flexFormCallBack deletes file_references 39/16239/11
authorLorenz Ulrich <lorenz.ulrich@visol.ch>
Tue, 6 Nov 2012 15:22:46 +0000 (16:22 +0100)
committerBenjamin Mack <benni@typo3.org>
Wed, 31 Dec 2014 10:47:12 +0000 (11:47 +0100)
commitfd7027708028a8da03e11ea26c20c4a2293ef840
treeadbdb5e85f6fe62ca3975ba4d00ef9256b445221
parentc521f3b578f7e1ddce3043ed84ee2caafefbb060
[BUGFIX] deleteRecord_flexFormCallBack deletes file_references

Files that are referenced in a flexform
<type>group</type><internal_type>file_reference</internal_type>
will be deleted by deleteRecord_flexFormCallBack() in
t3lib_TCEmain, independent of the path or usage by other records.

For normal record fields (e.g. tt_content.images), only file
with the internal_type "file" are deleted. Files of
internal_type "file_reference" are respected and will not be
deleted. There is an appropriate condition in
t3lib_TCEmain::extFileFunctions().

But for flexform fields, this differentiation in handling
between both internal_types is missing.

Therefore using lowlevel_cleaner or the delete option in the
recycler will delete files that may be still in use. The
flexFormCallBack must be changed to delete only files of
internal_type "file".

Change-Id: I8519705f2155bf0d49ae10316c6622f670189e28
Fixes: #40052
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/16239
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php