[BUGFIX] allow deletion folder with deleted references to files 79/52679/2
authorAndreas Allacher <andreas@allacher.com>
Sat, 29 Apr 2017 18:27:32 +0000 (20:27 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 2 May 2017 12:25:39 +0000 (14:25 +0200)
Filelist currently doesn't allow the deletion of a folder
with references to files that have been deleted
because with doctrine migration the check for deleted=0 was
forgotten.

This patch adds the necessary check again.

Resolves: #81087
Releases: master, 8.7
Change-Id: Ie30704b7e6f41805150f44c5e41e7f679c903756
Reviewed-on: https://review.typo3.org/52679
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php

index c1ead46..b7dd501 100644 (file)
@@ -563,6 +563,10 @@ class ExtendedFileUtility extends BasicFileUtility
                 $queryBuilder->expr()->neq(
                     'tablename',
                     $queryBuilder->createNamedParameter('sys_file_metadata', \PDO::PARAM_STR)
+                ),
+                $queryBuilder->expr()->eq(
+                    'deleted',
+                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                 )
             )->execute()->fetchColumn(0);