Many item calls are now isolated in a single function

This commit is contained in:
Michael 2018-02-06 12:40:22 +00:00
parent c8cc7f13f1
commit e609de2957
23 changed files with 161 additions and 387 deletions

View file

@ -552,16 +552,7 @@ class OStatus
return;
}
// Currently we don't have a central deletion function that we could use in this case
// The function "item_drop" doesn't work for that case
dba::update(
'item',
['deleted' => true, 'title' => '', 'body' => '',
'edited' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()],
['id' => $deleted["id"]]
);
Item::deleteThread($deleted["id"], $deleted["parent-uri"]);
Item::deleteById($deleted["id"]);
logger('Deleted item with uri '.$item['uri'].' for user '.$item['uid']);
}