From 7bd27a13fab3e3bfe9121e0c1124f759f7ca10cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Oct 2014 19:41:06 +0100 Subject: [PATCH] Fix: missing host and port into object --- htdocs/core/db/DoliDB.class.php | 4 ++++ htdocs/core/db/mssql.class.php | 2 ++ htdocs/core/db/mysql.class.php | 2 ++ htdocs/core/db/mysqli.class.php | 2 ++ htdocs/core/db/pgsql.class.php | 2 ++ htdocs/core/db/sqlite.class.php | 2 ++ 6 files changed, 14 insertions(+) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index dc4b127ffaa..21f0001b7e7 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -46,6 +46,10 @@ abstract class DoliDB implements Database public $database_name; //! Database username public $database_user; + //! Database host + public $database_host; + //! Database port + public $database_port; //! >=1 if a transaction is opened, 0 otherwise public $transaction_opened; //! Last successful query diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index c823fdafe49..a8f9e9aff50 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -60,6 +60,8 @@ class DoliDBMssql extends DoliDB global $conf,$langs; $this->database_user=$user; + $this->database_host=$host; + $this->database_port=$port; $this->transaction_opened=0; if (! function_exists("mssql_connect")) diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index a52283ef32e..dc0cbb1cb1b 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -61,6 +61,8 @@ class DoliDBMysql extends DoliDB if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation; $this->database_user=$user; + $this->database_host=$host; + $this->database_port=$port; $this->transaction_opened=0; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 4a2ded2d022..9ec495f7ca5 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -61,6 +61,8 @@ class DoliDBMysqli extends DoliDB if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation; $this->database_user=$user; + $this->database_host=$host; + $this->database_port=$port; $this->transaction_opened=0; diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 81b80a9f724..a7baf59783d 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -71,6 +71,8 @@ class DoliDBPgsql extends DoliDB if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation; $this->database_user=$user; + $this->database_host=$host; + $this->database_port=$port; $this->transaction_opened=0; diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index dc364081e24..53ecb880dce 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -61,6 +61,8 @@ class DoliDBSqlite extends DoliDB if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation; $this->database_user=$user; + $this->database_host=$host; + $this->database_port=$port; $this->transaction_opened=0;