#11353 Api downtime agents explode multi agents
This commit is contained in:
parent
6a371b2faf
commit
0760d0fdaf
|
@ -7833,7 +7833,7 @@ function api_set_planned_downtimes_add_agents($id, $thrash1, $other, $thrash3)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($other['data'][0])) {
|
if (!empty($other['data'][0])) {
|
||||||
$agents = $other['data'];
|
$agents = explode(';', $other['data'][0]);
|
||||||
$results = false;
|
$results = false;
|
||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
if (db_get_value_sql(sprintf('SELECT id from tplanned_downtime_agents tpd WHERE tpd.id_agent = %d AND id_downtime = %d', $agent, $id)) === false) {
|
if (db_get_value_sql(sprintf('SELECT id from tplanned_downtime_agents tpd WHERE tpd.id_agent = %d AND id_downtime = %d', $agent, $id)) === false) {
|
||||||
|
|
Loading…
Reference in New Issue