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'], $condition);
+ $rows = DBA::select('item', ['id', 'guid'], $condition);
while ($row = DBA::fetch($rows)) {
+ Logger::info('Delete expired item', ['id' => $row['id'], 'guid' => $row['guid']]);
DBA::delete('item', ['id' => $row['id']]);
}
DBA::close($rows);