X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fthreads.php;h=df0f8ee1de5a24e5577be553a4871226573c312d;hb=d49325d177cf03b97df250ca3cb081421c541049;hp=3d9b656ea360c56ac3242e0b01a6685ecb25284d;hpb=7886de5c393591eaf4e05f2a496a4f40060cb262;p=friendica.git diff --git a/include/threads.php b/include/threads.php index 3d9b656ea3..df0f8ee1de 100644 --- a/include/threads.php +++ b/include/threads.php @@ -123,8 +123,19 @@ function add_shadow_thread($itemid) { function add_shadow_entry($itemid) { $items = q("SELECT * FROM `item` WHERE `id` = %d", intval($itemid)); + + if (!dbm::is_result($items)) { + return; + } + $item = $items[0]; + // Is it a toplevel post? + if ($item['id'] == $item['parent']) { + add_shadow_thread($itemid); + return; + } + // Is this a shadow entry? if ($item['uid'] == 0) return;