]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
Merge pull request #8964 from annando/contact-tabs
[friendica.git] / mod / common.php
index 7d9caf8d1e62da75e560c0a319ec7348755639e2..d4ee97c4ff7a1b37998ed2ddacd3f6e91c624b8a 100644 (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, [