From 22a61d28be46baf01525468798828a7e25ebd427 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Sat, 19 Sep 2026 07:34:55 +0200 Subject: [PATCH] Allow permanently deleting archived raids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wires up the bot API's existing DELETE /api/raids/{id}/permanent endpoint: archived raids now get an "Endgültig löschen" button next to "Wiederherstellen" (raids.manage only), gated by a confirmation dialog since it's irreversible - unlike the existing archive action, which only soft-deletes. Co-Authored-By: Claude Sonnet 5 --- includes/raids_api.php | 11 +++++++++++ raid_delete_action.php | 29 +++++++++++++++++++++++++++++ raids.php | 6 ++++++ 3 files changed, 46 insertions(+) create mode 100644 raid_delete_action.php diff --git a/includes/raids_api.php b/includes/raids_api.php index 1fd4aa8..de04e7c 100644 --- a/includes/raids_api.php +++ b/includes/raids_api.php @@ -122,6 +122,17 @@ function restore_raid(int $raidId): void raids_api_request('POST', '/' . $raidId . '/restore'); } +/** + * Loescht einen Raid ENDGUELTIG (keine Historie, keine Wiederherstellung), im + * Gegensatz zu archive_raid(). Nur fuer bereits archivierte Raids gedacht. + * + * @throws RuntimeException + */ +function delete_raid_permanently(int $raidId): void +{ + raids_api_request('DELETE', '/' . $raidId . '/permanent'); +} + /** * @param int|null $group Feste Zielgruppe (0 = Ersatzbank) oder null, damit der Bot * automatisch nach Rollen-Caps zuteilt. diff --git a/raid_delete_action.php b/raid_delete_action.php new file mode 100644 index 0000000..761d060 --- /dev/null +++ b/raid_delete_action.php @@ -0,0 +1,29 @@ +getMessage()); +} + +redirect($redirectTo); diff --git a/raids.php b/raids.php index cfa2dcd..6b82e42 100644 --- a/raids.php +++ b/raids.php @@ -173,6 +173,12 @@ include __DIR__ . '/includes/header.php'; +
+ + + + +