diff --git a/htdocs/install/check.php b/htdocs/install/check.php index c48f4c7f599..dae2a0e4a8a 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -35,11 +35,11 @@ $langs->setDefaultLang($setuplang); $langs->load("install"); -// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard. -if (! isset($force_install_dolibarrlogin)) $force_install_dolibarrlogin=''; +// Now we load forced value from install.forced.php file. $useforcedwizard=false; -if (@file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); } -else if (@file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); } +$forcedfile="./install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; +if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); } dolibarr_install_syslog("Dolibarr install/upgrade process started"); diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index b57b0e8a1c3..9859b7ed02e 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -43,10 +43,11 @@ $passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:""; // Repertoire des pages dolibarr $main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):''; -// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard. +// Now we load forced value from install.forced.php file. $useforcedwizard=false; -if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); } -else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); } +$forcedfile="./install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; +if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); } dolibarr_install_syslog("--- etape1: Entering etape1.php page"); diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index 59ea5ec8bba..b8373847c25 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -52,10 +52,11 @@ if ($dolibarr_main_db_type == "pgsql") $choix=2; if ($dolibarr_main_db_type == "mssql") $choix=3; //if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into etape2.php page'); -// Init "forced values" to nothing. "forced values" are used after a Doliwamp install wizard. +// Now we load forced value from install.forced.php file. $useforcedwizard=false; -if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); } -else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); } +$forcedfile="./install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; +if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); } dolibarr_install_syslog("--- etape2: Entering etape2.php page"); diff --git a/htdocs/install/etape4.php b/htdocs/install/etape4.php index d9f27fe4e32..eb392ae2e86 100644 --- a/htdocs/install/etape4.php +++ b/htdocs/install/etape4.php @@ -36,11 +36,11 @@ $langs->setDefaultLang($setuplang); $langs->load("admin"); $langs->load("install"); -// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard. -if (! isset($force_install_dolibarrlogin)) $force_install_dolibarrlogin=''; +// Now we load forced value from install.forced.php file. $useforcedwizard=false; -if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); } -else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); } +$forcedfile="./install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; +if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once($forcedfile); } dolibarr_install_syslog("--- etape4: Entering etape4.php page"); @@ -74,7 +74,7 @@ $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db- if ($db->ok == 1) { print '