document export bugfixes: getting content from db in Documents.php, correctly return data in Dokumente.php, passing temp folder in DocumentExportLib, path fix in DocumentLib, correct parameters in Archiv.php getByPersonId call, Archiv.js: check if array is returned, different controller for download (dokumente instead of akte)

This commit is contained in:
Alexei Karpenko
2026-02-09 14:22:39 +01:00
parent 0b797cfdb1
commit f4d8a396f5
7 changed files with 65 additions and 126 deletions
+6 -5
View File
@@ -403,17 +403,18 @@ class DocumentExportLib
clearstatcache();
$temp_filename = $temp_folder . '/out.' . $outputformat;
switch ($outputformat) {
case 'pdf':
case 'doc':
$converResult = $this->documentlib->convert($tempname_zip, $temp_filename, $outputformat);
$converResult = $this->_ci->documentlib->convert($tempname_zip, $temp_filename, $outputformat);
if (isError($converResult))
return error($this->_ci->DocumentExportPhrases->t('document_export', 'error_conv_timeout'));
break;
case 'odt':
default:
$temp_filename = $tempname_zip;
//~ default:
//~ $temp_filename = $tempname_zip;
}
return success($temp_filename);
@@ -435,13 +436,13 @@ class DocumentExportLib
{
if ($outputformat != 'pdf') return error($this->_ci->DocumentExportPhrases->t('document_export', 'error_sign_pdf'));
$signed_filename = $this->_ci->signaturelib->sign($temp_filename, $user, $profile);
$signed_filename = $this->_ci->signaturelib->sign($temp_folder, $temp_filename, $user, $profile);
// If fine then return it
if (isSuccess($signed_filename)) return $signed_filename;
// Otherwise it is an error
return error($this->_ci->DocumentExportPhrases->t('global', 'unknown_error', ['error' => $result]));
return error($this->_ci->DocumentExportPhrases->t('global', 'unknown_error', ['error' => getError($signed_filename)]));
}
/**