mirror of
https://github.com/friendica/friendica
synced 2025-04-27 14:30:11 +00:00
Added comments / hourly workerqueue deletion
This commit is contained in:
parent
3e475f3b82
commit
fc60e23314
2 changed files with 17 additions and 5 deletions
|
@ -117,10 +117,12 @@ class Item extends BaseObject
|
|||
'verb', 'object-type', 'object', 'target', 'contact-id'];
|
||||
$item = dba::selectFirst('item', $fields, ['id' => $item_id]);
|
||||
if (!DBM::is_result($item)) {
|
||||
logger('Item with ID ' . $item_id . " hadn't been found.", LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($item['deleted']) {
|
||||
logger('Item with ID ' . $item_id . ' is already deleted.', LOGGER_DEBUG);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -129,8 +131,6 @@ class Item extends BaseObject
|
|||
$parent = ['origin' => false];
|
||||
}
|
||||
|
||||
logger('delete item: ' . $item['id'], LOGGER_DEBUG);
|
||||
|
||||
// clean up categories and tags so they don't end up as orphans
|
||||
|
||||
$matches = false;
|
||||
|
@ -202,6 +202,8 @@ class Item extends BaseObject
|
|||
Worker::add(['priority' => $priority, 'dont_fork' => true], "Notifier", "drop", intval($item['id']));
|
||||
}
|
||||
|
||||
logger('Item with ID ' . $item_id . " had been deleted.", LOGGER_DEBUG);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue