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
}
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', [
$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']);
$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;
}
$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;
}
$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;