#9604 Fixed delete_host and ignore_host 2

This commit is contained in:
Daniel Maya 2022-10-04 13:16:39 +02:00
parent 66e083a964
commit eefb872c47
1 changed files with 2 additions and 12 deletions

View File

@ -321,12 +321,7 @@ class SatelliteAgent extends HTML
}
if (preg_match($re_disable, $line, $matches, PREG_OFFSET_CAPTURE, 0) > 0) {
$agent['address'] = $matches[1][0];
if (isset($matches[2][0]) === false || empty($matches[2][0]) === true) {
$agent['name'] = '';
} else {
$agent['name'] = $matches[2][0];
}
$agent['name'] = $matches[1][0];
$agent['type'] = 'ignore_host';
@ -334,12 +329,7 @@ class SatelliteAgent extends HTML
}
if (preg_match($re_delete, $line, $matches, PREG_OFFSET_CAPTURE, 0) > 0) {
$agent['address'] = $matches[1][0];
if (isset($matches[2][0]) === false || empty($matches[2][0]) === true) {
$agent['name'] = '';
} else {
$agent['name'] = $matches[2][0];
}
$agent['name'] = $matches[1][0];
$agent['type'] = 'delete_host';