X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=ebd6f5ed3008ddf1f569d55b78ec08501092cbac;hb=852d148efdfb737ea192b296cf07055194ac7706;hp=a2e9daaa036ab31826aa4ac82991ec72e5cd173b;hpb=dd94fb124229bf84f84992781c8c455c7653af74;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index a2e9daaa03..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 { @@ -656,8 +600,7 @@ class Feed } $publish_at = date(DateTimeFormat::MYSQL, $publish_time); - Post\Delayed::add($publish_at, $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']); - DI::pConfig()->set($item['uid'], 'system', 'last_publish', $next_publish); + Post\Delayed::add($posting['item']['uri'], $posting['item'], $posting['notify'], false, $publish_at, $posting['taglist'], $posting['attachments']); } } @@ -947,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; @@ -1101,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; } @@ -1193,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"];