Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
ldestailleur
2025-09-08 12:15:20 +02:00
148 changed files with 483 additions and 1015 deletions

View File

@@ -565,7 +565,7 @@ function setEntity($currentobject)
if (is_object($mc) && method_exists($mc, 'setEntity')) {
return $mc->setEntity($currentobject);
} else {
return ((is_object($currentobject) && $currentobject->id > 0 && $currentobject->entity > 0) ? $currentobject->entity : $conf->entity);
return ((is_object($currentobject) && $currentobject->id > 0 && ((int) $currentobject->entity) > 0) ? (int) $currentobject->entity : $conf->entity);
}
}
@@ -8766,7 +8766,7 @@ function yn($yesno, $format = 1, $color = 0)
/**
* Return a path to have a the directory according to object where files are stored.
* This function is called by getMultidirOutput
* New usage: $conf->module->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, '').'/'
* New usage: $conf->module->multidir_output[$object->entity ?? $conf->entity].'/'.get_exdir(0, 0, 0, 1, $object, '').'/'
* or: $conf->module->dir_output.'/'.get_exdir(0, 0, 0, 0, $object, '')
*
* Example of output with new usage: $object is invoice -> 'INYYMM-ABCD'