Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 6, 2018
1 parent 6d093b0 commit 30abedb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions htdocs/install/upgrade2.php
Expand Up @@ -4848,16 +4848,20 @@ function migrate_user_photospath()
{
while ($obj = $db->fetch_object($resql))
{
print '.';

$fuser->fetch($obj->uid);
//echo '<hr>'.$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;

Expand Down Expand Up @@ -4895,6 +4899,7 @@ function migrate_user_photospath()
}
}
}
}
}
}

Expand Down

0 comments on commit 30abedb

Please sign in to comment.