avoid using module type read from xml once the module is created
This commit is contained in:
parent
421598df6b
commit
f8e2cbd7e0
|
@ -653,11 +653,16 @@ sub process_xml_data ($$$$$) {
|
|||
# save the carriage return.
|
||||
$module_name =~ s/\r//g;
|
||||
$module_name =~ s/\n//g;
|
||||
|
||||
|
||||
# Unnamed module
|
||||
next if ($module_name eq '');
|
||||
|
||||
my $module_type = get_tag_value ($module_data, 'type', 'generic_data');
|
||||
# Read module type from db when module exists within it (skip XML read).
|
||||
my $module_type = get_db_value ($dbh, 'SELECT ttm.nombre FROM ttipo_modulo ttm INNER JOIN tagente_modulo tam ON tam.id_tipo_modulo = ttm.id_tipo WHERE tam.id_agente = ' . $agent_id . ' AND tam.nombre' . ' = '. $RDBMS_QUOTE_STRING . safe_input($module_name) . $RDBMS_QUOTE_STRING);
|
||||
|
||||
if (!defined($module_type)) {
|
||||
$module_type = get_tag_value ($module_data, 'type', 'generic_data');
|
||||
}
|
||||
|
||||
# Apply timezone offset to module if timestamp is set.
|
||||
if (defined($module_data->{'timestamp'} && $module_data->{'timestamp'} ne '')) {
|
||||
|
|
Loading…
Reference in New Issue