]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6191 from MrPetovan/task/urlencode-file-param
authorMichael Vogel <icarus@dabo.de>
Fri, 23 Nov 2018 20:37:31 +0000 (21:37 +0100)
committerGitHub <noreply@github.com>
Fri, 23 Nov 2018 20:37:31 +0000 (21:37 +0100)
URL encode /network file query parameter

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');
                        }