- $r = q("SELECT `item`.`id` AS `item_id` FROM `item` %s
- WHERE %s AND `item`.`uid` = %d AND `item`.`type` = 'note'
- AND `item`.`id` = `item`.`parent` AND NOT `item`.`wall`
- $sql_extra
- ORDER BY `item`.`created` DESC LIMIT %d ,%d ",
- item_joins(local_user()),
- item_condition(),
- intval(local_user()),
- intval($a->pager['start']),
- intval($a->pager['itemspage'])
-
- );
-
- $parents_arr = [];
- $parents_str = '';
-
- if (DBM::is_result($r)) {
- foreach ($r as $rr) {
- $parents_arr[] = $rr['item_id'];
- }
-
- $condition = ['uid' => local_user(), 'parent' => $parents_arr];
- $result = Item::select(local_user(), [], $condition);
- if (DBM::is_result($result)) {
- $items = conv_sort(dba::inArray($result), 'commented');
- $o .= conversation($a, $items, 'notes', $update);
- }