2012-05-31 Vanessa Gil <vanessa.gil@artica.es>

* godmode/agentes/agent_template.php: Fixed bug: adding
	modules to an agent with templates, if the agent already had
	modules can be duplicated with the same name.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6383 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-05-31 10:22:18 +00:00
parent bfa86888b9
commit 76668bc1de
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2012-05-31 Vanessa Gil <vanessa.gil@artica.es>
* godmode/agentes/agent_template.php: Fixed bug: adding
modules to an agent with templates, if the agent already had
modules can be duplicated with the same name.
2012-05-31 Sergio Martin <sergio.martin@artica.es>
* extensions/system_info.php: Fixed strange behavior in

View File

@ -45,6 +45,7 @@ if (isset ($_POST["template_id"])) {
}
$id_np = get_parameter_post ("template_id");
$name_template = db_get_value ('name', 'tnetwork_profile', 'id_np', $id_np);
$npc = db_get_all_rows_field_filter ("tnetwork_profile_component", "id_np", $id_np);
if ($npc === false) {
$npc = array ();
@ -59,7 +60,7 @@ if (isset ($_POST["template_id"])) {
$values = array(
'id_agente' => $id_agente,
'id_tipo_modulo' => $row2["type"],
'descripcion' => $row2["description"],
'descripcion' => __('Created by template ').$name_template. ' . '.$row2["description"],
'nombre' => $row2["name"],
'max' => $row2["max"],
'min' => $row2["min"],