Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(web): fix the comment deletion for host monitored by poller (#11138) #11556

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/include/monitoring/comments/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
if (!empty($select)) {
foreach ($select as $key => $value) {
$res = explode(';', urldecode($key));
DeleteComment($res[0], [(int)$res[1] . ';' . (int)$res[2] => 'on']);
DeleteComment($res[0], [$res[1] . ';' . (int)$res[2] => 'on']);
}
}
} else {
Expand Down
1 change: 0 additions & 1 deletion www/include/monitoring/comments/common-Func.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ function DeleteComment($type = null, $hosts = [])

foreach ($hosts as $key => $value) {
$res = preg_split("/\;/", $key);
$res[0] = filter_var($res[0] ?? 0, FILTER_VALIDATE_INT);
$res[1] = filter_var($res[1] ?? 0, FILTER_VALIDATE_INT);
write_command(" DEL_" . $type . "_COMMENT;" . $res[1], GetMyHostPoller($pearDB, $res[0]));
}
Expand Down