fixed errors detected SLA

This commit is contained in:
daniel 2018-03-16 12:03:51 +01:00
parent a17c7c3e34
commit d881e0028d
1 changed files with 10 additions and 17 deletions

View File

@ -1087,20 +1087,13 @@ function modules_get_agentmodule_descripcion ($id_agente_modulo) {
* *
* @return string Module type of the given agent module. * @return string Module type of the given agent module.
*/ */
function modules_get_agentmodule_type ($id_agentmodule, $metaconsole = false, $id_server = null) { function modules_get_agentmodule_type ($id_agentmodule) {
$return = db_get_value (
if ($metaconsole) { 'id_tipo_modulo',
$server = db_get_row('tmetaconsole_setup', 'id', $id_server); 'tagente_modulo',
'id_agente_modulo',
$return = db_get_value ('id_tipo_modulo', (int) $id_agentmodule
'tagente_modulo', 'id_agente_modulo', (int) $id_agentmodule); );
metaconsole_restore_db();
}
else {
$return = db_get_value ('id_tipo_modulo',
'tagente_modulo', 'id_agente_modulo', (int) $id_agentmodule);
}
return (int) $return; return (int) $return;
} }
@ -2321,7 +2314,7 @@ function modules_get_first_date($id_agent_module, $datelimit = 0) {
//check datatype string or normal //check datatype string or normal
$table = "tagente_datos"; $table = "tagente_datos";
$module_type_str = modules_get_type_name ($id_agent_module); $module_type_str = modules_get_agentmodule_type($id_agent_module);
if (strstr ($module_type_str, 'string') !== false) { if (strstr ($module_type_str, 'string') !== false) {
$table = "tagente_datos_string"; $table = "tagente_datos_string";
} }