]> git.mxchange.org Git - friendica.git/blobdiff - mod/notes.php
Next item structure works (#5380)
[friendica.git] / mod / notes.php
index 99114add8c87a6e2971f65f0795b19d3b17eca3d..553656406e53d68a34df524a47f8442834e2f466 100644 (file)
@@ -57,9 +57,9 @@ function notes_content(App $a, $update = false)
                $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);
 
@@ -68,13 +68,13 @@ function notes_content(App $a, $update = false)
 
        $params = ['order' => ['created' => true],
                'limit' => [$a->pager['start'], $a->pager['itemspage']]];
-       $r = Item::selectForUser(local_user(), ['item_id'], $condition, $params);
+       $r = Item::selectForUser(local_user(), ['id'], $condition, $params);
 
        if (DBM::is_result($r)) {
                $parents_arr = [];
 
                while ($rr = Item::fetch($r)) {
-                       $parents_arr[] = $rr['item_id'];
+                       $parents_arr[] = $rr['id'];
                }
                dba::close($r);