1
0
Fork 0

Ensure contact tabs will use the correct id

This commit is contained in:
Michael 2020-08-02 13:34:49 +00:00
commit 91c360638a
5 changed files with 95 additions and 34 deletions

View file

@ -117,14 +117,6 @@ function common_content(App $a)
return $o;
}
$entries = [];
foreach ($common_friends as $common_friend) {
$contact = Model\Contact::getByURLForUser($common_friend['url'], local_user());
if (!empty($contact)) {
$entries[] = Module\Contact::getContactTemplateVars($contact);
}
}
$title = '';
$tab_str = '';
if ($cmd === 'loc' && $cid && local_user() == $uid) {
@ -133,6 +125,14 @@ function common_content(App $a)
$title = DI::l10n()->t('Common Friends');
}
$entries = [];
foreach ($common_friends as $common_friend) {
$contact = Model\Contact::getByURLForUser($common_friend['url'], local_user());
if (!empty($contact)) {
$entries[] = Module\Contact::getContactTemplateVars($contact);
}
}
$tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
$o .= Renderer::replaceMacros($tpl, [