]> git.mxchange.org Git - friendica.git/commitdiff
Update display cache when the post had been edited
authorMichael <heluecht@pirati.ca>
Wed, 4 May 2022 07:50:14 +0000 (07:50 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 4 May 2022 07:50:14 +0000 (07:50 +0000)
mod/item.php

index 498cf27132a5a70bf5c1ed4f44f58dc1ad2e5bf3..34475188ea61cb27d826722efdc6096a6cb4ff13 100644 (file)
@@ -666,21 +666,16 @@ function item_post(App $a) {
        $datarray['uri-id'] = ItemURI::getIdByURI($datarray['uri']);
 
        if ($orig_post) {
-               // Fill the cache field
-               // This could be done in Item::update as well - but we have to check for the existance of some fields.
-               Item::putInCache($datarray);
-
                $fields = [
                        'title' => $datarray['title'],
                        'body' => $datarray['body'],
                        'attach' => $datarray['attach'],
                        'file' => $datarray['file'],
-                       'rendered-html' => $datarray['rendered-html'],
-                       'rendered-hash' => $datarray['rendered-hash'],
                        'edited' => DateTimeFormat::utcNow(),
                        'changed' => DateTimeFormat::utcNow()];
 
                Item::update($fields, ['id' => $post_id]);
+               Item::updateDisplayCache($datarray['uri-id']);
 
                if ($return_path) {
                        DI::baseUrl()->redirect($return_path);