From 30abedbcbdeefbefd5c599a967a53e1cb8893a3d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Dec 2018 19:29:11 +0100 Subject: [PATCH] Minor fix --- htdocs/install/upgrade2.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 6ea7940d7a0..bbdc82b1b8b 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4848,16 +4848,20 @@ function migrate_user_photospath() { while ($obj = $db->fetch_object($resql)) { + print '.'; + $fuser->fetch($obj->uid); //echo '
'.$fuser->id.' -> '.$fuser->entity; - $entity = (!empty($fuser->entity)) ? $fuser->entity : 1; + $entity = (empty($fuser->entity) ? 1 : $fuser->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 } + if ($dir) + { $origin = $dir .'/'. get_exdir($fuser->id,2,0,0,$fuser,'user'); - $destin = $dir.'/'.$fuser->id; + $destin = $dir .'/'. $fuser->id; $error = 0; @@ -4895,6 +4899,7 @@ function migrate_user_photospath() } } } + } } }