]> git.mxchange.org Git - friendica.git/commitdiff
Don't use the "url" parameter on redir if it points to the same contact
authorMichael <heluecht@pirati.ca>
Tue, 24 Sep 2019 21:44:37 +0000 (21:44 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 24 Sep 2019 21:44:37 +0000 (21:44 +0000)
src/Model/Contact.php

index 798c9cd20929d9bc996045c90d3ff30ac9a10961..1e3d0b9154e1e537e808d46d744395e81ce9ee37 100644 (file)
@@ -1193,7 +1193,7 @@ class Contact extends BaseObject
                $sparkle = false;
                if (($contact['network'] === Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) {
                        $sparkle = true;
-                       $profile_link = System::baseUrl() . '/redir/' . $contact['id'] . '?url=' . $contact['url'];
+                       $profile_link = System::baseUrl() . '/redir/' . $contact['id'];
                } else {
                        $profile_link = $contact['url'];
                }
@@ -2744,7 +2744,7 @@ class Contact extends BaseObject
 
                $redirect = 'redir/' . $contact['id'];
 
-               if ($url != '') {
+               if (($url != '') && !Strings::compareLink($contact['url'], $url)) {
                        $redirect .= '?url=' . $url;
                }