X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact%2FContacts.php;h=92235e85477e2240bf3fa82c0eaebb906bdc6ce4;hb=79235b6db1c9badd6c9602d54ad0d550e4bec2fd;hp=1e3e582c0e55a1355303d0bb0a3d73239cc61f5c;hpb=714f0febc4918f5569eb09f8800b6739cff36347;p=friendica.git diff --git a/src/Module/Contact/Contacts.php b/src/Module/Contact/Contacts.php index 1e3e582c0e..92235e8547 100644 --- a/src/Module/Contact/Contacts.php +++ b/src/Module/Contact/Contacts.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Module\Contact; @@ -14,16 +33,14 @@ use Friendica\Network\HTTPException; class Contacts extends BaseModule { - public static function content() + protected function content(array $request = []): string { - $app = DI::app(); - - if (!local_user()) { + if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\ForbiddenException(); } - $cid = static::$parameters['id']; - $type = static::$parameters['type'] ?? 'all'; + $cid = $this->parameters['id']; + $type = $this->parameters['type'] ?? 'all'; $accounttype = $_GET['accounttype'] ?? ''; $accounttypeid = User::getAccountTypeByString($accounttype); @@ -36,7 +53,7 @@ class Contacts extends BaseModule throw new HTTPException\NotFoundException(DI::l10n()->t('Contact not found.')); } - $localContactId = Model\Contact::getPublicIdByUserId(local_user()); + $localContactId = Model\Contact::getPublicIdByUserId(DI::userSession()->getLocalUserId()); DI::page()['aside'] = Widget\VCard::getHTML($contact); @@ -122,7 +139,7 @@ class Contacts extends BaseModule '$paginate' => $pager->renderFull($total), ]); - DI::page()['aside'] .= Widget::accounttypes($_SERVER['REQUEST_URI'], $accounttype); + DI::page()['aside'] .= Widget::accountTypes($_SERVER['REQUEST_URI'], $accounttype); return $o; }