]> git.mxchange.org Git - friendica.git/commitdiff
Fix updating the thread
authorMichael <heluecht@pirati.ca>
Mon, 15 Feb 2021 11:03:22 +0000 (11:03 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 15 Feb 2021 11:03:22 +0000 (11:03 +0000)
src/Model/Item.php

index 8fc7ce1357485aac966a2faf7a064a281fd17e6c..40208e4e57f0bd7757ae3450b59a6a16169803aa 100644 (file)
@@ -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