]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Merge pull request #6013 from JonnyTischbein/issue_comment_media_link_prompt
[friendica.git] / include / conversation.php
index 0362e9a4459f1d9730e13f4148b37cc6fb84660d..4a05c916ba777b6397e0c3e3127a013c65414c04 100644 (file)
@@ -353,7 +353,8 @@ function localize_item(&$item)
        $author = ['uid' => 0, 'id' => $item['author-id'],
                'network' => $item['author-network'], 'url' => $item['author-link']];
 
-       if (!empty($item['plink'])) {
+       // Only create a redirection to a magic link when logged in
+       if (!empty($item['plink']) && (local_user() || remote_user())) {
                $item['plink'] = Contact::magicLinkbyContact($author, $item['plink']);
        }
 }
@@ -533,7 +534,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
        $page_dropping = ((local_user() && local_user() == $profile_owner) ? true : false);
 
        if (!$update) {
-               $_SESSION['return_url'] = $a->query_string;
+               $_SESSION['return_path'] = $a->query_string;
        }
 
        $cb = ['items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview];
@@ -853,8 +854,8 @@ function item_photo_menu($item) {
 
        if ($cid && !$item['self']) {
                $poke_link = 'poke/?f=&c=' . $cid;
-               $contact_url = 'contacts/' . $cid;
-               $posts_link = 'contacts/' . $cid . '/posts';
+               $contact_url = 'contact/' . $cid;
+               $posts_link = 'contact/' . $cid . '/posts';
 
                if (in_array($network, [Protocol::DFRN, Protocol::DIASPORA])) {
                        $pm_url = 'message/new/' . $cid;