X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact.php;h=e8c9d2241a43a0577c7da637cbcb7dfa20a2c9a9;hb=5298cd73b3a798fcf2cc0a1a41139839d3dbe63d;hp=9ed25017718cd148eacd2504d5c769a811eb8e42;hpb=4a626ef10176a6f4fca0367cd890f836c2ade44a;p=friendica.git diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 9ed2501771..e8c9d2241a 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -35,6 +35,7 @@ use Friendica\DI; use Friendica\Model; use Friendica\Model\User; use Friendica\Module\Security\Login; +use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Network\HTTPException\NotFoundException; /** @@ -191,7 +192,7 @@ class Contact extends BaseModule $rel_widget = Widget::contactRels($_SERVER['REQUEST_URI'], $rel); $groups_widget = Widget::groups($_SERVER['REQUEST_URI'], $group); - DI::page()['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $account_widget . $groups_widget . $networks_widget . $rel_widget; + DI::page()['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $rel_widget . $groups_widget . $networks_widget . $account_widget; $tpl = Renderer::getMarkupTemplate('contacts-head.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ @@ -494,16 +495,18 @@ class Contact extends BaseModule * * @param array $contact Contact array * @return array Template fields + * @throws InternalServerErrorException + * @throws \ImagickException */ - public static function getContactTemplateVars(array $contact) + public static function getContactTemplateVars(array $contact): array { $alt_text = ''; if (!empty($contact['url']) && isset($contact['uid']) && ($contact['uid'] == 0) && DI::userSession()->getLocalUserId()) { $personal = Model\Contact::getByURL($contact['url'], false, ['uid', 'rel', 'self'], DI::userSession()->getLocalUserId()); if (!empty($personal)) { - $contact['uid'] = $personal['uid']; - $contact['rel'] = $personal['rel']; + $contact['uid'] = $personal['uid']; + $contact['rel'] = $personal['rel']; $contact['self'] = $personal['self']; } } @@ -545,15 +548,15 @@ class Contact extends BaseModule if ($contact['self']) { $alt_text = DI::l10n()->t('This is you'); - $url = $contact['url']; - $sparkle = ''; + $url = $contact['url']; + $sparkle = ''; } return [ 'id' => $contact['id'], 'url' => $url, 'img_hover' => DI::l10n()->t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']), - 'photo_menu' => Model\Contact::photoMenu($contact), + 'photo_menu' => Model\Contact::photoMenu($contact, DI::userSession()->getLocalUserId()), 'thumb' => Model\Contact::getThumb($contact, true), 'alt_text' => $alt_text, 'name' => $contact['name'],