diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index 589e2a3f55c..a28fc430caa 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "7.0.0", "6.0.5", "5.0.7" ); +return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" ); } sub script_dolibarr_release @@ -263,15 +263,16 @@ if ($upgrade) { local @params = ( [ "action", "upgrade" ], [ "versionfrom", $upgrade->{'version'} ], [ "versionto", $ver ], + [ "installlock", "444" ], ); local $p = $ver >= 3.8 ? "step5" : "etape5"; local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts); return (-1, "Dolibarr wizard failed : $err") if ($err); - # Remove the installation directory. - local $dinstall = "$opts->{'dir'}/install"; - $dinstall =~ s/\/$//; - $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall)); + # Remove the installation directory. (deprecated) + # local $dinstall = "$opts->{'dir'}/install"; + # $dinstall =~ s/\/$//; + # $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall)); } else { @@ -306,15 +307,18 @@ else { [ "login", "admin" ], [ "pass", $dompass ], [ "pass_verif", $dompass ], + [ "installlock", "444" ], ); local $p = $ver >= 3.8 ? "step5" : "etape5"; local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts); return (-1, "Dolibarr wizard failed : $err") if ($err); - # Remove the installation directory and protect config file. - local $dinstall = "$opts->{'dir'}/install"; - $dinstall =~ s/\/$//; - $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall)); + # Remove the installation directory (deprecated) + # local $dinstall = "$opts->{'dir'}/install"; + # $dinstall =~ s/\/$//; + # $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall)); + + # Protect config file &set_permissions_as_domain_user($d, 0644, $cfile); &set_permissions_as_domain_user($d, 0755, $cfiledir); } @@ -386,6 +390,8 @@ sub script_dolibarr_check_latest { local ($ver) = @_; local @vers = &osdn_package_versions("dolibarr", + $ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" : + $ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 6.0 ? "dolibarr\\-(6\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" : diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 97770d39e9d..b39f67dd3ba 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -57,6 +57,7 @@ $langs->loadLangs(array("admin", "install")); $login = GETPOST('login', 'alpha')?GETPOST('login', 'alpha'):(empty($argv[5])?'':$argv[5]); $pass = GETPOST('pass', 'alpha')?GETPOST('pass', 'alpha'):(empty($argv[6])?'':$argv[6]); $pass_verif = GETPOST('pass_verif', 'alpha')?GETPOST('pass_verif', 'alpha'):(empty($argv[7])?'':$argv[7]); +$force_install_lockinstall = (int) (! empty($force_install_lockinstall)?$force_install_lockinstall:(GETPOST('installlock','aZ09')?GETPOST('installlock','aZ09'):(empty($argv[8])?'':$argv[8]))); $success=0; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 08fa147fb0d..6ea7940d7a0 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4834,11 +4834,11 @@ function migrate_reload_menu($db,$langs,$conf,$versionto) function migrate_user_photospath() { global $conf, $db, $langs; - + print ''; print ''.$langs->trans('MigrationUserPhotoPath')."
\n"; - + include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $fuser = new User($db); @@ -4851,12 +4851,16 @@ function migrate_user_photospath() $fuser->fetch($obj->uid); //echo '
'.$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; - + $error = 0; - + $origin_osencoded=dol_osencode($origin); $destin_osencoded=dol_osencode($destin); dol_mkdir($destin); diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index e47ce27009d..6c0c79f7689 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -109,7 +109,7 @@ $langs->loadLangs(array("main", "bills", "cashdesk")); - +