diff options
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 14 | ||||
-rw-r--r-- | include/items.php | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index a19c8e544..c7d001d21 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -2924,7 +2924,19 @@ class Libzot { ]; $ret['channel_role'] = get_pconfig($e['channel_id'], 'system', 'permissions_role', 'custom'); - $ret['protocols'] = ['zot6', 'zot']; + + $hookinfo = [ + 'channel_id' => $id, + 'protocols' => ['zot6', 'zot'] + ]; + /** + * @hooks channel_protocols + * * \e int \b channel_id + * * \e array \b protocols + */ + call_hooks('channel_protocols', $hookinfo); + + $ret['protocols'] = $hookinfo['protocols']; $ret['searchable'] = $searchable; $ret['adult_content'] = $adult_channel; $ret['public_forum'] = $public_forum; diff --git a/include/items.php b/include/items.php index 29160c01d..30129b0aa 100644 --- a/include/items.php +++ b/include/items.php @@ -726,7 +726,8 @@ function get_item_elements($x,$allow_code = false) { $arr['term'] = decode_tags($x['tags']); $arr['iconfig'] = decode_item_meta($x['meta']); - $arr['item_private'] = ((array_key_exists('flags',$x) && is_array($x['flags']) && in_array('private',$x['flags'])) ? 1 : 0); + $private_state = (($x['allow_cid'] && !$x['allow_gid']) ? 2 : 1); + $arr['item_private'] = ((array_key_exists('flags',$x) && is_array($x['flags']) && in_array('private',$x['flags'])) ? $private_state : 0); $arr['item_flags'] = 0; |