Merged in marcoAntonioNina/processmaker/BY-492 (pull request #4920)

BY-492
This commit is contained in:
Dante Loayza
2016-09-19 08:51:34 -04:00

View File

@@ -376,13 +376,15 @@ class AppDocumentDrive
if ($appDoc->getAppDocType() == 'OUTPUT') {
if ($sw_file_exists_doc) {
$nameDoc = !empty($name)? $name : array_pop(explode('/', $realPathDoc));
$result = $this->upload($fields, 'OUTPUT_DOC', 'application/msword', $realPathDoc,
array_pop(explode('/', $realPathDoc)));
$nameDoc);
}
if ($sw_file_exists_pdf) {
$namePdf = !empty($name)? $name : array_pop(explode('/', $realPathPdf));
$info = finfo_open(FILEINFO_MIME_TYPE);
$result = $this->upload($fields, 'OUTPUT_PDF', finfo_file($info, $realPathPdf),
$realPathPdf, array_pop(explode('/', $realPathPdf)));
$realPathPdf, $namePdf);
}
} else {
$info = finfo_open(FILEINFO_MIME_TYPE);