]> git.mxchange.org Git - friendica.git/commitdiff
Replace obsolete anonymity test with a slightly less obsolete one in Model\Item
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 19 Jun 2020 11:05:58 +0000 (07:05 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 19 Jun 2020 11:10:27 +0000 (07:10 -0400)
- Address part of https://github.com/friendica/friendica/issues/8475#issuecomment-646457104

src/Model/Item.php

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