]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget/ContactBlock.php
Move /viewcontacts to /profile/{nickname}/contacts[/{type}]
[friendica.git] / src / Content / Widget / ContactBlock.php
index fdc7a470f7e468a52ded3f42468ed6c4f5fe9553..bc33b9c9c928672a24de0d9712bf0a52562a0c73 100644 (file)
@@ -26,7 +26,7 @@ class ContactBlock
        /**
         * Get HTML for contact block
         *
-        * @template contact_block.tpl
+        * @template widget/contacts.tpl
         * @hook contact_block_end (contacts=>array, output=>string)
         * @return string
         */
@@ -52,7 +52,7 @@ class ContactBlock
                        'pending' => false,
                        'hidden' => false,
                        'archive' => false,
-                       'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA],
+                       'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::FEED],
                ]);
 
                $contacts_title = L10n::t('No contacts');
@@ -62,9 +62,9 @@ class ContactBlock
                if ($total) {
                        // Only show followed for personal accounts, followers for pages
                        if (defaults($profile, 'account-type', User::ACCOUNT_TYPE_PERSON) == User::ACCOUNT_TYPE_PERSON) {
-                               $rel = [Contact::FOLLOWER, Contact::FRIEND];
-                       } else {
                                $rel = [Contact::SHARING, Contact::FRIEND];
+                       } else {
+                               $rel = [Contact::FOLLOWER, Contact::FRIEND];
                        }
 
                        $contact_ids_stmt = DBA::select('contact', ['id'], [
@@ -102,7 +102,7 @@ class ContactBlock
                        DBA::close($contact_ids_stmt);
                }
 
-               $tpl = Renderer::getMarkupTemplate('contact_block.tpl');
+               $tpl = Renderer::getMarkupTemplate('widget/contacts.tpl');
                $o = Renderer::replaceMacros($tpl, [
                        '$contacts' => $contacts_title,
                        '$nickname' => $profile['nickname'],