From d306bbf3912b3e85860c6e0e0712079c4b6dcf5e Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 4 Dec 2024 17:47:33 +0000 Subject: [PATCH] fixup! fix delete all button on alerts page --- classes/AlertView/Standard.php | 6 ++---- www/includes/easyparliament/templates/html/alert/index.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/classes/AlertView/Standard.php b/classes/AlertView/Standard.php index 25b1f4269a..1c383db28c 100644 --- a/classes/AlertView/Standard.php +++ b/classes/AlertView/Standard.php @@ -646,10 +646,8 @@ protected function setUserData() { $this->data['mp_step'] = 'mp_alert'; } } - if (!isset($this->data['alert']) || !$this->data['alert']) { - if ($this->data['alerts']) { - $this->data['alert'] = $this->data['alerts'][0]; - } + if (count($this->data['alerts'])) { + $this->data['delete_token'] = $this->data['alerts'][0]['token']; } if ($this->data['addword'] != '' || ($this->data['step'] && count($this->data['errors']) > 0)) { $this->data["step"] = get_http_var('this_step'); diff --git a/www/includes/easyparliament/templates/html/alert/index.php b/www/includes/easyparliament/templates/html/alert/index.php index 72f6e2edaf..12af929ee3 100644 --- a/www/includes/easyparliament/templates/html/alert/index.php +++ b/www/includes/easyparliament/templates/html/alert/index.php @@ -314,7 +314,7 @@
- +