Resolve Error if dolibarr is running in docker container

If dolibarr is running in docker containers with alpine-linux it will fail because it has wrong environment variables. This pull request resolve the issue. It was found by dolichicken in the german user forum: https://www.dolibarr.de/forum/howto-hilfe/52509-anleitung-odt-nach-pdf-konvertieren#57583
This commit is contained in:
Alex Ludwig 2020-03-01 17:14:31 +01:00 committed by GitHub
parent 06e428064f
commit 6ad477a08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -584,7 +584,7 @@ IMG;
// using windows libreoffice that must be in path
// using linux/mac libreoffice that must be in path
// Note PHP Config "fastcgi.impersonate=0" must set to 0 - Default is 1
$command ='soffice --headless --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
$command ='soffice --headless -env:UserInstallation=file:///tmp/nobody --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name);
}
elseif (preg_match('/unoconv/', $conf->global->MAIN_ODT_AS_PDF))
{