From ee99f8f27fc3c7c5744a01c6df6a3d52139afd4e Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 6 Apr 2021 19:49:44 -0700 Subject: [PATCH] issue commenting from search/display if you're the site admin --- Zotlabs/Module/Item.php | 6 ++++-- include/conversation.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 8b012f0d2..5f762889b 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -355,11 +355,13 @@ class Item extends Controller { $profile_uid = ((isset($_REQUEST['profile_uid'])) ? intval($_REQUEST['profile_uid']) : 0); - // *If* you are logged in as the site admin you are allowed to create items for the sys channel. + // *If* you are logged in as the site admin you are allowed to create top-level items for the sys channel. // This would typically be a webpage or webpage element. + // Comments and replies are excluded because further below we also check for sys channel ownership and + // will make a copy of the parent that you can interact with in your own stream $sys = get_sys_channel(); - if ($sys && $profile_uid && ($sys['channel_id'] == $profile_uid) && is_site_admin()) { + if ($sys && $profile_uid && ($sys['channel_id'] == $profile_uid) && is_site_admin() && ! $parent) { $uid = intval($sys['channel_id']); $channel = $sys; $observer = $sys; diff --git a/include/conversation.php b/include/conversation.php index ab727c4da..c773b3f84 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -498,7 +498,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa // way and also you aren't writing a comment (discovered in javascript). $live_update_div = '
' . "\r\n" - . "