From b07e12dac6f321e01a8fbe5faaba3b98874a644f Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Sun, 2 Sep 2007 07:04:39 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20si=20on=20utilise=20MSSQL=20on=20doit=20?= =?UTF-8?q?s=E9lectionner=20MDB2=20dans=20le=20fichier=20de=20conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/install/etape0.php | 10 +++++++--- htdocs/install/etape1.php | 11 +++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php index ebadf70c211..3c1a878fe77 100644 --- a/htdocs/install/etape0.php +++ b/htdocs/install/etape0.php @@ -78,15 +78,19 @@ if (isset($_POST["db_create_user"]) && $_POST["db_create_user"] == "on") if ($_POST["db_type"] == 'mysql' ||$_POST["db_type"] == 'mysqli') { $databasefortest='mysql'; - }elseif ($_POST["db_type"] == 'pgsql') + } + elseif ($_POST["db_type"] == 'pgsql') { $databasefortest='postgres'; } - else{ + else + { $databasefortest='mssql'; } $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"]); } if ($db->error) diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index e65920fe24f..4f333852b31 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -148,8 +148,15 @@ if ($_POST["action"] == "set") fputs($fp,"\n"); /* Authentication */ - fputs($fp, '$dolibarr_main_authentication="dolibarr";'); - fputs($fp,"\n"); + if ($_POST["db_type"] == 'mssql') + { + fputs($fp, '$dolibarr_main_authentication="dolibarr_mdb2";'); + } + else + { + fputs($fp, '$dolibarr_main_authentication="dolibarr";'); + } + fputs($fp,"\n"); /* Preparation integration SMARTY */ fputs($fp, '$dolibarr_smarty_libs_dir="";'); -- GitLab