Commit 762d3782 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #11146. Sendmail dynamic PDF broken

parent 1fdaba30
Pipeline #4032 passed with stages
in 4 minutes and 29 seconds
......@@ -37,6 +37,7 @@ class SessionCookie {
public function __construct(array $config) {
$lines = '';
// In debug mode, keep temporary files
$this->cleanTempFiles = !Support::findInSet(SYSTEM_SHOW_DEBUG_INFO_DOWNLOAD, $config[SYSTEM_SHOW_DEBUG_INFO]);
$urlParts = parse_url($config[SYSTEM_BASE_URL]);
......@@ -78,5 +79,4 @@ class SessionCookie {
return $this->pathFileNameCookie;
}
}
\ No newline at end of file
......@@ -636,19 +636,20 @@ class Download {
ERROR_MESSAGE_TO_DEVELOPER => "File: $filename"]), ERROR_IO_FILE_EXIST);
}
$filesCleanLater[] = $filename;
switch ($outputMode) {
case OUTPUT_MODE_FILE:
// At least for sendmail with dynamic PDF created from URL: unlink temporary files later, not now.
break;
case OUTPUT_MODE_COPY_TO_FILE:
HelperFile::copy($filename, $vars[DOWNLOAD_EXPORT_FILENAME]);
$filesCleanLater[] = $filename;
break;
case OUTPUT_MODE_DIRECT:
$this->outputFile($filename, $vars[DOWNLOAD_EXPORT_FILENAME]);
$filesCleanLater[] = $filename;
$filename = '';
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment