[BUGFIX] Prevent folder deletion with referenced files 77/36577/2
authorArmin Ruediger Vieweg <armin@v.ieweg.de>
Fri, 30 Jan 2015 11:57:34 +0000 (12:57 +0100)
committerNicole Cordes <typo3@cordes.co>
Mon, 2 Feb 2015 18:50:57 +0000 (19:50 +0100)
commitff736366060f04657dff1cc82ce86de8fe85085f
treebce8d123041112b896a6833f6bf570cb77fc272d
parent384277a467f3e266732e6bc1c59dffe351f05e31
[BUGFIX] Prevent folder deletion with referenced files

Currently a folder can be deleted without any check if included files
are still in use anywhere within the website. This can lead to lost
files and can be harmful for the user. The patch adds a test if files
within a folder, which should be deleted, are still referenced and
prevents deleting it if files where found. The user is notified with a
warning shown above the file list.

Resolves: #48893
Releases: master, 6.2
Change-Id: If1c79d86e1f6c7a32a6a3e94e639951f882302d7
Reviewed-on: http://review.typo3.org/36577
Reviewed-by: Armin Ruediger Vieweg <armin@v.ieweg.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Tests/Unit/Utility/File/ExtendedFileUtilityTest.php [new file with mode: 0644]
typo3/sysext/lang/locallang_core.xlf