Fix: si on utilise MSSQL on doit sélectionner MDB2 dans le fichier de conf
This commit is contained in:
parent
9b891ca98f
commit
b07e12dac6
@ -78,15 +78,19 @@ if (isset($_POST["db_create_user"]) && $_POST["db_create_user"] == "on")
|
|||||||
if ($_POST["db_type"] == 'mysql' ||$_POST["db_type"] == 'mysqli')
|
if ($_POST["db_type"] == 'mysql' ||$_POST["db_type"] == 'mysqli')
|
||||||
{
|
{
|
||||||
$databasefortest='mysql';
|
$databasefortest='mysql';
|
||||||
}elseif ($_POST["db_type"] == 'pgsql')
|
}
|
||||||
|
elseif ($_POST["db_type"] == 'pgsql')
|
||||||
{
|
{
|
||||||
$databasefortest='postgres';
|
$databasefortest='postgres';
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
$databasefortest='mssql';
|
$databasefortest='mssql';
|
||||||
}
|
}
|
||||||
$db = new DoliDb($_POST["db_type"],$_POST["db_host"],$userroot,$passroot,$databasefortest);
|
$db = new DoliDb($_POST["db_type"],$_POST["db_host"],$userroot,$passroot,$databasefortest);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$db = new DoliDb($_POST["db_type"],$_POST["db_host"],$_POST["db_user"],$_POST["db_pass"],$_POST["db_name"]);
|
$db = new DoliDb($_POST["db_type"],$_POST["db_host"],$_POST["db_user"],$_POST["db_pass"],$_POST["db_name"]);
|
||||||
}
|
}
|
||||||
if ($db->error)
|
if ($db->error)
|
||||||
|
|||||||
@ -148,8 +148,15 @@ if ($_POST["action"] == "set")
|
|||||||
fputs($fp,"\n");
|
fputs($fp,"\n");
|
||||||
|
|
||||||
/* Authentication */
|
/* Authentication */
|
||||||
fputs($fp, '$dolibarr_main_authentication="dolibarr";');
|
if ($_POST["db_type"] == 'mssql')
|
||||||
fputs($fp,"\n");
|
{
|
||||||
|
fputs($fp, '$dolibarr_main_authentication="dolibarr_mdb2";');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fputs($fp, '$dolibarr_main_authentication="dolibarr";');
|
||||||
|
}
|
||||||
|
fputs($fp,"\n");
|
||||||
|
|
||||||
/* Preparation integration SMARTY */
|
/* Preparation integration SMARTY */
|
||||||
fputs($fp, '$dolibarr_smarty_libs_dir="";');
|
fputs($fp, '$dolibarr_smarty_libs_dir="";');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user