Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
1c9e8b7a
Commit
1c9e8b7a
authored
May 01, 2017
by
Carsten Rose
Browse files
Download.php: Skip 'pdftk' if there is only one PDF file to concatenate.
parent
4284e86e
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/report/Download.php
View file @
1c9e8b7a
...
...
@@ -76,6 +76,15 @@ class Download {
*/
private
function
concatPdfFiles
(
array
$files
)
{
switch
(
count
(
$files
))
{
case
0
:
return
''
;
case
1
:
return
$files
[
0
];
default
:
break
;
}
$concatFile
=
tempnam
(
sys_get_temp_dir
(),
DOWNLOAD_FILE_PREFIX
);
if
(
false
===
$concatFile
)
{
throw
new
DownloadException
(
'Error creating output file.'
,
ERROR_DOWNLOAD_CREATE_NEW_FILE
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment