X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FPermissionTooltip.php;h=4e5191e5a48c3b07e7a9193a62c6931fbb2752e5;hb=e1863951986ba5be173758324a00652bc5af870c;hp=1f41584d65321e4015641a3f06a43439ac6e5f9a;hpb=6a1f7c47b3d450a0df958f7be1429dd087bdf05a;p=friendica.git
diff --git a/src/Module/PermissionTooltip.php b/src/Module/PermissionTooltip.php
index 1f41584d65..4e5191e5a4 100644
--- a/src/Module/PermissionTooltip.php
+++ b/src/Module/PermissionTooltip.php
@@ -27,7 +27,7 @@ use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\APContact;
-use Friendica\Model\Group;
+use Friendica\Model\Circle;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\Tag;
@@ -79,7 +79,7 @@ class PermissionTooltip extends \Friendica\BaseModule
throw new HttpException\NotFoundException(DI::l10n()->t('Model not found'));
}
- // Kept for backwards compatiblity
+ // Kept for backwards compatibility
Hook::callAll('lockview_content', $model);
if ($type == 'item') {
@@ -113,29 +113,29 @@ class PermissionTooltip extends \Friendica\BaseModule
exit;
}
- $allowed_users = $model['allow_cid'];
- $allowed_groups = $model['allow_gid'];
- $deny_users = $model['deny_cid'];
- $deny_groups = $model['deny_gid'];
+ $allowed_users = $model['allow_cid'];
+ $allowed_circles = $model['allow_gid'];
+ $deny_users = $model['deny_cid'];
+ $deny_circles = $model['deny_gid'];
$o = DI::l10n()->t('Visible to:') . '
';
$l = [];
- if (count($allowed_groups)) {
- $key = array_search(Group::FOLLOWERS, $allowed_groups);
+ if (count($allowed_circles)) {
+ $key = array_search(Circle::FOLLOWERS, $allowed_circles);
if ($key !== false) {
$l[] = '' . DI::l10n()->t('Followers') . '';
- unset($allowed_groups[$key]);
+ unset($allowed_circles[$key]);
}
- $key = array_search(Group::MUTUALS, $allowed_groups);
+ $key = array_search(Circle::MUTUALS, $allowed_circles);
if ($key !== false) {
$l[] = '' . DI::l10n()->t('Mutuals') . '';
- unset($allowed_groups[$key]);
+ unset($allowed_circles[$key]);
}
- foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_groups]) as $group) {
- $l[] = '' . $group['name'] . '';
+ foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_circles]) as $circle) {
+ $l[] = '' . $circle['name'] . '';
}
}
@@ -143,21 +143,21 @@ class PermissionTooltip extends \Friendica\BaseModule
$l[] = $contact['name'];
}
- if (count($deny_groups)) {
- $key = array_search(Group::FOLLOWERS, $deny_groups);
+ if (count($deny_circles)) {
+ $key = array_search(Circle::FOLLOWERS, $deny_circles);
if ($key !== false) {
$l[] = '' . DI::l10n()->t('Followers') . '';
- unset($deny_groups[$key]);
+ unset($deny_circles[$key]);
}
- $key = array_search(Group::MUTUALS, $deny_groups);
+ $key = array_search(Circle::MUTUALS, $deny_circles);
if ($key !== false) {
$l[] = '' . DI::l10n()->t('Mutuals') . '';
- unset($deny_groups[$key]);
+ unset($deny_circles[$key]);
}
- foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_groups]) as $group) {
- $l[] = '' . $group['name'] . '';
+ foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_circles]) as $circle) {
+ $l[] = '' . $circle['name'] . '';
}
}
@@ -190,7 +190,7 @@ class PermissionTooltip extends \Friendica\BaseModule
}
$receivers = [];
- foreach (Tag::getByURIId($uriId, [Tag::TO, Tag::CC, Tag::BCC]) as $receiver) {
+ foreach (Tag::getByURIId($uriId, [Tag::TO, Tag::CC, Tag::BCC, Tag::AUDIENCE, Tag::ATTRIBUTED]) as $receiver) {
// We only display BCC when it contains the current user
if (($receiver['type'] == Tag::BCC) && ($receiver['url'] != $own_url)) {
continue;
@@ -236,6 +236,12 @@ class PermissionTooltip extends \Friendica\BaseModule
case Tag::BCC:
$output .= DI::l10n()->t('BCC: %s
', implode(', ', $receiver));
break;
+ case Tag::AUDIENCE:
+ $output .= DI::l10n()->t('Audience: %s
', implode(', ', $receiver));
+ break;
+ case Tag::ATTRIBUTED:
+ $output .= DI::l10n()->t('Attributed To: %s
', implode(', ', $receiver));
+ break;
}
}