X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FProfile.php;h=9987f86760090181156e359f3a058f1e563f3251;hb=f1d3f60499a325557be866fedd31b46093d477ae;hp=660cc5fb3d135d60870ba21116af68091119db38;hpb=ceeb2461280da39f9b008d31e587802a7faaecc7;p=friendica.git diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 660cc5fb3d..9987f86760 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -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; @@ -742,7 +742,7 @@ class Profile $magic_path = $basepath . '/magic' . '?owa=1&dest=' . $dest . '&' . $addr_request; // We have to check if the remote server does understand /magic without invoking something - $serverret = DI::httpRequest()->get($basepath . '/magic'); + $serverret = DI::httpClient()->get($basepath . '/magic'); if ($serverret->isSuccess()) { Logger::log('Doing magic auth for visitor ' . $my_url . ' to ' . $magic_path, Logger::DEBUG); System::externalRedirect($magic_path);