}
}
} else {
- $condition = ["`parent-uri` = ? AND `uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)",
- $parent['uri'], $uid, Verb::getID(Activity::FOLLOW)];
+ $condition = ["`parent-uri-id` = ? AND `uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)",
+ $parent['uri-id'], $uid, Verb::getID(Activity::FOLLOW)];
$activity = [];
}
$items = conversation_fetch_items($parent, $items, $condition, $block_authors, $params, $activity);
$link = '<a href="' . $url . '"' . $sparkle . '>' . htmlentities($activity['author-name']) . '</a>';
- if (empty($activity['thr-parent'])) {
- $activity['thr-parent'] = $activity['parent-uri'];
+ if (empty($activity['thr-parent-id'])) {
+ $activity['thr-parent-id'] = $activity['parent-uri-id'];
}
// Skip when the causer of the parent is the same than the author of the announce
- if (($verb == Activity::ANNOUNCE) && Post::exists(['uri' => $activity['thr-parent'],
+ if (($verb == Activity::ANNOUNCE) && Post::exists(['uri-id' => $activity['thr-parent-id'],
'uid' => $activity['uid'], 'causer-id' => $activity['author-id'], 'gravity' => GRAVITY_PARENT])) {
continue;
}
- if (!isset($conv_responses[$mode][$activity['thr-parent']])) {
- $conv_responses[$mode][$activity['thr-parent']] = [
+ if (!isset($conv_responses[$mode][$activity['thr-parent-id']])) {
+ $conv_responses[$mode][$activity['thr-parent-id']] = [
'links' => [],
'self' => 0,
];
- } elseif (in_array($link, $conv_responses[$mode][$activity['thr-parent']]['links'])) {
+ } elseif (in_array($link, $conv_responses[$mode][$activity['thr-parent-id']]['links'])) {
// only list each unique author once
continue;
}
if (public_contact() == $activity['author-id']) {
- $conv_responses[$mode][$activity['thr-parent']]['self'] = 1;
+ $conv_responses[$mode][$activity['thr-parent-id']]['self'] = 1;
}
- $conv_responses[$mode][$activity['thr-parent']]['links'][] = $link;
+ $conv_responses[$mode][$activity['thr-parent-id']]['links'][] = $link;
// there can only be one activity verb per item so if we found anything, we can stop looking
return;
if ($item['gravity'] != GRAVITY_PARENT) {
if ($recursive) {
// Fallback to parent-uri if thr-parent is not set
- $thr_parent = $item['thr-parent'];
+ $thr_parent = $item['thr-parent-id'];
if ($thr_parent == '') {
- $thr_parent = $item['parent-uri'];
+ $thr_parent = $item['parent-uri-id'];
}
- if ($thr_parent == $parent['uri']) {
+ if ($thr_parent == $parent['uri-id']) {
$item['children'] = get_item_children($item_list, $item);
$children[] = $item;
unset($item_list[$i]);
}
- } elseif ($item['parent'] == $parent['id']) {
+ } elseif ($item['parent-uri-id'] == $parent['uri-id']) {
$children[] = $item;
unset($item_list[$i]);
}
continue;
}
- $item_array[$item['uri']] = $item;
+ $item_array[$item['uri-id']] = $item;
}
// Extract the top level items