Add lost option when module not in policy and not linked. Tiquet: #2962

This commit is contained in:
m-lopez-f 2015-11-11 13:08:29 +01:00
parent 95378f8c9f
commit 44f9b08a85
1 changed files with 4 additions and 3 deletions

View File

@ -1015,10 +1015,11 @@ if ($update_module || $create_module) {
// Make changes in the conf file if necessary
enterprise_include_once('include/functions_config_agents.php');
$NotLinkedInPolicy = enterprise_hook('policies_is_module_in_policy', array($id_agent_module))
&& !enterprise_hook('policies_is_module_linked',array($id_agent_module));
$module_in_policy = enterprise_hook('policies_is_module_in_policy', array($id_agent_module));
$module_linked = enterprise_hook('policies_is_module_linked',array($id_agent_module));
if ( $NotLinkedInPolicy ) {
if ( (!$module_in_policy && !$module_linked ) ||
( $module_in_policy && !$module_linked ) ) {
enterprise_hook('config_agents_write_module_in_conf',
array($id_agente, io_safe_output($old_configuration_data),
io_safe_output($configuration_data), $disabled));