Merge pull request #10173 from hregis/develop_upgrade

FIX wrong path, multidir_output[] for each entity is construct by the multicompany module
This commit is contained in:
Laurent Destailleur 2018-12-04 13:39:05 +01:00 committed by GitHub
commit d2e8aeb8c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4851,7 +4851,11 @@ function migrate_user_photospath()
$fuser->fetch($obj->uid);
//echo '<hr>'.$fuser->id.' -> '.$fuser->entity;
$entity = (!empty($fuser->entity)) ? $fuser->entity : 1;
$dir = $conf->user->multidir_output[$entity];
if ($entity > 1) {
$dir = DOL_DATA_ROOT . '/' . $entity . '/users';
} else {
$dir = $conf->user->multidir_output[$entity]; // $conf->user->multidir_output[] for each entity is construct by the multicompany module
}
$origin = $dir .'/'. get_exdir($fuser->id,2,0,0,$fuser,'user');
$destin = $dir.'/'.$fuser->id;