mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Minor fixes in api responses
This commit is contained in:
parent
1f06a15d7c
commit
d0796a3e09
@ -11112,11 +11112,10 @@ function api_set_delete_cluster($id, $thrash1, $thrast2, $thrash3) {
|
|||||||
$tcluster_delete = db_process_sql('delete from tcluster where id = '.$id);
|
$tcluster_delete = db_process_sql('delete from tcluster where id = '.$id);
|
||||||
$tcluster_agent_delete = agents_delete_agent($temp_id_cluster[0]['id_agent']);
|
$tcluster_agent_delete = agents_delete_agent($temp_id_cluster[0]['id_agent']);
|
||||||
|
|
||||||
if (!$tcluster_modules_delete || !$tcluster_items_delete || !$tcluster_agents_delete || !$tcluster_delete || !$tcluster_agent_delete)
|
if (($tcluster_modules_delete + $tcluster_items_delete + $tcluster_agents_delete + $tcluster_delete + $tcluster_agent_delete) == 0)
|
||||||
returnError('error_delete', 'Error in delete operation.');
|
returnError('error_delete', 'Error in delete operation.');
|
||||||
else
|
else
|
||||||
returnData('string', array('type' => 'string', 'data' => __('Correct Delete')));
|
returnData('string', array('type' => 'string', 'data' => __('Successfully deleted')));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function api_set_delete_cluster_agents($thrash1, $thrast2, $other, $thrash3) {
|
function api_set_delete_cluster_agents($thrash1, $thrast2, $other, $thrash3) {
|
||||||
@ -11430,7 +11429,7 @@ function api_get_agents_id_name_by_cluster_name($cluster_name, $trash1, $trash2,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$all_agents = cluster_get_agents_id_name_by_cluster_id($cluster_name);
|
$all_agents = cluster_get_agents_id_name_by_cluster_id($value);
|
||||||
|
|
||||||
if (count($all_agents) > 0 and $all_agents !== false) {
|
if (count($all_agents) > 0 and $all_agents !== false) {
|
||||||
$data = array('type' => 'json', 'data' => $all_agents);
|
$data = array('type' => 'json', 'data' => $all_agents);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user