[BUGFIX] Ignore deleted references when deleting a file 87/52387/2
authorFrans Saris <franssaris@gmail.com>
Fri, 7 Apr 2017 14:16:34 +0000 (16:16 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 7 Apr 2017 18:34:27 +0000 (20:34 +0200)
With the doctrine migration the check for deleted=0 was forgotten.

This patch brings this check back and now files with deleted references
can be deleted again.

Resolves: #80692
Releases: master
Change-Id: Ie7c8103a7c6ee308b57576777e26b961a4f6c644
Reviewed-on: https://review.typo3.org/52387
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
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 000969a..c1ead46 100644 (file)
@@ -411,6 +411,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()