X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fthreads.php;h=0320eaa018e98b28a04179f79aae2b020bbd68da;hb=6da01c1a3db29960f7c81582cb52e4254981e9cb;hp=dddcc4cdd311df4a328322fb72bbae6959d08eca;hpb=01c2eacd4624a3305c9a4a68ce3aa57f23abf11c;p=friendica.git diff --git a/include/threads.php b/include/threads.php index dddcc4cdd3..0320eaa018 100644 --- a/include/threads.php +++ b/include/threads.php @@ -66,6 +66,7 @@ function add_thread($itemid, $onlyshadow = false) { unset($item[0]['id']); $item[0]['uid'] = 0; + $item[0]['origin'] = 0; $item[0]['contact-id'] = get_contact($item[0]['author-link'], 0); $public_shadow = item_store($item[0], false, false, true); @@ -112,7 +113,7 @@ function update_thread_uri($itemuri, $uid) { function update_thread($itemid, $setmention = false) { $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, `gcontact-id`, - `deleted`, `origin`, `forum_mode`, `network` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); + `deleted`, `origin`, `forum_mode`, `network`, `rendered-html`, `rendered-hash` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); if (!$items) return; @@ -125,7 +126,7 @@ function update_thread($itemid, $setmention = false) { $sql = ""; foreach ($item AS $field => $data) - if (!in_array($field, array("guid", "title", "body"))) { + if (!in_array($field, array("guid", "title", "body", "rendered-html", "rendered-hash"))) { if ($sql != "") $sql .= ", "; @@ -142,9 +143,11 @@ function update_thread($itemid, $setmention = false) { if (!$items) return; - $result = q("UPDATE `item` SET `title` = '%s', `body` = '%s' WHERE `id` = %d", + $result = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `rendered-html` = '%s', `rendered-hash` = '%s' WHERE `id` = %d", dbesc($item["title"]), dbesc($item["body"]), + dbesc($item["rendered-html"]), + dbesc($item["rendered-hash"]), intval($items[0]["id"]) ); logger("Updating public shadow for post ".$items[0]["id"]." - guid ".$item["guid"]." Result: ".print_r($result, true), LOGGER_DEBUG);