- 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']]);
- }