2012-05-30 Sergio Martin <sergio.martin@artica.es>
* include/functions_modules.php: Duplicate the operations too when duplicate a synthetic module for bug Merged from 4.0.x git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6371 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
72ae46344b
commit
77771b13ec
|
@ -1,3 +1,9 @@
|
|||
2012-05-30 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_modules.php: Duplicate the operations
|
||||
too when duplicate a synthetic module for bug
|
||||
Merged from 4.0.x
|
||||
|
||||
2012-05-30 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/constants.php: Add new error control
|
||||
|
|
|
@ -137,6 +137,31 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent
|
|||
}
|
||||
|
||||
if ($result !== false) {
|
||||
// If the module is synthetic we duplicate the operations too
|
||||
if($module['id_modulo'] == 5) {
|
||||
$synth_ops = db_get_all_rows_field_filter('tmodule_synth','id_agent_module_target',$module['id_agente_modulo']);
|
||||
|
||||
if($synth_ops === false) {
|
||||
$synth_ops = array();
|
||||
}
|
||||
|
||||
foreach($synth_ops as $synth_op) {
|
||||
unset($synth_op['id']);
|
||||
$synth_op['id_agent_module_target'] = $id_new_module;
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
db_process_sql_insert ('tmodule_synth',
|
||||
$synth_op);
|
||||
break;
|
||||
case "oracle":
|
||||
db_process_sql_insert ('tmodule_synth',
|
||||
$synth_op, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Added the config data if necesary
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
|
||||
|
|
Loading…
Reference in New Issue