]> git.mxchange.org Git - friendica.git/commitdiff
Fix display of Connect/Disconnect links on contact page
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 23 Nov 2018 16:09:43 +0000 (11:09 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 23 Nov 2018 16:09:43 +0000 (11:09 -0500)
src/Module/Contact.php

index 80e9c73b63b7528021c6771448dea494077d402f..ec7e896925cc39c9c9c3cf05d65dfc468ec9b291 100644 (file)
@@ -570,12 +570,12 @@ class Contact extends BaseModule
                        /// @todo Only show the following link with DFRN when the remote version supports it
                        $follow = '';
                        $follow_text = '';
-                       if (in_array($contact['rel'], [Model\Contact::FRIEND, Model\Contact::SHARING])) {
+                       if ($contact['uid'] && in_array($contact['rel'], [Model\Contact::FRIEND, Model\Contact::SHARING])) {
                                if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
                                        $follow = $a->getBaseURL(true) . '/unfollow?url=' . urlencode($contact['url']);
                                        $follow_text = L10n::t('Disconnect/Unfollow');
                                }
-                       } else {
+                       } elseif(!$contact['pending']) {
                                $follow = $a->getBaseURL(true) . '/follow?url=' . urlencode($contact['url']);
                                $follow_text = L10n::t('Connect/Follow');
                        }