Commit 1c9e8b7a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Download.php: Skip 'pdftk' if there is only one PDF file to concatenate.

parent 4284e86e
......@@ -76,6 +76,15 @@ class Download {
private function concatPdfFiles(array $files) {
switch (count($files)) {
case 0:
return '';
case 1:
return $files[0];
$concatFile = tempnam(sys_get_temp_dir(), DOWNLOAD_FILE_PREFIX);
if (false === $concatFile) {
throw new DownloadException('Error creating output file.', ERROR_DOWNLOAD_CREATE_NEW_FILE);
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