From d3ade901297fd580dcc3a8473e44985303fbd39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 27 Jul 2023 20:37:02 +0200 Subject: [PATCH] fix: Only set last modified if not already set manually MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Db/LabelMapper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Db/LabelMapper.php b/lib/Db/LabelMapper.php index aeccef539..66fcfa0dd 100644 --- a/lib/Db/LabelMapper.php +++ b/lib/Db/LabelMapper.php @@ -115,7 +115,9 @@ class LabelMapper extends DeckMapper implements IPermissionMapper { } public function insert(Entity $entity): Entity { - $entity->setLastModified(time()); + if (!in_array('lastModified', $entity->getUpdatedFields())) { + $entity->setLastModified(time()); + } return parent::insert($entity); }