$o .= status_editor($a, $x, $a->contact['id']);
}
- $condition = ["`uid` = ? AND `type` = 'note' AND `id` = `parent` AND NOT `wall`
+ $condition = ["`uid` = ? AND `type` = 'note' AND `gravity` = ? AND NOT `wall`
AND `allow_cid` = ? AND `contact-id` = ?",
- local_user(), '<' . $a->contact['id'] . '>', $a->contact['id']];
+ local_user(), GRAVITY_PARENT, '<' . $a->contact['id'] . '>', $a->contact['id']];
$notes = dba::count('item', $condition);
$params = ['order' => ['created' => true],
'limit' => [$a->pager['start'], $a->pager['itemspage']]];
- $r = Item::select(local_user(), ['item_id'], $condition, $params);
+ $r = Item::selectForUser(local_user(), ['id'], $condition, $params);
if (DBM::is_result($r)) {
$parents_arr = [];
- while ($rr = dba::fetch($r)) {
- $parents_arr[] = $rr['item_id'];
+ while ($rr = Item::fetch($r)) {
+ $parents_arr[] = $rr['id'];
}
dba::close($r);
$condition = ['uid' => local_user(), 'parent' => $parents_arr];
- $result = Item::select(local_user(), [], $condition);
+ $result = Item::selectForUser(local_user(), [], $condition);
if (DBM::is_result($result)) {
- $items = conv_sort(dba::inArray($result), 'commented');
+ $items = conv_sort(Item::inArray($result), 'commented');
$o .= conversation($a, $items, 'notes', $update);
}
}