diff options
author | Mike Funk <mfunk@xulonpress.com> | 2012-03-12 14:44:42 +0100 |
---|---|---|
committer | Mike Funk <mfunk@xulonpress.com> | 2012-03-12 14:44:42 +0100 |
commit | 306f56c1bfdafd149b1059325a687ec1a185d00f (patch) | |
tree | 62e2261c3b429153b9e62f3f676d7de6c18a6bfb /system/database/drivers/mysqli/mysqli_driver.php | |
parent | db70d047a6ac256eb336a2b04385aa010d6cbf42 (diff) | |
parent | b3442a165a091c552a3331ece94297d5fe316fee (diff) |
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into feature/all_flashdata
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_driver.php')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index d06119a13..e84b8346d 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -2,7 +2,7 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.1.6 or newer + * An open source application development framework for PHP 5.2.4 or newer * * NOTICE OF LICENSE * @@ -149,9 +149,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ protected function _db_set_charset($charset, $collation) { - return function_exists('mysqli_set_charset') - ? @mysqli_set_charset($this->conn_id, $charset) - : @mysqli_query($this->conn_id, "SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'"); + return @mysqli_set_charset($this->conn_id, $charset); } // -------------------------------------------------------------------- @@ -289,18 +287,7 @@ class CI_DB_mysqli_driver extends CI_DB { return $str; } - if (function_exists('mysqli_real_escape_string') && is_object($this->conn_id)) - { - $str = mysqli_real_escape_string($this->conn_id, $str); - } - elseif (function_exists('mysql_escape_string')) - { - $str = mysql_escape_string($str); - } - else - { - $str = addslashes($str); - } + $str = is_object($this->conn_id) ? mysqli_real_escape_string($this->conn_id, $str) : addslashes($str); // escape LIKE condition wildcards if ($like === TRUE) |