From 2a97c7db940e94a115dea863708f587e58d26be4 Mon Sep 17 00:00:00 2001 From: John Wright Date: Mon, 16 Jan 2012 15:09:19 -0800 Subject: It appears the Security class has been added to the system/core folder and is loaded automatically as well. Using $this->load->library('security'); in controllers currently returns FALSE, yet you might not notice because the Security class is already loaded. I discovered this because of a custom Loader class I was using returned an error when loading the Security class. --- user_guide_src/source/general/core_classes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/general/core_classes.rst b/user_guide_src/source/general/core_classes.rst index ac41407f7..4aa6693f7 100644 --- a/user_guide_src/source/general/core_classes.rst +++ b/user_guide_src/source/general/core_classes.rst @@ -31,6 +31,7 @@ time CodeIgniter runs: - Log - Output - Router +- Security - URI - Utf8 -- cgit v1.2.3-24-g4f1b From d4901395c598552a3ef52d34aa3734e7b124dbfa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jun 2012 14:54:15 +0300 Subject: Added Fennec as Firefox Mobile to config/user_agents.php (issue #1063) --- application/config/user_agents.php | 6 +++--- user_guide_src/source/changelog.rst | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 76114616b..416ef5679 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -29,11 +29,10 @@ | ------------------------------------------------------------------- | USER AGENT TYPES | ------------------------------------------------------------------- -| This file contains four arrays of user agent data. It is used by the +| This file contains four arrays of user agent data. It is used by the | User Agent Class to help identify browser, platform, robot, and -| mobile device data. The array keys are used to identify the device +| mobile device data. The array keys are used to identify the device | and the array values are used to set the actual name of the item. -| */ $platforms = array( @@ -179,6 +178,7 @@ $mobiles = array( 'operamini' => 'Opera Mini', 'opera mini' => 'Opera Mini', 'opera mobi' => 'Opera Mobile', + 'fennec' => 'Firefox Mobile', // Other 'digital paths' => 'Digital Paths', diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f4bba25ed..74de512f7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Release Date: Not Released - Added an optional backtrace to php-error template. - Added Android to the list of user agents. - Added Windows 7, Android, Blackberry and iOS to the list of user platforms. + - Added Fennec (Firefox for mobile) to the list of mobile user agents. - Ability to log certain error types, not all under a threshold. - Added support for pem, p10, p12, p7a, p7c, p7m, p7r, p7s, crt, crl, der, kdb, rsa, cer, sst, csr Certs to mimes.php. - Added support for pgp and gpg to mimes.php. @@ -79,8 +80,8 @@ Release Date: Not Released - Added _optimize_table() support for the :doc:`Database Utility Class ` (rebuilds table indexes). - Added boolean data type support in escape(). - Added update_batch() support. + - Removed limit() and order_by() support for UPDATE and DELETE queries in as PostgreSQL does not support those features. - Added a constructor to the DB_result class and moved all driver-specific properties and logic out of the base DB_driver class to allow better abstraction. - - Removed limit() and order_by() support for UPDATE and DELETE queries in PostgreSQL driver. Postgres does not support those features. - Removed protect_identifiers() and renamed internal method _protect_identifiers() to it instead - it was just an alias. - MySQL and MySQLi drivers now require at least MySQL version 5.1. - db_set_charset() now only requires one parameter (collation was only needed due to legacy support for MySQL versions prior to 5.1). -- cgit v1.2.3-24-g4f1b From 47b673324f06236264ca64f8c3155aab51762609 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jun 2012 15:58:05 +0300 Subject: Add a second parameter (charset) to CI_Output::set_content_type() + fix for issue #666 --- system/core/Output.php | 10 ++++++++-- user_guide_src/source/changelog.rst | 4 +++- user_guide_src/source/libraries/output.rst | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/system/core/Output.php b/system/core/Output.php index 09656711b..0bf982289 100755 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -200,7 +200,7 @@ class CI_Output { * @param string extension of the file we're outputting * @return void */ - public function set_content_type($mime_type) + public function set_content_type($mime_type, $charset = NULL) { if (strpos($mime_type, '/') === FALSE) { @@ -218,7 +218,13 @@ class CI_Output { } } - $header = 'Content-Type: '.$mime_type; + if (empty($charset)) + { + $charset = config_item('charset'); + } + + $header = 'Content-Type: '.$mime_type + .(empty($charset) ? NULL : '; charset='.strtolower($charset)); $this->headers[] = array($header, TRUE); return $this; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 74de512f7..ce9b06883 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -135,7 +135,7 @@ Release Date: Not Released - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - - Enabled public access to Email library's set_header() for adding additional headers to e-mails. Original function _set_header() now renamed to set_header(). + - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Core @@ -150,6 +150,7 @@ Release Date: Not Released - Renamed method _call_hook() to call_hook() in the :doc:`Hooks Library `. - Added get_content_type() method to the :doc:`Output Library `. - Added get_mimes() function to system/core/Commons.php to return the config/mimes.php array. + - Added a second argument to set_content_type() in the :doc:`Output Library ` that allows setting the document charset as well. Bug fixes for 3.0 ------------------ @@ -230,6 +231,7 @@ Bug fixes for 3.0 - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. - Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. - Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). +- Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. Version 2.1.1 ============= diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst index baceaae7b..0472d14cf 100644 --- a/user_guide_src/source/libraries/output.rst +++ b/user_guide_src/source/libraries/output.rst @@ -49,6 +49,10 @@ data, JPEG's, XML, etc easily. .. important:: Make sure any non-mime string you pass to this method exists in config/mimes.php or it will have no effect. +You can also set the character set of the document, by passing a second argument:: + + $this->output->set_content_type('css', 'utf-8'); + $this->output->get_content_type(); ========================================== -- cgit v1.2.3-24-g4f1b