diff --git a/build/debian/source/include-binaries b/build/debian/source/include-binaries new file mode 100644 index 00000000000..401eae93712 --- /dev/null +++ b/build/debian/source/include-binaries @@ -0,0 +1 @@ +htdocs/install/doctemplates/websites/website_template-corporate.zip \ No newline at end of file diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index bbdc82b1b8b..439063015b0 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -2922,9 +2922,9 @@ function migrate_project_task_actors($db,$langs,$conf) * @param Conf $conf Object conf * @param string $table Table name * @param int $fk_source Id of element source - * @param type $sourcetype Type of element source + * @param string $sourcetype Type of element source * @param int $fk_target Id of element target - * @param type $targettype Type of element target + * @param string $targettype Type of element target * @return void */ function migrate_relationship_tables($db,$langs,$conf,$table,$fk_source,$sourcetype,$fk_target,$targettype) @@ -4833,7 +4833,7 @@ function migrate_reload_menu($db,$langs,$conf,$versionto) */ function migrate_user_photospath() { - global $conf, $db, $langs; + global $conf, $db, $langs, $user; print ''; @@ -4842,6 +4842,8 @@ function migrate_user_photospath() include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $fuser = new User($db); + if (! is_object($user)) $user = $fuser; // To avoid error during migration + $sql = "SELECT rowid as uid from ".MAIN_DB_PREFIX."user"; // Get list of all users $resql = $db->query($sql); if ($resql) @@ -4858,47 +4860,56 @@ function migrate_user_photospath() } 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; + $origin = $dir .'/'. get_exdir($fuser->id,2,0,0,$fuser,'user'); + $destin = $dir .'/'. $fuser->id; - $error = 0; + $origin_osencoded=dol_osencode($origin); - $origin_osencoded=dol_osencode($origin); - $destin_osencoded=dol_osencode($destin); - dol_mkdir($destin); - //echo '
'.$origin.' -> '.$destin; - if (dol_is_dir($origin)) - { - $handle=opendir($origin_osencoded); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if ($file != '.' && $file != '..' && is_dir($origin_osencoded.'/'.$file)) - { - $thumbs = opendir($origin_osencoded.'/'.$file); - if (is_resource($thumbs)) - { - dol_mkdir($destin.'/'.$file); - while (($thumb = readdir($thumbs)) !== false) - { - dol_move($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb); - } - // dol_delete_dir($origin.'/'.$file); - } - } - else - { - if (dol_is_file($origin.'/'.$file) ) - { - dol_move($origin.'/'.$file, $destin.'/'.$file); - } - } - } - } - } + dol_mkdir($destin); + + //echo '
'.$origin.' -> '.$destin; + if (dol_is_dir($origin)) + { + $handle=opendir($origin_osencoded); + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + if ($file == '.' || $file == '..') continue; + + if (dol_is_dir($origin.'/'.$file)) // it is a dir (like 'thumbs') + { + $thumbs = opendir($origin_osencoded.'/'.$file); + if (is_resource($thumbs)) + { + dol_mkdir($destin.'/'.$file); + while (($thumb = readdir($thumbs)) !== false) + { + if (! dol_is_file($destin.'/'.$file.'/'.$thumb)) + { + if ($thumb == '.' || $thumb == '..') continue; + + print '.'; + dol_move($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb, 0, 0, 0, 0); + } + } + // dol_delete_dir($origin.'/'.$file); + } + } + else // it is a file + { + if (! dol_is_file($destin.'/'.$file)) + { + print '.'; + dol_move($origin.'/'.$file, $destin.'/'.$file, 0, 0, 0, 1); + } + } + } + } + } } } } diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 12333c0de9d..b2dd90608f7 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -149,13 +149,13 @@ TaskCreatedInDolibarr=Task %s created TaskModifiedInDolibarr=Task %s modified TaskDeletedInDolibarr=Task %s deleted OpportunityStatus=Lead status -OpportunityStatusShort=Opp. status +OpportunityStatusShort=Lead status OpportunityProbability=Lead probability -OpportunityProbabilityShort=Opp. probab. +OpportunityProbabilityShort=Lead probab. OpportunityAmount=Lead amount -OpportunityAmountShort=Opp. amount -OpportunityAmountAverageShort=Average Opp. amount -OpportunityAmountWeigthedShort=Weighted Opp. amount +OpportunityAmountShort=Lead amount +OpportunityAmountAverageShort=Average lead amount +OpportunityAmountWeigthedShort=Weighted lead amount WonLostExcluded=Won/Lost excluded ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Project leader @@ -234,4 +234,4 @@ DontHaveTheValidateStatus=The project %s must be open to be closed RecordsClosed=%s project(s) closed SendProjectRef=Information project %s ModuleSalaryToDefineHourlyRateMustBeEnabled=Module 'Payment of employee wages' must be enabled to define employee hourly rate to have time spent valorized -NewTaskRefSuggested=Task ref already used, a new task ref is suggested \ No newline at end of file +NewTaskRefSuggested=Task ref already used, a new task ref is suggested