Laurent Destailleur 1 سال پیش
والد
کامیت
ce6b2d06db
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      htdocs/don/document.php

+ 4 - 1
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