From 58ae45a88bd29fb66eeeb24f5d95b54e92cd2ffa Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Thu, 4 Nov 2021 13:57:47 +0100 Subject: [PATCH] fix DocumentPreview on holiday documents --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/holiday/document.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index ffa441c0527..6f0a79d9383 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -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 "\n"; diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 6986d75d630..b11b795723c 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -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';