diff options
Diffstat (limited to 'user_guide_src/source')
-rw-r--r-- | user_guide_src/source/changelog.rst | 36 | ||||
-rw-r--r-- | user_guide_src/source/conf.py | 4 | ||||
-rw-r--r-- | user_guide_src/source/database/db_driver_reference.rst | 12 | ||||
-rw-r--r-- | user_guide_src/source/helpers/html_helper.rst | 22 | ||||
-rw-r--r-- | user_guide_src/source/installation/downloads.rst | 3 | ||||
-rw-r--r-- | user_guide_src/source/installation/upgrade_310.rst | 2 | ||||
-rw-r--r-- | user_guide_src/source/installation/upgrade_320.rst | 112 | ||||
-rw-r--r-- | user_guide_src/source/installation/upgrading.rst | 1 | ||||
-rw-r--r-- | user_guide_src/source/libraries/caching.rst | 2 | ||||
-rw-r--r-- | user_guide_src/source/libraries/image_lib.rst | 2 |
10 files changed, 171 insertions, 25 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c09c1b592..f9e7f572c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,42 @@ Change Log ########## +Version 3.2.0 +============= + +Release Date: Not Released + +- Core + + - Changed :doc:`URI Library <libraries/uri>` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. + +- Libraries + + - Added UNIX socket connection support to :doc:`Session Library <libraries/sessions>` 'redis' driver. + + - :doc:`Cache Library <libraries/caching>` changes include: + + - Added UNIX socket connection support to the 'memcached' driver. + - Changed the 'memcached' driver to ignore configurations that don't specify a hostname. + - Removed the *socket_type* configuration setting from the 'redis' driver. + - Changed data serialization logic in 'redis' driver for better performance. + +- Database + + - Changed method ``initialize()`` to return void and instead throw a ``RuntimeException`` in case of failure. + - Changed method ``db_connect()`` to always set the connection character set (if supported by the driver) and to fail if it can't. + - Removed method ``db_set_charset()`` and the ability to change a connection character set at runtime. + +- Helpers + + - Updated :doc:`HTML Helper <helpers/html_helper>` function :php:func:`meta()` with support for "charset" and "property" properties. + - Changed :doc:`HTML Helper <helpers/html_helper>` function :php:func:`doctype()` default document type to HTML 5. + +Bug fixes for 3.1.0 +------------------- + +- Fixed a bug (#4528) - :doc:`Cache Library <libraries/caching>` stored all scalar values as strings with the 'redis' driver. + Version 3.1.1 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 0c4901d8f..4714b0d62 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2016, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.1.1-dev' +version = '3.2.0-dev' # The full version, including alpha/beta/rc tags. -release = '3.1.1-dev' +release = '3.2.0-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1f036cd77..6f2fa5fb1 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -17,8 +17,8 @@ This article is intended to be a reference for them. .. php:method:: initialize() - :returns: TRUE on success, FALSE on failure - :rtype: bool + :rtype: void + :throws: RuntimeException In case of failure Initialize database settings, establish a connection to the database. @@ -61,14 +61,6 @@ This article is intended to be a reference for them. Select / switch the current database. - .. php:method:: db_set_charset($charset) - - :param string $charset: Character set name - :returns: TRUE on success, FALSE on failure - :rtype: bool - - Set client character set. - .. php:method:: platform() :returns: Platform name diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 2c748bea0..b4e56fdca 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -286,7 +286,7 @@ The following functions are available: // Generates: <meta name="description" content="My Great Site" /> echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); - // Note the third parameter. Can be "equiv" or "name" + // Note the third parameter. Can be "charset", "http-equiv", "name" or "property" // Generates: <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> echo meta(array('name' => 'robots', 'content' => 'no-cache')); @@ -310,8 +310,13 @@ The following functions are available: 'content' => 'no-cache' ), array( - 'name' => 'Content-type', - 'content' => 'text/html; charset=utf-8', 'type' => 'equiv' + 'name' => 'Content-Type', + 'type' => 'http-equiv', + 'content' => 'text/html; charset=utf-8' + ), + array( + 'name' => 'UTF-8', + 'type' => 'charset' ) ); @@ -321,21 +326,22 @@ The following functions are available: // <meta name="description" content="My Great Site" /> // <meta name="keywords" content="love, passion, intrigue, deception" /> // <meta name="robots" content="no-cache" /> - // <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> + // <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + // <meta charset="UTF-8" /> -.. php:function:: doctype([$type = 'xhtml1-strict']) +.. php:function:: doctype([$type = 'html5']) :param string $type: Doctype name :returns: HTML DocType tag :rtype: string - Helps you generate document type declarations, or DTD's. XHTML 1.0 - Strict is used by default, but many doctypes are available. + Helps you generate document type declarations, or DTD's. HTML 5 + is used by default, but many doctypes are available. Example:: - echo doctype(); // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + echo doctype(); // <!DOCTYPE html> echo doctype('html4-trans'); // <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 7380dcb28..1e28a5bf0 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,8 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.1.1 (Current version) <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1-stable>`_ +- `CodeIgniter v3.2.0-dev (Current version) <https://codeload.github.com/bcit-ci/CodeIgniter/zip/develop>`_ +- `CodeIgniter v3.1.1-dev <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1-stable>`_ - `CodeIgniter v3.1.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.0>`_ - `CodeIgniter v3.0.6 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.6>`_ - `CodeIgniter v3.0.5 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.5>`_ diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index 9e0108691..cae814327 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -35,4 +35,4 @@ does not provide a function that allows to safely escape user-supplied strings f inside an SQL query (which our :doc:`Query Builder <../database/query_builder>` relies on). Thus, user inputs MUST be bound, as shown in :doc:`Running Queries <../database/queries>`, -under the "Query Bindings" section.
\ No newline at end of file +under the "Query Bindings" section. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst new file mode 100644 index 000000000..942a8a3b5 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -0,0 +1,112 @@ +############################# +Upgrading from 3.1.x to 3.2.x +############################# + +Before performing an update you should take your site offline by +replacing the index.php file with a static one. + +Step 1: Update your CodeIgniter files +===================================== + +Replace all files and directories in your *system/* directory. + +.. note:: If you have any custom developed files in these directories, + please make copies of them first. + +Step 2: Change database connection handling +=========================================== + +"Loading" a database, whether by using the *config/autoload.php* settings +or manually via calling ``$this->load->database()`` or the less-known +``DB()`` function, will now throw a ``RuntimeException`` in case of a +failure. + +In addition, being unable to set the configured character set is now also +considered a connection failure. + +.. note:: This has been the case for most database drivers in the in the + past as well (i.e. all but the 'mysql', 'mysqli' and 'postgre' + drivers). + +What this means is that if you're unable to connect to a database, or +have an erroneous character set configured, CodeIgniter will no longer +fail silently, but will throw an exception instead. + +You may choose to explicitly catch it (and for that purpose you can't use +*config/autoload.php* to load the :doc:`Database Class <../database/index>`) +:: + + try + { + $this->load->database(); + } + catch (RuntimeException $e) + { + // Handle the failure + } + +Or you may leave it to CodeIgniter's default exception handler, which would +log the error message and display an error screen if you're running in +development mode. + +Remove db_set_charset() calls +----------------------------- + +With the above-mentioned changes, the purpose of the ``db_set_charset()`` +method would now only be to change the connection character set at runtime. +That doesn't make sense and that's the reason why most database drivers +don't support it at all. +Thus, ``db_set_charset()`` is no longer necessary and is removed. + +Step 3: Check logic related to URI parsing of CLI requests +========================================================== + +When running a CodeIgniter application from the CLI, the +:doc:`URI Library <../libraries/uri>` will now ignore the +``$config['url_suffix']`` and ``$config['permitted_uri_chars']`` +configuration settings. + +These two options don't make sense under the command line (which is why +this change was made) and therefore you shouldn't be affected by this, but +if you've relied on them for some reason, you'd probably have to make some +changes to your code. + +Step 4: Check Cache Library configurations for Redis, Memcache(d) +================================================================= + +The new improvements for the 'redis' and 'memcached' drivers of the +:doc:`Cache Library <../libraries/caching>` may require some small +adjustments to your configuration values ... + +Redis +----- + +If you're using the 'redis' driver with a UNIX socket connection, you'll +have to move the socket path from ``$config['socket']`` to +``$config['host']`` instead. + +The ``$config['socket_type']`` option is also removed, although that won't +affect your application - it will be ignored and the connection type will +be determined by the format used for ``$config['host']`` instead. + +Memcache(d) +----------- + +The 'memcached' will now ignore configurations that don't specify a ``host`` +value (previously, it just set the host to the default '127.0.0.1'). + +Therefore, if you've added a configuration that only sets e.g. a ``port``, +you will now have to explicitly set the ``host`` to '127.0.0.1' as well. + +Step 5: Check usage of doctype() HTML helper +============================================ + +The :doc:`HTML Helper <../helpers/html_helper>` function +:php:func:`doctype()` used to default to 'xhtml1-strict' (XHTML 1.0 Strict) +when no document type was specified. That default value is now changed to +'html5', which obviously stands for the modern HTML 5 standard. + +Nothing should be really broken by this change, but if your application +relies on the default value, you should double-check it and either +explicitly set the desired format, or adapt your front-end to use proper +HTML 5 formatting. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 727d054d1..01812169b 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -8,6 +8,7 @@ upgrading from. .. toctree:: :titlesonly: + Upgrading from 3.1.x to 3.2.x <upgrade_320> Upgrading from 3.1.0 to 3.1.1 <upgrade_311> Upgrading from 3.0.6 to 3.1.0 <upgrade_310> Upgrading from 3.0.5 to 3.0.6 <upgrade_306> diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst index a7081ec6b..81019c015 100644 --- a/user_guide_src/source/libraries/caching.rst +++ b/user_guide_src/source/libraries/caching.rst @@ -255,8 +255,6 @@ To use it, you need `Redis server and phpredis PHP extension <https://github.com Config options to connect to redis server must be stored in the application/config/redis.php file. Available options are:: - $config['socket_type'] = 'tcp'; //`tcp` or `unix` - $config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type $config['host'] = '127.0.0.1'; $config['password'] = NULL; $config['port'] = 6379; diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index 22407962f..b25d2512f 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -283,7 +283,7 @@ Preference Default Value Options Description **wm_shadow_color** None None The color of the drop shadow, specified in hex. If you leave this blank a drop shadow will not be used. Both the full 6-length (ie, 993300) and the short three character abbreviated version (ie, fff) are supported. -**wm_shadow_distance** 3 None The distance (in pixels) from the font that the drop shadow should +**wm_shadow_distance** 2 None The distance (in pixels) from the font that the drop shadow should appear. ======================= =================== =================== ========================================================================== |