Fixed message issue
This commit is contained in:
parent
93d70da822
commit
0e12402469
|
@ -231,7 +231,7 @@ if ($create_agent) {
|
||||||
if ($alias == '') {
|
if ($alias == '') {
|
||||||
$agent_creation_error = __('No agent alias specified');
|
$agent_creation_error = __('No agent alias specified');
|
||||||
$agent_created_ok = 0;
|
$agent_created_ok = 0;
|
||||||
} else if (group_allow_more_agents($grupo, true) === false) {
|
} else if (group_allow_more_agents($grupo, true, 'create') === false) {
|
||||||
$agent_creation_error = __('Agent cannot be created due to the maximum agent limit for this group');
|
$agent_creation_error = __('Agent cannot be created due to the maximum agent limit for this group');
|
||||||
$agent_created_ok = 0;
|
$agent_created_ok = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1039,7 +1039,7 @@ if ($update_agent) {
|
||||||
|
|
||||||
if ($grupo <= 0) {
|
if ($grupo <= 0) {
|
||||||
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
|
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
|
||||||
} else if (group_allow_more_agents($grupo, true) === false) {
|
} else if (group_allow_more_agents($grupo, true, 'update') === false) {
|
||||||
ui_print_error_message(__('Agent cannot be updated due to the maximum agent limit for this group'));
|
ui_print_error_message(__('Agent cannot be updated due to the maximum agent limit for this group'));
|
||||||
} else if ($exists_ip) {
|
} else if ($exists_ip) {
|
||||||
ui_print_error_message(__('Duplicate main IP address'));
|
ui_print_error_message(__('Duplicate main IP address'));
|
||||||
|
|
|
@ -1480,7 +1480,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if group allow more agents or have limit stablished.
|
// Check if group allow more agents or have limit stablished.
|
||||||
if (group_allow_more_agents($idGroup) === false) {
|
if (group_allow_more_agents($idGroup, true, 'update') === false) {
|
||||||
returnError('Agent cannot be updated due to the maximum agent limit for this group');
|
returnError('Agent cannot be updated due to the maximum agent limit for this group');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1686,7 +1686,7 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3)
|
||||||
returnError('The agent name already exists in DB.');
|
returnError('The agent name already exists in DB.');
|
||||||
} else if (db_get_value_sql('SELECT id_grupo FROM tgrupo WHERE id_grupo = '.$grupo) === false) {
|
} else if (db_get_value_sql('SELECT id_grupo FROM tgrupo WHERE id_grupo = '.$grupo) === false) {
|
||||||
returnError('The group does not exist.');
|
returnError('The group does not exist.');
|
||||||
} else if (group_allow_more_agents($grupo) === false) {
|
} else if (group_allow_more_agents($grupo, true, 'create') === false) {
|
||||||
returnError('Agent cannot be created due to the maximum agent limit for this group');
|
returnError('Agent cannot be created due to the maximum agent limit for this group');
|
||||||
} else if (db_get_value_sql('SELECT id_os FROM tconfig_os WHERE id_os = '.$id_os) === false) {
|
} else if (db_get_value_sql('SELECT id_os FROM tconfig_os WHERE id_os = '.$id_os) === false) {
|
||||||
returnError('The OS does not exist.');
|
returnError('The OS does not exist.');
|
||||||
|
|
Loading…
Reference in New Issue