diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 3662d2fd2b8..e65920fe24f 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -269,9 +269,15 @@ if ($_POST["action"] == "set") if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') { $databasefortest='mysql'; - }else{ + } + else if ($conf->db->type == 'pgsql') + { $databasefortest='postgres'; } + else if ($conf->db->type == 'mssql') + { + $databasefortest='mssql'; + } // Creation handler de base, verification du support et connexion diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index 70625847bac..bcdcc1e6a12 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -51,7 +51,8 @@ $langs->load("install"); if ($dolibarr_main_db_type == "mysql") $choix=1; if ($dolibarr_main_db_type == "mysqli") $choix=1; -if ($dolibarr_main_db_type == "pqsql") $choix=2; +if ($dolibarr_main_db_type == "pqsql") $choix=2; +if ($dolibarr_main_db_type == "mssql") $choix=3; dolibarr_install_syslog("etape2: Entering etape2.php page"); @@ -113,7 +114,8 @@ if ($_POST["action"] == "set") if ($ok) { if ($choix==1) $dir = "../../mysql/tables/"; - else $dir = "../../pgsql/tables/"; + elseif ($choix==2) $dir = "../../pgsql/tables/"; + elseif ($choix==3) $dir = "../../mssql/tables/"; $ok = 0; $handle=opendir($dir); @@ -183,7 +185,8 @@ if ($_POST["action"] == "set") if ($ok) { if ($choix==1) $dir = "../../mysql/tables/"; - else $dir = "../../pgsql/tables/"; + elseif ($choix==2) $dir = "../../pgsql/tables/"; + elseif ($choix==3) $dir = "../../mssql/tables/"; $okkeys = 0; $handle=opendir($dir); @@ -302,7 +305,8 @@ if ($_POST["action"] == "set") if ($ok) { if ($choix==1) $dir = "../../mysql/functions/"; - else $dir = "../../pgsql/functions/"; + elseif ($choix==2) $dir = "../../pgsql/functions/"; + elseif ($choix==3) $dir = "../../mssql/functions/"; // Création données $file = "functions.sql"; @@ -368,7 +372,8 @@ if ($_POST["action"] == "set") if ($ok) { if ($choix==1) $dir = "../../mysql/data/"; - else $dir = "../../pgsql/data/"; + elseif ($choix==2) $dir = "../../pgsql/data/"; + elseif ($choix==3) $dir = "../../mssql/data/"; // Création données $file = "data.sql"; diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 94ed4bb7fc5..59bacad1687 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -211,12 +211,14 @@ while (($file = readdir($handle))!==false) if ($type=='mysql') { $versionbasemin=array(3,1,0); $testfunction='mysql_connect'; } if ($type=='mysqli') { $versionbasemin=array(4,1,0); $testfunction='mysqli_connect'; } if ($type=='pgsql') { $versionbasemin=array(8,1,0); $testfunction='pg_connect'; } + if ($type=='mssql') { $versionbasemin=array(2000,0,0); $testfunction='mssql_connect'; } // Remarques $note=''; if ($type=='mysql') $note='(Mysql >= '.versiontostring($versionbasemin).')'; if ($type=='mysqli') $note='(Mysql >= '.versiontostring($versionbasemin).')'; if ($type=='pgsql') $note='(Postgresql >= '.versiontostring($versionbasemin).')'; + if ($type=='mssql') $note='(MSDE >= '.versiontostring($versionbasemin).')'; // Affiche ligne dans liste $option.='