diff --git a/src/Model/Event.php b/src/Model/Event.php index d8657c1e9..42742f18e 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -226,7 +226,7 @@ class Event extends BaseObject return; } - DBA::delete('event', ['id' => $event_id]); + DBA::delete('event', ['id' => $event_id], ['cascade' => false]); Logger::log("Deleted event ".$event_id, Logger::DEBUG); } diff --git a/src/Model/Item.php b/src/Model/Item.php index 579d2f68e..059838bdb 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1080,9 +1080,11 @@ class Item extends BaseObject } // When the permission set will be used in photo and events as well, // this query here needs to be extended. - if (!empty($item['psid']) && !self::exists(['psid' => $item['psid'], 'deleted' => false])) { - DBA::delete('permissionset', ['id' => $item['psid']], ['cascade' => false]); - } + // Currently deactivated. We need the permission set in the deletion process. + // This is a reminder to add the removal somewhere else. + //if (!empty($item['psid']) && !self::exists(['psid' => $item['psid'], 'deleted' => false])) { + // DBA::delete('permissionset', ['id' => $item['psid']], ['cascade' => false]); + //} // If it's the parent of a comment thread, kill all the kids if ($item['id'] == $item['parent']) {