[BUGFIX] Deleted flag is not updated during file indexing 60/22660/3
authorOliver Hader <oliver@typo3.org>
Mon, 29 Jul 2013 14:31:44 +0000 (16:31 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 30 Jul 2013 06:00:53 +0000 (08:00 +0200)
If sys_file records (file objects) have set the deleted flag, it
won't be removed once the file is physically available again
with the same file name (identifier).

Change-Id: Id6dc7466764ac3994606204edadc9c2a7d2106c8
Fixes: #50525
Releases: 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/22660
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/core/Classes/Resource/Service/IndexerService.php

index 29604f0..4b69b1e 100644 (file)
@@ -97,6 +97,7 @@ class IndexerService implements \TYPO3\CMS\Core\SingletonInterface {
                // If the file is already indexed, then the file information will
                // be updated on the existing record
                if ($fileObject->isIndexed()) {
+                       $fileInfo['deleted'] = 0;
                        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_file', sprintf('uid = %d', $fileObject->getUid()), $fileInfo);
                } else {
                        // Check if a file has been moved outside of FAL -- we have some