mirror of
https://github.com/friendica/friendica
synced 2024-11-10 01:42:53 +00:00
Limit /redir links to private posts
- This allows to share public post links with anonymous users
This commit is contained in:
parent
00382dd39e
commit
6836b1ea78
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ function localize_item(&$item)
|
||||||
|
|
||||||
// add sparkle links to appropriate permalinks
|
// add sparkle links to appropriate permalinks
|
||||||
// Only create a redirection to a magic link when logged in
|
// Only create a redirection to a magic link when logged in
|
||||||
if (!empty($item['plink']) && Session::isAuthenticated()) {
|
if (!empty($item['plink']) && Session::isAuthenticated() && $item['private'] == Item::PRIVATE) {
|
||||||
$author = ['uid' => 0, 'id' => $item['author-id'],
|
$author = ['uid' => 0, 'id' => $item['author-id'],
|
||||||
'network' => $item['author-network'], 'url' => $item['author-link']];
|
'network' => $item['author-network'], 'url' => $item['author-link']];
|
||||||
$item['plink'] = Contact::magicLinkByContact($author, $item['plink']);
|
$item['plink'] = Contact::magicLinkByContact($author, $item['plink']);
|
||||||
|
|
Loading…
Reference in a new issue