diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php index 9f967a74eaf..ee9f1a2f2f0 100644 --- a/htdocs/install/etape0.php +++ b/htdocs/install/etape0.php @@ -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éé déjà créé, on se connecte à l'aide du login root' +* Si l'utilisateur n'est pas déjà créé, on se connecte à 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") diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index bcdcc1e6a12..47995acca28 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -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"); diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php index 2d1e9e55b85..420d6a6157a 100644 --- a/htdocs/lib/databases/pgsql.lib.php +++ b/htdocs/lib/databases/pgsql.lib.php @@ -598,7 +598,7 @@ class DoliDb function getGrantForUserQuery($databaseuser) { // Scan tables pour géné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; + } + } ?> diff --git a/mssql/functions/functions.sql b/mssql/functions/functions.sql index 39b4145f2cc..8afd953f8f8 100644 Binary files a/mssql/functions/functions.sql and b/mssql/functions/functions.sql differ