From 777afb45fcc2d2d74c155bbd57704f243cf106aa Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Dec 2022 23:14:45 -0500 Subject: [PATCH] Apply calendar owner custom theme --- src/Module/Calendar/Show.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Module/Calendar/Show.php b/src/Module/Calendar/Show.php index 9a3e768ecc..7834958834 100644 --- a/src/Module/Calendar/Show.php +++ b/src/Module/Calendar/Show.php @@ -31,6 +31,7 @@ use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Theme; use Friendica\Model\Event; +use Friendica\Model\Profile; use Friendica\Model\User; use Friendica\Module\BaseProfile; use Friendica\Module\Response; @@ -68,7 +69,7 @@ class Show extends BaseModule throw new HTTPException\UnauthorizedException(); } - $owner = User::getOwnerDataByNick($nickname); + $owner = Profile::load($this->app, $nickname, false); if (!$owner || $owner['account_expired'] || $owner['account_removed']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } @@ -102,8 +103,9 @@ class Show extends BaseModule Nav::setSelected($is_owner ? 'home' : 'calendar'); - if (!$is_owner) { - $this->page['aside'] .= Widget\VCard::getHTML($owner); + if ($is_owner) { + // Removing the vCard added by Profile::load for owners + $this->page['aside'] = ''; } $this->page['aside'] .= Widget\CalendarExport::getHTML($owner['uid']); -- 2.39.5