mirror of
https://github.com/friendica/friendica
synced 2025-03-30 22:00:13 +00:00
Split method Item::insert()
This commit is contained in:
parent
5d5d1ca7b2
commit
83a3bc44af
1 changed files with 5 additions and 0 deletions
|
@ -1329,6 +1329,11 @@ class Item
|
||||||
|
|
||||||
Logger::notice('created item', ['post-id' => $post_user_id, 'uid' => $item['uid'], 'network' => $item['network'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid']]);
|
Logger::notice('created item', ['post-id' => $post_user_id, 'uid' => $item['uid'], 'network' => $item['network'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid']]);
|
||||||
|
|
||||||
|
return self::handleCreatedItem($orig_item, $post_user_id, $uid, $notify, $copy_permissions, $parent_origin, $priority, $notify_type, $inserted);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function handleCreatedItem(array $orig_item, int $post_user_id, int $uid, int $notify, bool $copy_permissions, $parent_origin, int $priority, string $notify_type, bool $inserted): int
|
||||||
|
{
|
||||||
$posted_item = Post::selectFirst(self::ITEM_FIELDLIST, ['post-user-id' => $post_user_id]);
|
$posted_item = Post::selectFirst(self::ITEM_FIELDLIST, ['post-user-id' => $post_user_id]);
|
||||||
if (!DBA::isResult($posted_item)) {
|
if (!DBA::isResult($posted_item)) {
|
||||||
// On failure store the data into a spool file so that the "SpoolPost" worker can try again later.
|
// On failure store the data into a spool file so that the "SpoolPost" worker can try again later.
|
||||||
|
|
Loading…
Add table
Reference in a new issue