From d9e88fa3c9604acb06a6801c09d07be7d6eac298 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Fri, 11 Aug 2023 14:57:11 +0400 Subject: [PATCH] Never delete original file on store new version (#6489) * Never delete original file on store new version * Never delete original file before store new version --- CHANGELOG.md | 4 ++++ protected/humhub/modules/file/models/File.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b996d33dec..527af960b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ HumHub Changelog ================ +1.14.4 (Unreleased) +---------------------- +- Fix #6489: Never delete original file on store new version + 1.14.3 (July 27, 2023) ---------------------- - Fix #6345: Fix updating of post on wall stream diff --git a/protected/humhub/modules/file/models/File.php b/protected/humhub/modules/file/models/File.php index 733821b4c8..6719850c29 100644 --- a/protected/humhub/modules/file/models/File.php +++ b/protected/humhub/modules/file/models/File.php @@ -350,7 +350,7 @@ class File extends FileCompat FileHistory::createEntryForFile($this); } - $this->store->delete(null, [FileHistory::VARIANT_PREFIX . '*']); + $this->store->delete(null, ['file', FileHistory::VARIANT_PREFIX . '*']); } /**