X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotes.php;h=01f283870ef8ec2ed119d84a458fd2db67d7e33d;hb=c7bbe08a48af9873ec315dc100ed73d4268d44ed;hp=608d01cf8c63fbf1ed718788ab0eba5f5ffd3db6;hpb=c39e0dcf2a97a850c8a2cb39a05651075c295e18;p=friendica.git diff --git a/mod/notes.php b/mod/notes.php index 608d01cf8c..01f283870e 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -65,26 +65,16 @@ function notes_content(App $a, $update = false) $params = ['order' => ['created' => true], 'limit' => [$a->pager['start'], $a->pager['itemspage']]]; - $r = Item::selectForUser(local_user(), ['id'], $condition, $params); + $r = Item::selectThreadForUser(local_user(), ['uri'], $condition, $params); $count = 0; if (DBA::isResult($r)) { - $count = count($r); - $parents_arr = []; + $notes = DBA::toArray($r); - while ($rr = Item::fetch($r)) { - $parents_arr[] = $rr['id']; - } - DBA::close($r); + $count = count($notes); - $condition = ['uid' => local_user(), 'parent' => $parents_arr]; - $result = Item::selectForUser(local_user(), [], $condition); - - if (DBA::isResult($result)) { - $items = conv_sort(Item::inArray($result), 'commented'); - $o .= conversation($a, $items, 'notes', $update); - } + $o .= conversation($a, $notes, 'notes', $update); } $o .= alt_pager($a, $count);