mirror of
https://github.com/friendica/friendica
synced 2025-04-27 23:10:12 +00:00
"item" is replaced whenever possible at the moment
This commit is contained in:
parent
0fe37b123a
commit
8f27715d8b
9 changed files with 21 additions and 21 deletions
|
@ -44,11 +44,12 @@ class Expire
|
|||
Logger::log('Delete expired items', Logger::DEBUG);
|
||||
// physically remove anything that has been deleted for more than two months
|
||||
$condition = ["`deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"];
|
||||
$rows = DBA::select('item', ['id', 'guid', 'uri-id', 'uid'], $condition);
|
||||
while ($row = DBA::fetch($rows)) {
|
||||
$rows = Post::select(['id', 'guid', 'uri-id', 'uid'], $condition);
|
||||
while ($row = Post::fetch($rows)) {
|
||||
Logger::info('Delete expired item', ['id' => $row['id'], 'guid' => $row['guid']]);
|
||||
DBA::delete('item', ['id' => $row['id']]);
|
||||
Post\User::delete(['uri-id' => $row['uri-id'], 'uid' => $row['uid']]);
|
||||
Post\ThreadUser::delete(['uri-id' => $row['uri-id'], 'uid' => $row['uid']]);
|
||||
}
|
||||
DBA::close($rows);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue