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

Commit

Permalink
fix(engine): add possibility to save correctly service_interleave_fac…
Browse files Browse the repository at this point in the history
…tor value
  • Loading branch information
lpinsivy committed Jun 5, 2019
1 parent 849679a commit 3725868
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions www/include/configuration/configNagios/DB-Func.php
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,8 @@ function insertNagios($ret = array(), $brokerTab = array())
$rq .= "NULL, ";
}

if (isset($ret["service_interleave_factor"]["service_interleave_factor"])
&& $ret["service_interleave_factor"]["service_interleave_factor"] != 2
) {
$rq .= "'" . $ret["service_interleave_factor"]["service_interleave_factor"] . "', ";
if (isset($ret["service_interleave_factor"]) && $ret["service_interleave_factor"] != null) {
$rq .= "'" . htmlentities($ret["service_interleave_factor"], ENT_QUOTES, "UTF-8") . "', ";
} else {
$rq .= "'2', ";
}
Expand Down Expand Up @@ -1573,11 +1571,9 @@ function updateNagios($nagios_id = null)
$rq .= "max_service_check_spread = NULL, ";
}

if (isset($ret["service_interleave_factor"]["service_interleave_factor"])
&& $ret["service_interleave_factor"]["service_interleave_factor"] != 2
) {
if (isset($ret["service_interleave_factor"]) && $ret["service_interleave_factor"] != null) {
$rq .= "service_interleave_factor = '"
. $ret["service_interleave_factor"]["service_interleave_factor"]
. htmlentities($ret["service_interleave_factor"], ENT_QUOTES, "UTF-8")
. "', ";
} else {
$rq .= "service_interleave_factor = '2', ";
Expand Down

0 comments on commit 3725868

Please sign in to comment.