diff --git a/htdocs/lib/grant.postgres.php b/htdocs/lib/grant.postgres.php new file mode 100644 index 00000000000..2a0d1c3d9c7 --- /dev/null +++ b/htdocs/lib/grant.postgres.php @@ -0,0 +1,29 @@ + diff --git a/htdocs/lib/postgresql.lib.php b/htdocs/lib/pgsql.lib.php similarity index 97% rename from htdocs/lib/postgresql.lib.php rename to htdocs/lib/pgsql.lib.php index 0b823f4bdab..94d3465fb30 100644 --- a/htdocs/lib/postgresql.lib.php +++ b/htdocs/lib/pgsql.lib.php @@ -89,7 +89,7 @@ class DoliDb { // Essai connexion serveur - $this->db = $this->connect($host, $user, $pass); + $this->db = $this->connect($host, $user, $pass,$name); if ($this->db) { @@ -182,7 +182,7 @@ class DoliDb { else return 0; } - } + /*! \brief copie d'une database. @@ -488,6 +488,11 @@ class DoliDb { return pg_affected_rows($this->db); } + function getdsn() + { + $pear = $dolibarr_main_db_type.'://'.$dolibarr_main_db_user.':'.$dolibarr_main_db_pass.'@'.$dolibarr_main_db_host.'/'.$dolibarr_main_db_name; + return $pear; + } + } - ?>