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

develop
This commit is contained in:
ldestailleur 2025-03-19 16:04:50 +01:00
parent a8529cf1a2
commit c471f6b900

View file

@ -213,14 +213,14 @@ if (!empty($hashp)) {
$original_file = (($tmp[1] ? $tmp[1] . '/' : '') . $ecmfile->filename); // this is relative to module dir
}
$entity = $ecmfile->entity;
if (isModEnabled('multicompany') && !empty($ecmfile->src_object_type) && $ecmfile->src_object_id > 0) {
$object = fetchObjectByElement($ecmfile->src_object_id, $ecmfile->src_object_type);
if (is_object($object) && $object->id > 0) {
$entity = $object->entity;
}
}
$entity = $ecmfile->entity;
if (isModEnabled('multicompany') && !empty($ecmfile->src_object_type) && $ecmfile->src_object_id > 0) {
$object = fetchObjectByElement($ecmfile->src_object_id, $ecmfile->src_object_type);
if (is_object($object) && $object->id > 0) {
$entity = $object->entity;
}
}
if ($entity != $conf->entity) {
$conf->entity = $entity;
$conf->setValues($db);