From 16155e2264df8b3db85c92c71bf6d3f96b69df2b Mon Sep 17 00:00:00 2001 From: laf Date: Thu, 16 Jun 2016 00:50:22 +0100 Subject: [PATCH] Un-acknowledging an alert will allow it to continue sending alerts --- html/includes/forms/ack-alert.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/html/includes/forms/ack-alert.inc.php b/html/includes/forms/ack-alert.inc.php index a89c4d694a..f33ee8bde3 100644 --- a/html/includes/forms/ack-alert.inc.php +++ b/html/includes/forms/ack-alert.inc.php @@ -19,19 +19,21 @@ if (!is_numeric($alert_id)) { echo 'ERROR: No alert selected'; exit; } -else if (!is_numeric($state)) { +elseif (!is_numeric($state)) { echo 'ERROR: No state passed'; exit; } else { if ($state == 2) { $state = dbFetchCell('SELECT alerted FROM alerts WHERE id = ?', array($alert_id)); + $open = 1; } - else if ($state >= 1) { + elseif ($state >= 1) { $state = 2; + $open = 1; } - if (dbUpdate(array('state' => $state), 'alerts', 'id=?', array($alert_id)) >= 0) { + if (dbUpdate(array('state' => $state, 'open' => $open), 'alerts', 'id=?', array($alert_id)) >= 0) { echo 'Alert acknowledged status changed.'; exit; }