$origin = $item['origin'] || $item['parent-origin'];
- if ($item['pinned']) {
+ if (!empty($item['featured'])) {
$pinned = DI::l10n()->t('Pinned item');
}
];
}
- if (!$item['self']) {
+ if (!$item['self'] && local_user()) {
$block = [
'blocking' => true,
'block' => DI::l10n()->t('Block %s', $item['author-name']),
if ($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) {
if ($origin) {
- $ispinned = ($item['pinned'] ? 'pinned' : 'unpinned');
+ $ispinned = ($item['featured'] ? 'pinned' : 'unpinned');
$pin = [
'do' => DI::l10n()->t('Pin'),
'undo' => DI::l10n()->t('Unpin'),
'toggle' => DI::l10n()->t('Toggle pin status'),
- 'classdo' => $item['pinned'] ? 'hidden' : '',
- 'classundo' => $item['pinned'] ? '' : 'hidden',
+ 'classdo' => $item['featured'] ? 'hidden' : '',
+ 'classundo' => $item['featured'] ? '' : 'hidden',
'pinned' => DI::l10n()->t('Pinned'),
];
}
$title = $item['title'];
} elseif (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
$title = ucfirst($item['content-warning']);
+ } else {
+ $title = '';
}
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
$languages = [DI::l10n()->t('Languages'), Item::getLanguageMessage($item)];
}
+ if (in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]) && in_array($item['network'], Protocol::FEDERATED)) {
+ $browsershare = [DI::l10n()->t('Share via ...'), DI::l10n()->t('Share via external services')];
+ } else {
+ $browsershare = null;
+ }
+
$tmp_item = [
'template' => $this->getTemplate(),
'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
'owner_photo' => DI::baseUrl()->remove(Contact::getAvatarUrlForUrl($item['owner-link'], $item['uid'], Proxy::SIZE_THUMB)),
'owner_name' => $this->getOwnerName(),
'plink' => Item::getPlink($item),
- 'browsershare' => DI::l10n()->t('Share'),
+ 'browsershare' => $browsershare,
'edpost' => $edpost,
'ispinned' => $ispinned,
'pin' => $pin,