Fix updating the thread

This commit is contained in:
Michael 2021-02-15 11:03:22 +00:00
parent 2b17e36a67
commit 0beec80405

View File

@ -1062,11 +1062,13 @@ class Item
} }
if ($update_commented) { if ($update_commented) {
Post::update(['commented' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()], ['id' => $post_user_id]); $fields = ['commented' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()];
} else { } 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 // 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)) { if (self::tagDeliver($posted_item['uid'], $post_user_id)) {
// Get the user information for the logging // Get the user information for the logging