Fix: Regression selectlang choice
Fix: Regression conf file was not saved successfully.
This commit is contained in:
parent
2a8095f3de
commit
ac38954c17
@ -30,7 +30,7 @@ $allowinstall = 0;
|
||||
$allowupgrade = 0;
|
||||
$checksok = 1;
|
||||
|
||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:$langs->getDefaultLang());
|
||||
$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):$langs->getDefaultLang();
|
||||
$langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("install");
|
||||
|
||||
@ -259,8 +259,8 @@ if (! $error && $db->connected)
|
||||
|
||||
print '<input type="hidden" name="dolibarr_main_db_character_set" value="'.$defaultCharacterSet.'">';
|
||||
print '<input type="hidden" name="dolibarr_main_db_collation" value="'.$defaultCollationConnection.'">';
|
||||
$_POST['dolibarr_main_db_character_set']=$defaultCharacterSet;
|
||||
$_POST['dolibarr_main_db_collation']=$defaultCollationConnection;
|
||||
$db_character_set=$defaultCharacterSet;
|
||||
$db_collation=$defaultCollationConnection;
|
||||
}
|
||||
|
||||
|
||||
@ -772,11 +772,11 @@ function write_master_file($masterfile,$main_dir)
|
||||
function write_conf_file($conffile)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $_POST,$main_dir,$main_data_dir,$main_force_https,$main_use_alt_dir,$main_alt_dir_name,$main_db_prefix;
|
||||
global $main_url,$main_dir,$main_data_dir,$main_force_https,$main_use_alt_dir,$main_alt_dir_name,$main_db_prefix;
|
||||
global $dolibarr_main_url_root,$dolibarr_main_document_root,$dolibarr_main_data_root,$dolibarr_main_db_host;
|
||||
global $dolibarr_main_db_port,$dolibarr_main_db_name,$dolibarr_main_db_user,$dolibarr_main_db_pass;
|
||||
global $dolibarr_main_db_type,$dolibarr_main_db_character_set,$dolibarr_main_db_collation,$dolibarr_main_authentication;
|
||||
global $db_host,$db_port,$db_name,$db_user,$db_pass,$db_type;
|
||||
global $db_host,$db_port,$db_name,$db_user,$db_pass,$db_type,$db_character_set,$db_collation;
|
||||
global $conffile,$conffiletoshow,$conffiletoshowshort;
|
||||
global $force_dolibarr_lib_ADODB_PATH, $force_dolibarr_lib_NUSOAP_PATH;
|
||||
global $force_dolibarr_lib_TCPDF_PATH, $force_dolibarr_lib_FPDI_PATH;
|
||||
@ -787,7 +787,7 @@ function write_conf_file($conffile)
|
||||
|
||||
$error=0;
|
||||
|
||||
$key = md5(uniqid(mt_rand(),TRUE)); // Genere un hash d'un nombre aleatoire
|
||||
$key = md5(uniqid(mt_rand(),TRUE)); // Generate random hash
|
||||
|
||||
$fp = fopen("$conffile", "w");
|
||||
if($fp)
|
||||
@ -837,10 +837,10 @@ function write_conf_file($conffile)
|
||||
fputs($fp, '$dolibarr_main_db_type=\''.str_replace("'","\'",($db_type)).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_character_set=\''.str_replace("'","\'",($_POST["dolibarr_main_db_character_set"])).'\';');
|
||||
fputs($fp, '$dolibarr_main_db_character_set=\''.str_replace("'","\'",($db_character_set)).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
fputs($fp, '$dolibarr_main_db_collation=\''.str_replace("'","\'",($_POST["dolibarr_main_db_collation"])).'\';');
|
||||
fputs($fp, '$dolibarr_main_db_collation=\''.str_replace("'","\'",($db_collation)).'\';');
|
||||
fputs($fp,"\n");
|
||||
|
||||
/* Authentication */
|
||||
|
||||
@ -39,7 +39,7 @@ error_reporting(0); // Disable all errors
|
||||
error_reporting($err);
|
||||
|
||||
$action=GETPOST('action');
|
||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
|
||||
$setuplang=(GETPOST('selectlang','',3)?GETPOST('selectlang','',3):'auto');
|
||||
$langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
@ -30,7 +30,7 @@ require_once $dolibarr_main_document_root.'/core/class/conf.class.php';
|
||||
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
|
||||
|
||||
|
||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
|
||||
$setuplang=(GETPOST('selectlang','',3)?GETPOST('selectlang','',3):'auto');
|
||||
$langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
|
||||
@ -30,7 +30,7 @@ include_once 'inc.php';
|
||||
|
||||
$err=0;
|
||||
|
||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:(isset($_GET["lang"])?$_GET["lang"]:'auto'));
|
||||
$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):(isset($_GET["lang"])?$_GET["lang"]:'auto');
|
||||
$langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("install");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user