Merge branch 'ent-5333-7076-encoding-iso-8859-15-enc-genera-badxml' into 'develop'

Ent 5333 7076 encoding iso 8859 15 enc genera badxml

See merge request artica/pandorafms!3037
This commit is contained in:
Daniel Rodriguez 2020-02-06 19:54:40 +01:00
commit f5cdb34167
1 changed files with 4 additions and 1 deletions

View File

@ -82,8 +82,11 @@ sub new ($$;$) {
my $self = $class->SUPER::new($config, DATASERVER, \&PandoraFMS::DataServer::data_producer, \&PandoraFMS::DataServer::data_consumer, $dbh);
# Load external .enc files for XML::Parser.
if ($config->{'enc_dir'} ne '' && !grep {$_ eq $config->{'enc_dir'}} @XML::Parser::Expat::Encoding_Path) {
if ($config->{'enc_dir'} ne '') {
push(@XML::Parser::Expat::Encoding_Path, $config->{'enc_dir'});
if ($XML::Simple::PREFERRED_PARSER eq 'XML::SAX::ExpatXS') {
push(@XML::SAX::ExpatXS::Encoding::Encoding_Path, $config->{'enc_dir'});
}
}
if ($config->{'autocreate_group'} > 0 && !defined(get_group_name ($dbh, $config->{'autocreate_group'}))) {