diff options
-rw-r--r-- | application/errors/error_404.php | 1 | ||||
-rw-r--r-- | application/errors/error_db.php | 1 | ||||
-rw-r--r-- | application/errors/error_general.php | 1 | ||||
-rwxr-xr-x | system/core/CodeIgniter.php | 20 | ||||
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 19 | ||||
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 21 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
7 files changed, 13 insertions, 51 deletions
diff --git a/application/errors/error_404.php b/application/errors/error_404.php index 792726a67..bddee6cc6 100644 --- a/application/errors/error_404.php +++ b/application/errors/error_404.php @@ -1,6 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> +<meta charset="utf-8"> <title>404 Page Not Found</title> <style type="text/css"> diff --git a/application/errors/error_db.php b/application/errors/error_db.php index b396cda9f..bc7c4478a 100644 --- a/application/errors/error_db.php +++ b/application/errors/error_db.php @@ -1,6 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> +<meta charset="utf-8"> <title>Database Error</title> <style type="text/css"> diff --git a/application/errors/error_general.php b/application/errors/error_general.php index fd63ce2c5..8b3746285 100644 --- a/application/errors/error_general.php +++ b/application/errors/error_general.php @@ -1,6 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> +<meta charset="utf-8"> <title>Error</title> <style type="text/css"> diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index aca4fb23c..9f88384b1 100755 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -33,28 +33,8 @@ * @var string * */ - /** - * CodeIgniter Version - * - * @var string - * - */ define('CI_VERSION', '2.1.0-dev'); -/** - * CodeIgniter Branch (Core = TRUE, Reactor = FALSE) - * - * @var boolean - * - */ - /** - * CodeIgniter Branch (Core = TRUE, Reactor = FALSE) - * - * @var string - * - */ - define('CI_CORE', FALSE); - /* * ------------------------------------------------------ * Load the global functions diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index f87cfea4b..dc020c624 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -56,7 +56,7 @@ class CI_DB_mysql_driver extends CI_DB { // whether SET NAMES must be used to set the character set var $use_set_names; - + /** * Non-persistent database connection * @@ -135,20 +135,9 @@ class CI_DB_mysql_driver extends CI_DB { */ function db_set_charset($charset, $collation) { - if ( ! isset($this->use_set_names)) - { - // mysql_set_charset() requires PHP >= 5.2.3 and MySQL >= 5.0.7, use SET NAMES as fallback - $this->use_set_names = (version_compare(PHP_VERSION, '5.2.3', '>=') && version_compare(mysql_get_server_info(), '5.0.7', '>=')) ? FALSE : TRUE; - } - - if ($this->use_set_names === TRUE) - { - return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id); - } - else - { - return @mysql_set_charset($charset, $this->conn_id); - } + return function_exists('mysql_set_charset') + ? @mysql_set_charset($charset, $this->conn_id) + : @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index ccd110f79..abef80fbd 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -56,7 +56,7 @@ class CI_DB_mysqli_driver extends CI_DB { // whether SET NAMES must be used to set the character set var $use_set_names; - + // -------------------------------------------------------------------- /** @@ -135,20 +135,9 @@ class CI_DB_mysqli_driver extends CI_DB { */ function _db_set_charset($charset, $collation) { - if ( ! isset($this->use_set_names)) - { - // mysqli_set_charset() requires MySQL >= 5.0.7, use SET NAMES as fallback - $this->use_set_names = (version_compare(mysqli_get_server_info($this->conn_id), '5.0.7', '>=')) ? FALSE : TRUE; - } - - if ($this->use_set_names === TRUE) - { - return @mysqli_query($this->conn_id, "SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'"); - } - else - { - return @mysqli_set_charset($this->conn_id, $charset); - } + 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)."'"); } // -------------------------------------------------------------------- @@ -570,7 +559,7 @@ class CI_DB_mysqli_driver extends CI_DB { { return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values); } - + // -------------------------------------------------------------------- /** diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 671aa969f..881d46474 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -113,6 +113,7 @@ Change Log <li>Core <ul> <li>Changed private functions in CI_URI to protected so MY_URI can override them.</li> + <li>Removed CI_CORE boolean constant from CodeIgniter.php (no longer Reactor and Core versions).</li> </ul> </li> </ul> |