|
@@ -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
|