X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FExpire.php;h=b6096b5849405d11b2f68fec6a81c245157a44ad;hb=de8787dd5bb9fadd6388c050bad35ec4c0332e08;hp=efb2cb03db8a152da4794bb76f830e7fc1af7ac0;hpb=489d3daa94b427d83b6ca23a73a61777645838f5;p=friendica.git diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php index efb2cb03db..b6096b5849 100644 --- a/src/Worker/Expire.php +++ b/src/Worker/Expire.php @@ -29,20 +29,9 @@ class Expire logger('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', 'iaid', 'icid', 'psid'], $condition); + $rows = DBA::select('item', ['id'], $condition); while ($row = DBA::fetch($rows)) { DBA::delete('item', ['id' => $row['id']]); - if (!empty($row['iaid']) && !DBA::exists('item', ['iaid' => $row['iaid']])) { - DBA::delete('item-activity', ['id' => $row['iaid']]); - } - if (!empty($row['icid']) && !DBA::exists('item', ['icid' => $row['icid']])) { - DBA::delete('item-content', ['id' => $row['icid']]); - } - // When the permission set will be used in photo and events as well. - // this query here needs to be extended. - if (!empty($row['psid']) && !DBA::exists('item', ['psid' => $row['psid']])) { - DBA::delete('permissionset', ['id' => $row['psid']]); - } } DBA::close($rows);