[BUGFIX] sys_file record doesn't get flagged as delete 64/22064/2
authorSteffen Ritter <info@rs-websystems.de>
Sat, 6 Jul 2013 20:05:52 +0000 (22:05 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 6 Jul 2013 20:45:21 +0000 (22:45 +0200)
File is deleted by driver and deleted property of FileObject is set by
ResourceStorage but new state is not persisted.
Update deleted property in updateProperties array in FileObject and
persist change.

Reintroduced after fixing tests in 836dbc652033e118967eccc0bae2ebbde8637735.

Change-Id: I0784c84af4bfb8021c648139c2feee577f3e9dc1
Fixes: #48336
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/22064
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index a73e720..f5fe790 100644 (file)
@@ -431,6 +431,7 @@ abstract class AbstractFile implements FileInterface {
         */
        public function setDeleted() {
                $this->deleted = TRUE;
+               $this->updateProperties(array('deleted' => TRUE));
        }
 
        /**
@@ -544,4 +545,4 @@ abstract class AbstractFile implements FileInterface {
 }
 
 
-?>
\ No newline at end of file
+?>
index cd15440..29ec2b4 100644 (file)
@@ -997,6 +997,7 @@ class ResourceStorage {
                }
                // Mark the file object as deleted
                $fileObject->setDeleted();
+               $this->getFileRepository()->update($fileObject);
 
                $this->emitPostFileDeleteSignal($fileObject);