- $allowed_users = expand_acl($item['allow_cid']);
- $allowed_groups = expand_acl($item['allow_gid']);
- $deny_users = expand_acl($item['deny_cid']);
- $deny_groups = expand_acl($item['deny_gid']);
+ if (isset($item['private'])
+ && $item['private'] == 1
+ && empty($item['allow_cid'])
+ && empty($item['allow_gid'])
+ && empty($item['deny_cid'])
+ && empty($item['deny_gid']))
+ {
+ echo DI::l10n()->t('Remote privacy information not available.') . '<br />';
+ exit();
+ }
+
+ $aclFormatter = DI::aclFormatter();
+
+ $allowed_users = $aclFormatter->expand($item['allow_cid']);
+ $allowed_groups = $aclFormatter->expand($item['allow_gid']);
+ $deny_users = $aclFormatter->expand($item['deny_cid']);
+ $deny_groups = $aclFormatter->expand($item['deny_gid']);
+
+ $o = DI::l10n()->t('Visible to:') . '<br />';
+ $l = [];
+
+ if (count($allowed_groups)) {
+ $key = array_search(Group::FOLLOWERS, $allowed_groups);
+ if ($key !== false) {
+ $l[] = '<b>' . DI::l10n()->t('Followers') . '</b>';
+ unset($allowed_groups[$key]);
+ }
+
+ $key = array_search(Group::MUTUALS, $allowed_groups);
+ if ($key !== false) {
+ $l[] = '<b>' . DI::l10n()->t('Mutuals') . '</b>';
+ unset($allowed_groups[$key]);
+ }