]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget.php
Some more avatar function replacements
[friendica.git] / src / Content / Widget.php
index 8c72f68f4c5c651bd016a17e0caae8587a86568c..e8e70c0e11cf097fee20a05757e92f4e75674be2 100644 (file)
@@ -34,7 +34,6 @@ use Friendica\Model\Group;
 use Friendica\Model\Item;
 use Friendica\Model\Profile;
 use Friendica\Util\DateTimeFormat;
-use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Strings;
 use Friendica\Util\Temporal;
 
@@ -269,10 +268,6 @@ class Widget
                        return '';
                }
 
-               if (!Feature::isEnabled(local_user(), 'networks')) {
-                       return '';
-               }
-
                $extra_sql = self::unavailableNetworks();
 
                $r = DBA::p("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = ? AND NOT `deleted` AND `network` != '' $extra_sql ORDER BY `network`",
@@ -436,10 +431,11 @@ class Widget
 
                $entries = [];
                foreach ($r as $rr) {
+                       $contact = Contact::getByURL($rr['url']);
                        $entry = [
                                'url'   => Contact::magicLink($rr['url']),
-                               'name'  => $rr['name'],
-                               'photo' => ProxyUtils::proxifyUrl($rr['photo'], false, ProxyUtils::SIZE_THUMB),
+                               'name'  => $contact['name'] ?? $rr['name'],
+                               'photo' => Contact::getThumb($contact, $rr['photo']),
                        ];
                        $entries[] = $entry;
                }
@@ -475,7 +471,7 @@ class Widget
                }
 
                if (Feature::isEnabled($uid, 'tagadelic')) {
-                       $owner_id = Contact::getIdForURL($a->profile['url'], 0, true);
+                       $owner_id = Contact::getIdForURL($a->profile['url'], 0, false);
 
                        if (!$owner_id) {
                                return '';
@@ -497,10 +493,6 @@ class Widget
        {
                $o = '';
 
-               if (!Feature::isEnabled($uid, 'archives')) {
-                       return $o;
-               }
-
                $visible_years = DI::pConfig()->get($uid, 'system', 'archive_visible_years', 5);
 
                /* arrange the list in years */