2011-04-19 Javier Lanz <javier.lanz@artica.es>

* 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
This commit is contained in:
javilanz 2011-04-19 16:44:59 +00:00
parent 09d3c22541
commit 11e2b4d391
3 changed files with 9 additions and 15 deletions

View File

@ -1,3 +1,11 @@
2011-04-19 Javier Lanz <javier.lanz@artica.es>
* 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 <rnovoa@artica.es>
* pandoradb.sql: Fixed an error in last commit.

View File

@ -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 '<h3 class="error">'.__('Error adding module').'</h3>';
}

View File

@ -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":