Merge pull request #7307 from annando/delete-events

Fix for distribution of event deletions
2022.09-rc
Hypolite Petovan 2019-06-23 09:53:35 -04:00 zatwierdzone przez GitHub
commit 2f42cb08fa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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]);
}
// @todo 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']) {