Added enc_dir to Encoding_Path (ExpatXS)

This commit is contained in:
fbsanchez 2020-01-29 16:31:08 +01:00
parent 0cf42f2d74
commit c8c2141f83
1 changed files with 4 additions and 1 deletions

View File

@ -81,8 +81,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'}))) {