diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-21 20:05:27 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-21 20:05:27 -0800 |
commit | 9285c8c66c530196399eb05bb5561c3fa5538335 (patch) | |
tree | 7cec68583c01b5b365e7669fefc1adc6360e89a5 /system/libraries/Database_Mysql.php | |
parent | 9c5df1d31bd214fab051b71d092c751a1da20ecc (diff) |
Updated Kohana to r4724
Diffstat (limited to 'system/libraries/Database_Mysql.php')
-rw-r--r-- | system/libraries/Database_Mysql.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/system/libraries/Database_Mysql.php b/system/libraries/Database_Mysql.php index cb531194..a5775037 100644 --- a/system/libraries/Database_Mysql.php +++ b/system/libraries/Database_Mysql.php @@ -2,7 +2,7 @@ /** * MySQL database connection. * - * $Id: Database_Mysql.php 4684 2009-11-18 14:26:48Z isaiah $ + * $Id: Database_Mysql.php 4712 2009-12-10 21:47:09Z cbandy $ * * @package Kohana * @author Kohana Team @@ -31,16 +31,15 @@ class Database_Mysql_Core extends Database { extract($this->config['connection']); - // Set the connection type - $connect = ($this->config['persistent'] === TRUE) ? 'mysql_pconnect' : 'mysql_connect'; - $host = isset($host) ? $host : $socket; $port = isset($port) ? ':'.$port : ''; try { // Connect to the database - $this->connection = $connect($host.$port, $user, $pass, TRUE); + $this->connection = ($this->config['persistent'] === TRUE) + ? mysql_pconnect($host.$port, $user, $pass, $params) + : mysql_connect($host.$port, $user, $pass, TRUE, $params); } catch (Kohana_PHP_Exception $e) { |