Get rid of the "item" table, enhanced "post" tables

This commit is contained in:
Michael 2021-02-13 19:56:03 +00:00
parent c918e83aa2
commit ce6ad1aa73
23 changed files with 736 additions and 235 deletions

View file

@ -887,9 +887,9 @@ class Feed
$params = ['order' => ['received' => true], 'limit' => $max_items];
if ($filter === 'posts') {
$ret = Post::selectThread([], $condition, $params);
$ret = Post::selectThread(Item::DELIVER_FIELDLIST, $condition, $params);
} else {
$ret = Post::select([], $condition, $params);
$ret = Post::select(Item::DELIVER_FIELDLIST, $condition, $params);
}
$items = Post::toArray($ret);
@ -1041,7 +1041,7 @@ class Feed
$condition = ['uid' => $owner["uid"], 'guid' => $repeated_guid, 'private' => [Item::PUBLIC, Item::UNLISTED],
'network' => Protocol::FEDERATED];
$repeated_item = Post::selectFirst([], $condition);
$repeated_item = Post::selectFirst(Item::DELIVER_FIELDLIST, $condition);
if (!DBA::isResult($repeated_item)) {
return false;
}