]> git.mxchange.org Git - friendica.git/commitdiff
Replace not working "redir" link with a working one
authorMichael <heluecht@pirati.ca>
Mon, 9 Sep 2019 21:37:26 +0000 (21:37 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 9 Sep 2019 21:37:26 +0000 (21:37 +0000)
include/text.php
src/Model/Photo.php

index 3d6bf6a5638943a23bae3245033bb21f766ad171..2050e57026e77453560e4a81f6e53f56358289e7 100644 (file)
@@ -122,7 +122,7 @@ function redir_private_images($a, &$item)
                        }
 
                        if ((local_user() == $item['uid']) && ($item['private'] == 1) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == Protocol::DFRN)) {
-                               $img_url = 'redir?f=1&quiet=1&url=' . urlencode($mtch[1]) . '&conurl=' . urlencode($item['author-link']);
+                               $img_url = 'redir/' . $item['contact-id'] . '?url=' . urlencode($mtch[1]);
                                $item['body'] = str_replace($mtch[0], '[img]' . $img_url . '[/img]', $item['body']);
                        }
                }
index e722444b18378c6b173aafef03a120470f513834..11721c81fdb092dc21267e13ec6362215a1d3c2f 100644 (file)
@@ -656,6 +656,8 @@ class Photo extends BaseObject
                                continue;
                        }
 
+                       /// @todo Check if $str_contact_allow does contain a public forum. Then set the permissions to public.
+
                        $fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow,
                                        'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny];
                        $condition = ['resource-id' => $image_uri, 'uid' => $uid];