Skip to content

Commit 5d2c647

Browse files
committed
Fixes #6755 Batch removal of Errors and Warnings in Monitor System protocol viewer does not work
1 parent a087b07 commit 5d2c647

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

interface/web/monitor/log_del.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,13 @@
3434
//* Check permissions for module
3535
$app->auth->check_module_permissions('monitor');
3636

37-
$type = $app->functions->intval($_GET['type']);
38-
if ($type == "batch") {
37+
if ($_GET['type'] == "batch") {
3938
$loglevel = $app->functions->intval($_GET['loglevel']);
40-
$app->db->query("UPDATE sys_log SET loglevel = 0 WHERE loglevel = ?", $loglevel);
39+
if($loglevel >= 0 && $loglevel <= 2) $app->db->query("UPDATE sys_log SET loglevel = 0 WHERE loglevel = ?", $loglevel);
4140
} else {
4241
$syslog_id = $app->functions->intval($_GET['id']);
43-
$app->db->query("UPDATE sys_log SET loglevel = 0 WHERE syslog_id = ?", $syslog_id);
42+
if($syslog_id > 0) $app->db->query("UPDATE sys_log SET loglevel = 0 WHERE syslog_id = ?", $syslog_id);
4443
}
4544

4645
header('Location: log_list.php');
4746
exit;
48-
49-
50-
?>

0 commit comments

Comments
 (0)