浏览代码

Fix: missing host and port into object

Laurent Destailleur 10 年之前
父节点
当前提交
7bd27a13fa

+ 4 - 0
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

+ 2 - 0
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"))

+ 2 - 0
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;
 

+ 2 - 0
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;
 

+ 2 - 0
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;
 

+ 2 - 0
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;