return;
}
- $o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getLoggedInUserNickname(), false);
+ $o = BaseProfile::getTabsHTML('notes', true, $a->getLoggedInUserNickname(), false);
if (!$update) {
$o .= '<h3>' . DI::l10n()->t('Personal Notes') . '</h3>';
// tabs
$is_owner = (DI::userSession()->getLocalUserId() && (DI::userSession()->getLocalUserId() == $owner_uid));
- $o .= BaseProfile::getTabsHTML($a, 'photos', $is_owner, $user['nickname'], $profile['hide-friends']);
+ $o .= BaseProfile::getTabsHTML('photos', $is_owner, $user['nickname'], $profile['hide-friends']);
// Display upload form
if ($datatype === 'upload') {
/**
* Returns the HTML for the profile pages tabs
*
- * @param App $a
* @param string $current
* @param bool $is_owner
* @param string $nickname
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function getTabsHTML(App $a, string $current, bool $is_owner, string $nickname, bool $hide_friends)
+ public static function getTabsHTML(string $current, bool $is_owner, string $nickname, bool $hide_friends)
{
$baseProfileUrl = DI::baseUrl() . '/profile/' . $nickname;
$a->redirect('profile/' . $nickname . '/contacts');
};
- $o = self::getTabsHTML($a, 'contacts', false, $profile['nickname'], $profile['hide-friends']);
+ $o = self::getTabsHTML('contacts', false, $profile['nickname'], $profile['hide-friends']);
$tabs = self::getContactFilterTabs('profile/' . $nickname, 'common', $displayCommonTab);
Nav::setSelected('home');
- $o = self::getTabsHTML($a, 'contacts', $is_owner, $profile['nickname'], $profile['hide-friends']);
+ $o = self::getTabsHTML('contacts', $is_owner, $profile['nickname'], $profile['hide-friends']);
$tabs = self::getContactFilterTabs('profile/' . $nickname, $type, DI::userSession()->isAuthenticated() && $profile['uid'] != DI::userSession()->getLocalUserId());
$is_owner = DI::userSession()->getLocalUserId() == $profile['uid'];
- $o = self::getTabsHTML($a, 'media', $is_owner, $profile['nickname'], $profile['hide-friends']);
+ $o = self::getTabsHTML('media', $is_owner, $profile['nickname'], $profile['hide-friends']);
$o .= Contact::getPostsFromUrl($profile['url'], false, 0, 0, true);
throw new HttpException\ForbiddenException($this->t('Public access denied.'));
}
- $owner = User::getOwnerDataByNick($this->parameters['nickname']);
- if (!isset($owner['account_removed']) || $owner['account_removed']) {
+ $owner = Profile::load($this->app, $this->parameters['nickname'] ?? '');
+ if (!$owner || $owner['account_removed'] || $owner['account_expired']) {
throw new HTTPException\NotFoundException($this->t('User not found.'));
}
]);
}
- $this->page['aside'] .= Widget\VCard::getHTML($owner);
-
if (!empty($photo_albums_widget)) {
$this->page['aside'] .= $photo_albums_widget;
}
- $o = self::getTabsHTML($this->app, 'photos', $is_owner, $owner['nickname'], Profile::getByUID($owner['uid'])['hide-friends'] ?? false);
+ $o = self::getTabsHTML('photos', $is_owner, $owner['nickname'], Profile::getByUID($owner['uid'])['hide-friends'] ?? false);
$tpl = Renderer::getMarkupTemplate('photos_recent.tpl');
$o .= Renderer::replaceMacros($tpl, [
Nav::setSelected('home');
$is_owner = DI::userSession()->getLocalUserId() == $profile['uid'];
- $o = self::getTabsHTML($a, 'profile', $is_owner, $profile['nickname'], $profile['hide-friends']);
+ $o = self::getTabsHTML('profile', $is_owner, $profile['nickname'], $profile['hide-friends']);
$view_as_contacts = [];
$view_as_contact_id = 0;
$a = DI::app();
- $o = self::getTabsHTML($a, 'schedule', true, $a->getLoggedInUserNickname(), false);
+ $o = self::getTabsHTML('schedule', true, $a->getLoggedInUserNickname(), false);
$schedule = [];
$delayed = DBA::select('delayed-post', [], ['uid' => DI::userSession()->getLocalUserId()]);
$this->baseUrl->redirect('profile/' . $profile['nickname'] . '/restricted');
}
- $o .= self::getTabsHTML($a, 'status', $is_owner, $profile['nickname'], $profile['hide-friends']);
+ $o .= self::getTabsHTML('status', $is_owner, $profile['nickname'], $profile['hide-friends']);
$o .= Widget::commonFriendsVisitor($profile['uid'], $profile['nickname']);