From ce6b2d06dbee176c031eb63e1899345e272c3405 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Jul 2023 14:14:04 +0200 Subject: [PATCH] FIX #25223 --- htdocs/don/document.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 030ca5cb085..c04d6e4a760 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -77,7 +77,10 @@ if (!$sortfield) { $object = new Don($db); $object->fetch($id, $ref); -$upload_dir = $conf->don->dir_output.'/'.get_exdir($filename, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref); +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->don->multidir_output[$object->entity ? $object->entity : $conf->entity]."/".get_exdir(0, 0, 0, 1, $object); +} + $modulepart = 'don'; $permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php