From 0beec80405c13fe46c6e0da36d783f5d524c88b0 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 15 Feb 2021 11:03:22 +0000 Subject: [PATCH] Fix updating the thread --- src/Model/Item.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 8fc7ce1357..40208e4e57 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1062,11 +1062,13 @@ class Item } if ($update_commented) { - Post::update(['commented' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()], ['id' => $post_user_id]); + $fields = ['commented' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()]; } else { - Post::update(['changed' => DateTimeFormat::utcNow()], ['uri-id' => $posted_item['parent-uri-id'], 'uid' => $posted_item['uid']]); + $fields = ['changed' => DateTimeFormat::utcNow()]; } + Post::update($fields, ['uri-id' => $posted_item['parent-uri-id'], 'uid' => $posted_item['uid']]); + // In that function we check if this is a forum post. Additionally we delete the item under certain circumstances if (self::tagDeliver($posted_item['uid'], $post_user_id)) { // Get the user information for the logging