X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=ebd6f5ed3008ddf1f569d55b78ec08501092cbac;hb=5211c12b0c752f186c1358d9347c24838725120a;hp=f674f7081512d252d19bbadfc9011745df91e838;hpb=ef4f192a75ee4499f85db3491fae0e0917f11bf2;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index f674f70815..ebd6f5ed30 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -1,6 +1,6 @@ $item]); $notify = Item::isRemoteSelf($contact, $item); @@ -615,7 +559,7 @@ class Feed } $condition = ['uid' => $item['uid'], 'uri' => $item['uri']]; - if (!Item::exists($condition) && !Post\Delayed::exists($item["uri"], $item['uid'])) { + if (!Post::exists($condition) && !Post\Delayed::exists($item["uri"], $item['uid'])) { if (!$notify) { Post\Delayed::publish($item, $notify, $taglist, $attachments); } else { @@ -946,12 +890,12 @@ class Feed $params = ['order' => ['received' => true], 'limit' => $max_items]; if ($filter === 'posts') { - $ret = Item::selectThread([], $condition, $params); + $ret = Post::selectThread(Item::DELIVER_FIELDLIST, $condition, $params); } else { - $ret = Item::select([], $condition, $params); + $ret = Post::select(Item::DELIVER_FIELDLIST, $condition, $params); } - $items = Item::inArray($ret); + $items = Post::toArray($ret); $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; @@ -1100,7 +1044,7 @@ class Feed $condition = ['uid' => $owner["uid"], 'guid' => $repeated_guid, 'private' => [Item::PUBLIC, Item::UNLISTED], 'network' => Protocol::FEDERATED]; - $repeated_item = Item::selectFirst([], $condition); + $repeated_item = Post::selectFirst(Item::DELIVER_FIELDLIST, $condition); if (!DBA::isResult($repeated_item)) { return false; } @@ -1192,9 +1136,9 @@ class Feed $mentioned = []; if ($item['gravity'] != GRAVITY_PARENT) { - $parent = Item::selectFirst(['guid', 'author-link', 'owner-link'], ['id' => $item['parent']]); + $parent = Post::selectFirst(['guid', 'author-link', 'owner-link'], ['id' => $item['parent']]); - $thrparent = Item::selectFirst(['guid', 'author-link', 'owner-link', 'plink'], ['uid' => $owner["uid"], 'uri' => $item['thr-parent']]); + $thrparent = Post::selectFirst(['guid', 'author-link', 'owner-link', 'plink'], ['uid' => $owner["uid"], 'uri' => $item['thr-parent']]); if (DBA::isResult($thrparent)) { $mentioned[$thrparent["author-link"]] = $thrparent["author-link"];