From 11e2b4d391e238a2473d5da36c1bd54b0186b760 Mon Sep 17 00:00:00 2001 From: javilanz Date: Tue, 19 Apr 2011 16:44:59 +0000 Subject: [PATCH] 2011-04-19 Javier Lanz * include/functions_modules.php: Fixed an error about the agent status * godmode/agentes/agent_template.php: Fixed an error about the agent status Fix: #3251822 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4256 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/godmode/agentes/agent_template.php | 12 +----------- pandora_console/include/functions_modules.php | 4 ---- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c3923273f0..b978095662 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-04-19 Javier Lanz + + * include/functions_modules.php: Fixed an error about the agent status + * godmode/agentes/agent_template.php: Fixed an error about the agent + status + + Fix: #3251822 + 2011-04-19 Ramon Novoa * pandoradb.sql: Fixed an error in last commit. diff --git a/pandora_console/godmode/agentes/agent_template.php b/pandora_console/godmode/agentes/agent_template.php index 6f8f121381..9ae3eee301 100644 --- a/pandora_console/godmode/agentes/agent_template.php +++ b/pandora_console/godmode/agentes/agent_template.php @@ -78,7 +78,7 @@ if (isset ($_POST["template_id"])) { $id_agente_modulo = process_sql_insert('tagente_modulo', $values); // Create with different estado if proc type or data type - if ($id_agente_modulo !== false && ($row2["type"] == 2) || ($row2["type"] == 6) || ($row2["type"] == 9) || ($row2["type"] == 12) || ($row2["type"] == 18)) { + if ($id_agente_modulo !== false) { $values = array( 'id_agente_modulo' => $id_agente_modulo, 'datos' => 0, @@ -88,16 +88,6 @@ if (isset ($_POST["template_id"])) { 'utimestamp' => 0); process_sql_insert('tagente_estado', $values); } - elseif ($id_agente_modulo !== false) { - $values = array( - 'id_agente_modulo' =>$id_agente_modulo, - 'datos' => 0, - 'timestamp' => '0000-00-00 00:00:00', - 'estado' => 100, - 'id_agente' => $id_agente, - 'utimestamp' => 0); - process_sql_insert('tagente_estado', $values); - } else { echo '

'.__('Error adding module').'

'; } diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index bfcc32db80..c1550b38d0 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -119,10 +119,6 @@ function copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent, $force } $values['id_agente'] = $id_destiny_agent; - - if (! in_array ($new_module['id_tipo_modulo'], array (2, 6, 9, 18, 21, 100))) //TODO delete magic numbers - /* Not proc modules uses a special estado (status) value */ - $values['estado'] = 100; switch ($config['dbtype']) { case "mysql":