diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 50409fb55e5..7e6d15115d5 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -35,7 +35,7 @@ $allowinstall = 0; $allowupgrade = false; $checksok = 1; -$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):$langs->getDefaultLang(); +$setuplang=GETPOST("selectlang",'az09',3)?GETPOST("selectlang",'az09',3):$langs->getDefaultLang(); $langs->setDefaultLang($setuplang); $langs->load("install"); @@ -345,6 +345,10 @@ else $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; $conf->setValues($db); + // Reset forced setup after the setValues + if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); + $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; + // Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE // Version to install is DOL_VERSION $dolibarrlastupgradeversionarray=preg_split('/[\.-]/',isset($conf->global->MAIN_VERSION_LAST_UPGRADE) ? $conf->global->MAIN_VERSION_LAST_UPGRADE : (isset($conf->global->MAIN_VERSION_LAST_INSTALL)?$conf->global->MAIN_VERSION_LAST_INSTALL:'')); diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 4f2e5f53201..bc2f165a30c 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -42,10 +42,8 @@ error_reporting(0); @set_time_limit(120); error_reporting($err); -$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):'auto'; +$setuplang=GETPOST("selectlang",'az09',3)?GETPOST("selectlang",'az09',3):'auto'; $langs->setDefaultLang($setuplang); -$versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($argv[1])?'':$argv[1]); -$versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); $langs->loadLangs(array("admin","install","other")); @@ -155,7 +153,9 @@ if ($ok) } $conf->setValues($db); - +// Reset forced setup after the setValues +if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); +$conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; /* Start action here */ @@ -588,8 +588,6 @@ if ($ok && GETPOST('clean_menus','alpha')) // clean_orphelin_dir: Run purge of directory if ($ok && GETPOST('clean_orphelin_dir','alpha')) { - $conf->setValues($db); - $listmodulepart=array('company','invoice','invoice_supplier','propal','order','order_supplier','contract','tax'); foreach ($listmodulepart as $modulepart) { diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index b7d320aab59..df8ec9812c1 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -165,6 +165,9 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action)) if ($db->connected) { $conf->setValues($db); + // Reset forced setup after the setValues + if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); + $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; // Create admin user include_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php'; @@ -295,6 +298,9 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action)) if ($db->connected) { $conf->setValues($db); + // Reset forced setup after the setValues + if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); + $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; // Define if we need to update the MAIN_VERSION_LAST_UPGRADE value in database $tagdatabase=false; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 430c6f46c94..6dbcae4cd24 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -163,7 +163,13 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; // Chargement config - if (! $error) $conf->setValues($db); + if (! $error) + { + $conf->setValues($db); + // Reset forced setup after the setValues + if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); + $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; + } /***************************************************************************************