diff options
author | Mario <mario@mariovavti.com> | 2023-01-13 20:01:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-01-13 20:01:05 +0000 |
commit | 2805520d1bcb2640fc079d54f5f230f7b87d1f84 (patch) | |
tree | 43b3e5bb7c71522d04560015478765a7b763a5fe /include/conversation.php | |
parent | f6d940606350eb8685c278af6d87f3a0b8c0f5e5 (diff) | |
parent | fb7ca18820e7618325dded78a3c3a464dd01b391 (diff) | |
download | volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.gz volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.bz2 volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.zip |
Merge remote-tracking branch 'origin/8.0RC'8.0
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/include/conversation.php b/include/conversation.php index 46621a243..caad5bb0e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -675,7 +675,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa if($items) { - if(in_array($mode, [ 'network-new', 'search', 'community', 'moderate' ])) { + if(is_unthreaded($mode)) { // "New Item View" on network page or search page results // - just loop through the items and format them minimally for display @@ -772,14 +772,17 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) $is_new = true; - $conv_link_mid = (($mode == 'moderate') ? $item['parent_mid'] : $item['mid']); + $conv_link_mid = (($mode == 'moderate') ? gen_link_id($item['parent_mid']) : gen_link_id($item['mid'])); + + $conv_link = z_root() . '/display/' . $conv_link_mid; - $conv_link_module = 'display'; if(local_channel()) { - $conv_link_module = 'hq'; + $conv_link = z_root() . '/hq/' . $conv_link_mid; } - $conv_link = z_root() . '/' . $conv_link_module . '/' . gen_link_id($conv_link_mid); + if ($mode === 'pubstream-new') { + $conv_link = z_root() . '/pubstream?mid=' . $conv_link_mid; + } $contact = []; @@ -996,7 +999,7 @@ function thread_action_menu($item,$mode = '') { 'href' => '#' ]; - if(! in_array($mode, [ 'network-new', 'search', 'community'])) { + if(!is_unthreaded($mode)) { if($item['parent'] == $item['id'] && (get_observer_hash() != $item['author_xchan'])) { $menu[] = [ 'menu' => 'follow_thread', @@ -1784,3 +1787,13 @@ function get_response_button_text($v,$count) { break; } } + +function is_unthreaded($mode) { + return in_array($mode, [ + 'network-new', + 'pubstream-new', + 'search', + 'community', + 'moderate' + ]); +} |