mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
fixed api methods for creating and deleting scheduled downtimes agents
This commit is contained in:
parent
3524cdac6c
commit
181a480b9d
@ -7685,8 +7685,7 @@ function api_set_planned_downtimes_delete_agents($id, $thrash1, $other, $thrash3
|
||||
}
|
||||
|
||||
if (!empty($other['data'][0])) {
|
||||
$agents = io_safe_input($other['data']);
|
||||
$agents = explode(';', $agents);
|
||||
$agents = $other['data'];
|
||||
$results = false;
|
||||
foreach ($agents as $agent) {
|
||||
if (db_get_value_sql(sprintf('SELECT id from tplanned_downtime_agents WHERE id_agent = %d AND id_downtime = %d', $agent, $id)) !== false) {
|
||||
@ -7762,8 +7761,7 @@ function api_set_planned_downtimes_add_agents($id, $thrash1, $other, $thrash3)
|
||||
}
|
||||
|
||||
if (!empty($other['data'][0])) {
|
||||
$agents = io_safe_input($other['data']);
|
||||
$agents = explode(';', $agents);
|
||||
$agents = $other['data'];
|
||||
$results = false;
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user