]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
The "file" variable isn't stored anymore in the item table
[friendica.git] / src / Model / Contact.php
index 4e46b49fdd1f43e3183a027d5a4b028df57a5be3..fe9869c6f88065386a8a918b11ac88e555e5096a 100644 (file)
@@ -1064,13 +1064,13 @@ class Contact extends BaseObject
 
                $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
 
-               $condition = ["`$contact` = ? AND `verb` = ? AND " . $sql,
-                       $author_id, ACTIVITY_POST, local_user()];
+               $condition = ["`$contact` = ? AND `gravity` IN (?, ?) AND " . $sql,
+                       $author_id, GRAVITY_PARENT, GRAVITY_COMMENT, local_user()];
                $params = ['order' => ['created' => true],
                        'limit' => [$a->pager['start'], $a->pager['itemspage']]];
-               $r = Item::select(local_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
+               $r = Item::selectForUser(local_user(), [], $condition, $params);
 
-               $items = dba::inArray($r);
+               $items = Item::inArray($r);
 
                $o = conversation($a, $items, 'contact-posts', false);