diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-04 14:08:24 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-04 14:08:24 +0200 |
commit | e4c30195c5f6dc7a144cfe4ee160b18626626612 (patch) | |
tree | 737686c04a05b8d4e21415f37018ea9453738cb0 /system/database/drivers/mysqli/mysqli_driver.php | |
parent | 9ba661b02c492e89028e5c67b7edbfc0efefc9f1 (diff) |
Revert/optimize some changes from 48a2baf0e288accd206f5da5031d29076e130792
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_driver.php')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 5814aceb9..02f893755 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -71,9 +71,9 @@ class CI_DB_mysqli_driver extends CI_DB { */ public function db_connect() { - return ($this->port !== '') - ? @new mysqli($this->hostname, $this->username, $this->password, $this->database, $this->port) - : @new mysqli($this->hostname, $this->username, $this->password, $this->database); + return empty($this->port) + ? @new mysqli($this->hostname, $this->username, $this->password, $this->database) + : @new mysqli($this->hostname, $this->username, $this->password, $this->database, $this->port); } // -------------------------------------------------------------------- @@ -91,9 +91,9 @@ class CI_DB_mysqli_driver extends CI_DB { return $this->db_connect(); } - return ($this->port !== '') - ? @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database, $this->port) - : @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database); + return empty($this->port) + ? @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database) + : @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database, $this->port); } // -------------------------------------------------------------------- |