Fix: si on utilise MSSQL on doit sélectionner MDB2 dans le fichier de conf

This commit is contained in:
Regis Houssin 2007-09-02 07:04:39 +00:00
parent 9b891ca98f
commit b07e12dac6
2 changed files with 16 additions and 5 deletions

View File

@ -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)

View File

@ -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="";');