From 33d2a852c99bc1c230abeed7d3be1bb0f4c89212 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 20 May 2021 10:14:49 +0000 Subject: make sure to set the correct item_private state --- include/items.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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; -- cgit v1.2.3