1
1
Fork 0

Replace obsolete anonymity test with a slightly less obsolete one in Model\Item

- Address part of https://github.com/friendica/friendica/issues/8475#issuecomment-646457104
This commit is contained in:
Hypolite Petovan 2020-06-19 07:05:58 -04:00
parent 87f2efff4b
commit aafef02789

View file

@ -3490,9 +3490,7 @@ class Item
*/ */
public static function getPlink($item) public static function getPlink($item)
{ {
$a = DI::app(); if (local_user()) {
if ($a->user['nickname'] != "") {
$ret = [ $ret = [
'href' => "display/" . $item['guid'], 'href' => "display/" . $item['guid'],
'orig' => "display/" . $item['guid'], 'orig' => "display/" . $item['guid'],
@ -3504,7 +3502,6 @@ class Item
$ret["href"] = DI::baseUrl()->remove($item['plink']); $ret["href"] = DI::baseUrl()->remove($item['plink']);
$ret["title"] = DI::l10n()->t('link to source'); $ret["title"] = DI::l10n()->t('link to source');
} }
} elseif (!empty($item['plink']) && ($item['private'] != self::PRIVATE)) { } elseif (!empty($item['plink']) && ($item['private'] != self::PRIVATE)) {
$ret = [ $ret = [
'href' => $item['plink'], 'href' => $item['plink'],