FIX Logo on company is no more visible.

This commit is contained in:
ldestailleur
2025-08-12 13:26:52 +02:00
parent 30e262fd2d
commit a9c07569fb

View File

@@ -7715,7 +7715,6 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '
if (empty($level) && array_key_exists($modulepart, $arrayforoldpath)) {
$level = $arrayforoldpath[$modulepart];
}
if (!empty($level) && array_key_exists($modulepart, $arrayforoldpath)) {
// This part should be removed once all code is using "get_exdir" to forge path, with parameter $object and $modulepart provided.
if (empty($num) && is_object($object)) {
@@ -7740,9 +7739,13 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '
// We will enhance here a common way of forging path for document storage.
// In a future, we may distribute directories on several levels depending on setup and object.
// Here, $object->id, $object->ref and $modulepart are required.
//var_dump($modulepart);
if (in_array($modulepart, array('societe', 'thirdparty')) && $object instanceOf Societe) {
// Special case for thirdparty, where the ref is a company name that is not unique so path on disk is using the ID instead of the ref
$path = dol_sanitizeFileName($object->id);
} else {
$path = dol_sanitizeFileName(empty($object->ref) ? (string) ((is_object($object) && property_exists($object, 'id')) ? $object->id : '') : $object->ref);
}
}
if (empty($withoutslash) && !empty($path)) {
$path .= '/';