Respect the "unlisted" setting for forum posts

This commit is contained in:
Michael 2021-06-06 09:19:29 +00:00
parent 49b9505972
commit b269a2da87

View file

@ -1918,8 +1918,13 @@ class Item
$owner_id = Contact::getIdForURL($self['url']);
// also reset all the privacy bits to the forum default permissions
$private = ($user['allow_cid'] || $user['allow_gid'] || $user['deny_cid'] || $user['deny_gid']) ? self::PRIVATE : self::UNLISTED;
if ($user['allow_cid'] || $user['allow_gid'] || $user['deny_cid'] || $user['deny_gid']) {
$private = self::PRIVATE;
} elseif (DI::pConfig()->get($user['uid'], 'system', 'unlisted')) {
$private = Item::UNLISTED;
} else {
$private = Item::PUBLIC;
}
$psid = PermissionSet::getIdFromACL(
$user['uid'],