From: Hypolite Petovan Date: Thu, 1 Mar 2018 20:53:10 +0000 (-0500) Subject: Merge pull request #4523 from annando/invitation-code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e54a7e7834641eef07363027a83edfdd348ab502;hp=12f3a5ffad4fae3b205ec0e7ae1feda8a26d244b;p=friendica.git Merge pull request #4523 from annando/invitation-code "Invitation ID" is now "invitation code" to unify the description --- diff --git a/mod/network.php b/mod/network.php index 5ec97dbe99..c2cb8e03fc 100644 --- a/mod/network.php +++ b/mod/network.php @@ -345,7 +345,7 @@ function networkConversation($a, $items, $mode, $update, $ordering = '') // Set this so that the conversation function can find out contact info for our wall-wall items $a->page_contact = $a->contact; - $o = conversation($a, $items, $mode, $update, $ordering); + $o = conversation($a, $items, $mode, $update, false, $ordering); if (!$update) { if (PConfig::get(local_user(), 'system', 'infinite_scroll')) { @@ -689,9 +689,6 @@ function networkThreadedView(App $a, $update, $parent) dbesc(DateTimeFormat::convert($datequery2, 'UTC', date_default_timezone_get())))); } - $sql_order = ''; - $order_mode = 'received'; - if ($conv) { $sql_extra3 .= " AND $sql_table.`mention`"; } @@ -699,14 +696,10 @@ function networkThreadedView(App $a, $update, $parent) // Normal conversation view if ($order === 'post') { $ordering = '`created`'; - if ($sql_order == '') { - $order_mode = 'created'; - } + $order_mode = 'created'; } else { $ordering = '`commented`'; - if ($sql_order == '') { - $order_mode = 'commented'; - } + $order_mode = 'commented'; } if ($sql_order == '') { diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index b8eceb05bc..fe6fad66b0 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -242,7 +242,8 @@ class Delivery { } if ($normal_mode) { - if ($item_id == $item['id'] || $item['id'] == $item['parent']) { + // Only add the parent when we don't delete other items. + if ($item_id == $item['id'] || (($item['id'] == $item['parent']) && ($cmd != 'drop'))) { $item["entry:comment-allow"] = true; $item["entry:cid"] = (($top_level) ? $contact['id'] : 0); $msgitems[] = $item;