Merge pull request #19313 from cfoellmann/PR/fix-holiday-docpreview

fix DocumentPreview on holiday documents
This commit is contained in:
Laurent Destailleur 2021-11-05 13:03:22 +01:00 committed by GitHub
commit 01b1ce5fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1373,7 +1373,7 @@ class FormFile
}
// Preview link
if (!$editline) {
print $this->showPreview($file, $modulepart, $filepath, 0, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity));
print $this->showPreview($file, $modulepart, $filepath, 0, 'entity='.(!empty($object->entity) ? $object->entity : $conf->entity));
}
print "</td>\n";

View File

@ -349,7 +349,7 @@ if ($object->id) {
$permissiontoadd = $user->rights->holiday->write;
$permtoedit = $user->rights->holiday->write;
$param = '&id='.$object->id;
$relativepathwithnofile = $modulepart.'/'.dol_sanitizeFileName($object->ref).'/';
$relativepathwithnofile = dol_sanitizeFileName($object->ref).'/';
$savingdocmask = dol_sanitizeFileName($object->ref).'-__file__';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';