forked from Wavyzz/dolibarr
Dbut implmentation base MSSQL
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc..php
|
||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
|
||||
|
||||
include_once("./inc.php");
|
||||
|
||||
@@ -69,7 +69,7 @@ $passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
|
||||
$main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):'';
|
||||
|
||||
/**
|
||||
* Si l'utilisateur n'est pas cr<63><72> d<>j<EFBFBD> cr<63><72>, on se connecte <20> l'aide du login root'
|
||||
* Si l'utilisateur n'est pas d<>j<EFBFBD> cr<63><72>, on se connecte <20> l'aide du login root'
|
||||
*/
|
||||
require_once($main_dir."/lib/databases/".$_POST["db_type"].".lib.php");
|
||||
if (isset($_POST["db_create_user"]) && $_POST["db_create_user"] == "on")
|
||||
|
||||
@@ -51,7 +51,7 @@ $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 == "pgsql") $choix=2;
|
||||
if ($dolibarr_main_db_type == "mssql") $choix=3;
|
||||
|
||||
dolibarr_install_syslog("etape2: Entering etape2.php page");
|
||||
|
||||
@@ -598,7 +598,7 @@ class DoliDb
|
||||
function getGrantForUserQuery($databaseuser)
|
||||
{
|
||||
// Scan tables pour g<>n<EFBFBD>rer le grant
|
||||
$dir = DOL_DOCUMENT_ROOT."/pgsql/tables";
|
||||
/*$dir = DOL_DOCUMENT_ROOT."/pgsql/tables";
|
||||
|
||||
$handle=opendir($dir);
|
||||
$table_list="";
|
||||
@@ -618,6 +618,8 @@ class DoliDb
|
||||
// Genere le grant_query
|
||||
$grant_query = 'GRANT ALL ON '.$table_list.' TO "'.$databaseuser.'";';
|
||||
return $grant_query;
|
||||
*/
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -680,5 +682,56 @@ class DoliDb
|
||||
$liste=$this->fetch_array($resql);
|
||||
return $liste['server_encoding'];
|
||||
}
|
||||
|
||||
function getListOfCharacterSet(){
|
||||
$resql=$this->query('SHOW CHARSET');
|
||||
$liste = array();
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
while ($obj = $this->fetch_object($resql) )
|
||||
{
|
||||
$liste[$i]['charset'] = $obj->Charset;
|
||||
$liste[$i]['description'] = $obj->Description;
|
||||
$i++;
|
||||
}
|
||||
$this->free($resql);
|
||||
} else {
|
||||
// version Mysql < 4.1.1
|
||||
return null;
|
||||
}
|
||||
return $liste;
|
||||
}
|
||||
|
||||
function getDefaultCollationConnection(){
|
||||
$resql=$this->query('SHOW VARIABLES LIKE \'collation_database\'');
|
||||
if (!$resql)
|
||||
{
|
||||
// version Mysql < 4.1.1
|
||||
return $this->forcecollate;
|
||||
}
|
||||
$liste=$this->fetch_array($resql);
|
||||
return $liste['Value'];
|
||||
}
|
||||
|
||||
function getListOfCollation(){
|
||||
$resql=$this->query('SHOW COLLATION');
|
||||
$liste = array();
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
while ($obj = $this->fetch_object($resql) )
|
||||
{
|
||||
$liste[$i]['collation'] = $obj->Collation;
|
||||
$i++;
|
||||
}
|
||||
$this->free($resql);
|
||||
} else {
|
||||
// version Mysql < 4.1.1
|
||||
return null;
|
||||
}
|
||||
return $liste;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user