]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Remove "fcontact" from suggestions
[friendica.git] / src / Model / Profile.php
index a1e97d1ee464273aea874fb902eda9da976ff3f9..9987f86760090181156e359f3a058f1e563f3251 100644 (file)
@@ -41,7 +41,7 @@ use Friendica\Protocol\Diaspora;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\HTTPSignature;
 use Friendica\Util\Network;
-use Friendica\Util\Proxy as ProxyUtils;
+use Friendica\Util\Proxy;
 use Friendica\Util\Strings;
 
 class Profile
@@ -406,7 +406,7 @@ class Profile
                }
 
                if (!$block && $show_contacts) {
-                       $contact_block = ContactBlock::getHTML($profile);
+                       $contact_block = ContactBlock::getHTML($profile, local_user());
 
                        if (is_array($profile) && !$profile['hide-friends']) {
                                $contact_count = DBA::count('contact', [
@@ -441,7 +441,7 @@ class Profile
                        $p['address'] = BBCode::convertForUriId($profile['uri-id'] ?? 0, $p['address']);
                }
 
-               $p['photo'] = Contact::getAvatarUrlForId($cid, ProxyUtils::SIZE_SMALL);
+               $p['photo'] = Contact::getAvatarUrlForId($cid, Proxy::SIZE_SMALL);
 
                $p['url'] = Contact::magicLinkById($cid, $profile['url']);
 
@@ -555,7 +555,7 @@ class Profile
 
                                        $rr['link'] = Contact::magicLinkById($rr['cid']);
                                        $rr['title'] = $rr['name'];
-                                       $rr['date'] = DI::l10n()->getDay(DateTimeFormat::convert($rr['start'], $a->getTimeZone(), 'UTC', $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
+                                       $rr['date'] = DI::l10n()->getDay(DateTimeFormat::local($rr['start'], $bd_short)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
                                        $rr['startime'] = null;
                                        $rr['today'] = $today;
                                }
@@ -614,8 +614,8 @@ class Profile
                                        $total++;
                                }
 
-                               $strt = DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->getTimeZone() : 'UTC', 'UTC', 'Y-m-d');
-                               if ($strt === DateTimeFormat::timezoneNow($a->getTimeZone(), 'Y-m-d')) {
+                               $strt = DateTimeFormat::local($rr['start'], 'Y-m-d');
+                               if ($strt === DateTimeFormat::localNow('Y-m-d')) {
                                        $istoday = true;
                                }
 
@@ -630,17 +630,17 @@ class Profile
                                        $description = DI::l10n()->t('[No description]');
                                }
 
-                               $strt = DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->getTimeZone() : 'UTC');
+                               $strt = DateTimeFormat::local($rr['start']);
 
-                               if (substr($strt, 0, 10) < DateTimeFormat::timezoneNow($a->getTimeZone(), 'Y-m-d')) {
+                               if (substr($strt, 0, 10) < DateTimeFormat::localNow('Y-m-d')) {
                                        continue;
                                }
 
-                               $today = ((substr($strt, 0, 10) === DateTimeFormat::timezoneNow($a->getTimeZone(), 'Y-m-d')) ? true : false);
+                               $today = substr($strt, 0, 10) === DateTimeFormat::localNow('Y-m-d');
 
                                $rr['title'] = $title;
                                $rr['description'] = $description;
-                               $rr['date'] = DI::l10n()->getDay(DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->getTimeZone() : 'UTC', 'UTC', $bd_format)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
+                               $rr['date'] = DI::l10n()->getDay(DateTimeFormat::local($rr['start'], $bd_format)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
                                $rr['startime'] = $strt;
                                $rr['today'] = $today;