[BUGFIX] Deleted flag is not updated during file indexing 95/22695/2
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:03:06 +0000 (08:03 +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/22695
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/core/Classes/Resource/Service/IndexerService.php

index 2b4302a..77027ec 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