mirror of
https://github.com/friendica/friendica
synced 2024-11-10 08:22:57 +00:00
Set iaid after update
This commit is contained in:
parent
014eea8e12
commit
5203f41d42
1 changed files with 15 additions and 6 deletions
|
@ -750,7 +750,20 @@ class Item extends BaseObject
|
|||
if (!empty($item['plink'])) {
|
||||
$content_fields['plink'] = $item['plink'];
|
||||
}
|
||||
if (!self::updateActivity($content_fields, ['uri' => $item['uri']])) {
|
||||
if (self::updateActivity($content_fields, ['uri' => $item['uri']])) {
|
||||
if (empty($item['iaid'])) {
|
||||
$item_activity = dba::selectFirst('item-activity', ['id'], ['uri' => $item['uri']]);
|
||||
if (DBM::is_result($item_activity)) {
|
||||
$item_fields = ['iaid' => $item_activity['id'], 'icid' => 0,
|
||||
'verb' => '', 'object' => '', 'body' => 'activity'];
|
||||
dba::update('item', $item_fields, ['id' => $item['id']]);
|
||||
|
||||
if (!empty($item['icid']) && !dba::exists('item', ['icid' => $item['icid']])) {
|
||||
dba::delete('item-content', ['id' => $item['icid']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self::updateContent($content_fields, ['uri' => $item['uri']]);
|
||||
|
||||
if (empty($item['icid'])) {
|
||||
|
@ -766,10 +779,6 @@ class Item extends BaseObject
|
|||
dba::update('item', $item_fields, ['id' => $item['id']]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (empty($item['iaid'])) {
|
||||
// To-Do
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($tags)) {
|
||||
|
|
Loading…
Reference in a new issue