]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
redir - clicking on title of own post leads to access denied error
[friendica.git] / include / conversation.php
index 1f597756f457a401f151c88f5a31aab754100ec6..e623c9320bf911e3fb5a457f1adb58f9caeade0e 100644 (file)
@@ -771,7 +771,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
        $items = [];
 
        foreach ($parents AS $parent) {
-               $condition = ["`item`.`parent-uri` = ? AND `item`.`uid` IN (0, ?) AND `vid` != ?",
+               $condition = ["`item`.`parent-uri` = ? AND `item`.`uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)",
                        $parent['uri'], $uid, Verb::getID(Activity::FOLLOW)];
                $items = conversation_fetch_items($parent, $items, $condition, $block_authors, $params);
        }
@@ -823,7 +823,7 @@ function item_photo_menu($item) {
        $block_link = '';
        $ignore_link = '';
 
-       if (local_user() && local_user() == $item['uid'] && $item['parent'] == $item['id'] && !$item['self']) {
+       if (local_user() && local_user() == $item['uid'] && $item['gravity'] == GRAVITY_PARENT && !$item['self']) {
                $sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
        }