use Friendica\DI;
use Friendica\Model\APContact;
use Friendica\Model\Group;
+use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Model\User;
throw new HTTPException\BadRequestException(DI::l10n()->t('Wrong type "%s", expected one of: %s', $type, implode(', ', $expectedTypes)));
}
- $condition = ['id' => $referenceId];
+ $condition = ['id' => $referenceId, 'uid' => [0, local_user()]];
if ($type == 'item') {
$fields = ['uid', 'psid', 'private', 'uri-id'];
$model = Post::selectFirst($fields, $condition);
if ($type == 'item') {
$receivers = $this->fetchReceivers($model['uri-id']);
+ if (empty($receivers)) {
+ switch ($model['private']) {
+ case Item::PUBLIC:
+ $receivers = DI::l10n()->t('Public');
+ break;
+
+ case Item::UNLISTED:
+ $receivers = DI::l10n()->t('Unlisted');
+ break;
+
+ case Item::PRIVATE:
+ $receivers = DI::l10n()->t('Limited/Private');
+ break;
+ }
+ }
} else {
$receivers = '';
}
- if ($model['uid'] != local_user() ||
- empty($model['allow_cid'])
+ if (empty($model['allow_cid'])
&& empty($model['allow_gid'])
&& empty($model['deny_cid'])
&& empty($model['deny_gid'])
msgstr ""
"Project-Id-Version: 2022.05-dev\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-03-06 11:22+0000\n"
+"POT-Creation-Date: 2022-03-10 07:35+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Friend Suggestions"
msgstr ""
-#: mod/tagger.php:78 src/Content/Item.php:338 src/Model/Item.php:2670
+#: mod/tagger.php:78 src/Content/Item.php:338 src/Model/Item.php:2677
msgid "photo"
msgstr ""
msgstr ""
#: src/BaseModule.php:409 src/Content/Widget.php:231 src/Core/ACL.php:194
-#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:106
-#: src/Module/PermissionTooltip.php:128
+#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:121
+#: src/Module/PermissionTooltip.php:143
msgid "Followers"
msgstr ""
msgid "%1$s poked %2$s"
msgstr ""
-#: src/Content/Item.php:330 src/Model/Item.php:2668
+#: src/Content/Item.php:330 src/Model/Item.php:2675
msgid "event"
msgstr ""
"<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
msgstr ""
-#: src/Content/Text/BBCode.php:1185 src/Model/Item.php:3199
-#: src/Model/Item.php:3205 src/Model/Item.php:3206
+#: src/Content/Text/BBCode.php:1185 src/Model/Item.php:3206
+#: src/Model/Item.php:3212 src/Model/Item.php:3213
msgid "Link to source"
msgstr ""
msgid "Yourself"
msgstr ""
-#: src/Core/ACL.php:201 src/Module/PermissionTooltip.php:112
-#: src/Module/PermissionTooltip.php:134
+#: src/Core/ACL.php:201 src/Module/PermissionTooltip.php:127
+#: src/Module/PermissionTooltip.php:149
msgid "Mutuals"
msgstr ""
msgid "Post to Email"
msgstr ""
-#: src/Core/ACL.php:320 src/Module/PermissionTooltip.php:181
+#: src/Core/ACL.php:320 src/Module/PermissionTooltip.php:84
+#: src/Module/PermissionTooltip.php:196
msgid "Public"
msgstr ""
"community pages and by anyone with its link."
msgstr ""
-#: src/Core/ACL.php:322
+#: src/Core/ACL.php:322 src/Module/PermissionTooltip.php:92
msgid "Limited/Private"
msgstr ""
msgid "Edit groups"
msgstr ""
-#: src/Model/Item.php:1764
+#: src/Model/Item.php:1771
#, php-format
msgid "Detected languages in this post:\\n%s"
msgstr ""
-#: src/Model/Item.php:2672
+#: src/Model/Item.php:2679
msgid "activity"
msgstr ""
-#: src/Model/Item.php:2674
+#: src/Model/Item.php:2681
msgid "comment"
msgstr ""
-#: src/Model/Item.php:2677
+#: src/Model/Item.php:2684
msgid "post"
msgstr ""
-#: src/Model/Item.php:2814
+#: src/Model/Item.php:2821
#, php-format
msgid "Content warning: %s"
msgstr ""
-#: src/Model/Item.php:3164
+#: src/Model/Item.php:3171
msgid "bytes"
msgstr ""
-#: src/Model/Item.php:3193 src/Model/Item.php:3194
+#: src/Model/Item.php:3200 src/Model/Item.php:3201
msgid "View on separate page"
msgstr ""
msgid "Unsupported or missing grant type"
msgstr ""
-#: src/Module/PermissionTooltip.php:47
+#: src/Module/PermissionTooltip.php:48
#, php-format
msgid "Wrong type \"%s\", expected one of: %s"
msgstr ""
-#: src/Module/PermissionTooltip.php:64
+#: src/Module/PermissionTooltip.php:65
msgid "Model not found"
msgstr ""
-#: src/Module/PermissionTooltip.php:91
+#: src/Module/PermissionTooltip.php:88
+msgid "Unlisted"
+msgstr ""
+
+#: src/Module/PermissionTooltip.php:106
msgid "Remote privacy information not available."
msgstr ""
-#: src/Module/PermissionTooltip.php:100
+#: src/Module/PermissionTooltip.php:115
msgid "Visible to:"
msgstr ""
-#: src/Module/PermissionTooltip.php:185
+#: src/Module/PermissionTooltip.php:200
#, php-format
msgid "Followers (%s)"
msgstr ""
-#: src/Module/PermissionTooltip.php:201
+#: src/Module/PermissionTooltip.php:216
#, php-format
msgid "%d more"
msgstr ""
-#: src/Module/PermissionTooltip.php:205
+#: src/Module/PermissionTooltip.php:220
#, php-format
msgid "<b>To:</b> %s<br>"
msgstr ""
-#: src/Module/PermissionTooltip.php:208
+#: src/Module/PermissionTooltip.php:223
#, php-format
msgid "<b>CC:</b> %s<br>"
msgstr ""
-#: src/Module/PermissionTooltip.php:211
+#: src/Module/PermissionTooltip.php:226
#, php-format
msgid "<b>BCC:</b> %s<br>"
msgstr ""