Un-acknowledging an alert will allow it to continue sending alerts

This commit is contained in:
laf
2016-06-16 00:50:22 +01:00
parent 66f8a7e071
commit 16155e2264

View File

@@ -26,12 +26,14 @@ else if (!is_numeric($state)) {
else {
if ($state == 2) {
$state = dbFetchCell('SELECT alerted FROM alerts WHERE id = ?', array($alert_id));
$open = 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;
}