2011-08-24 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_modules.php: added the call to enterprise function for
	to copy the remote configuration when copy the modules.
	
	Fixes: #3397314



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4816 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-08-24 16:46:03 +00:00
parent 674dff9405
commit 58cc93d072
2 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2011-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_modules.php: added the call to enterprise function for
to copy the remote configuration when copy the modules.
Fixes: #3397314
2011-08-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/incidents/incident_detail.php: Fixed table width in this

View File

@ -62,11 +62,11 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
case "mysql":
case "postgresql":
db_process_sql_update('tagente_modulo', array('disabled' => false, 'delete_pending' => false),
array('id_agente_modulo' => $id_module, 'disabled' => true));
array('id_agente_modulo' => $id_module, 'disabled' => true));
break;
case "oracle":
db_process_sql_update('tagente_modulo', array('disabled' => false, 'delete_pending' => false),
array('id_agente_modulo' => $id_module, 'disabled' => true), 'AND', false);
array('id_agente_modulo' => $id_module, 'disabled' => true), 'AND', false);
break;
}
}
@ -133,6 +133,22 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
$result = db_process_sql_insert ('tagente_estado', $values, false);
break;
}
if ($result !== false) {
//Added the config data if necesary
enterprise_include_once('include/functions_config_agents.php');
$id_agente = modules_get_agentmodule_agent($id_agent_module);
$agent_md5 = md5 (agents_get_name($id_agente), false);
$remote_conf = file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5");
if ($remote_conf) {
$result = enterprise_hook('config_agents_copy_agent_module_to_agent',
array($id_agente, $id_agent_module, $id_new_module));
}
}
if ($result === false)
return false;