From 78a21a6ea471c9ca0eb51b9520b8a0f8aba8260e Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 20 Jun 2011 14:50:31 +0000 Subject: [PATCH] 2011-06-20 Juan Manuel Ramon * include/functions_modules.php include/functions_tags.php: Correct a mistake that doesn't allow to create network modules correctly. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4469 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_modules.php | 2 +- pandora_console/include/functions_tags.php | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9cc7b9b0c8..f1fd314c16 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-06-20 Juan Manuel Ramon + + * include/functions_modules.php + include/functions_tags.php: Correct a mistake that doesn't allow + to create network modules correctly. + 2011-06-20 Sergio Martin * operation/events/events_list.php: Fixed total events query diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index ea22f0f8b3..6ad55e0641 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -235,7 +235,7 @@ function modules_create_agent_module ($id_agent, $name, $values = false, $disabl if ($id_agent_module === false) return false; - if ($tags !== false) + if (($tags !== false) || (empty($tags))) $return_tag = tags_insert_module_tag ($id_agent_module, $tags); if ($return_tag === false){ diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index 56a63db0bc..c7346287ed 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -271,19 +271,19 @@ function tags_insert_module_tag ($id_agent_module, $tags){ $values['id_tag'] = $tag; $values['id_agente_modulo'] = $id_agent_module; - $result_tag = db_process_sql_insert('ttag_module', $values, false); + $result_tag = db_process_sql_insert('ttag_module', $values); if ($result_tag === false) $errn++; } - if ($errn > 0){ +/* if ($errn > 0){ db_process_sql_rollback(); return false; } else{ db_process_sql_commit(); return true; - } + }*/ } /**