mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
FIX Logo on company is no more visible.
This commit is contained in:
@@ -7715,7 +7715,6 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '
|
|||||||
if (empty($level) && array_key_exists($modulepart, $arrayforoldpath)) {
|
if (empty($level) && array_key_exists($modulepart, $arrayforoldpath)) {
|
||||||
$level = $arrayforoldpath[$modulepart];
|
$level = $arrayforoldpath[$modulepart];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($level) && array_key_exists($modulepart, $arrayforoldpath)) {
|
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.
|
// 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)) {
|
if (empty($num) && is_object($object)) {
|
||||||
@@ -7740,8 +7739,12 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '
|
|||||||
// We will enhance here a common way of forging path for document storage.
|
// 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.
|
// In a future, we may distribute directories on several levels depending on setup and object.
|
||||||
// Here, $object->id, $object->ref and $modulepart are required.
|
// Here, $object->id, $object->ref and $modulepart are required.
|
||||||
//var_dump($modulepart);
|
if (in_array($modulepart, array('societe', 'thirdparty')) && $object instanceOf Societe) {
|
||||||
$path = dol_sanitizeFileName(empty($object->ref) ? (string) ((is_object($object) && property_exists($object, 'id')) ? $object->id : '') : $object->ref);
|
// 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)) {
|
if (empty($withoutslash) && !empty($path)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user