From a0ddbcc7049538c87c37a9123bc8022eeb5dc582 Mon Sep 17 00:00:00 2001 From: Richer Yang Date: Fri, 10 Mar 2017 13:56:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=203.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cilexer/cilexer/cilexer.py | 7 ++--- source/changelog.rst | 47 +++++++++++++++++++++++++++- source/conf.py | 6 ++-- source/documentation/index.rst | 16 +++++----- source/general/core_classes.rst | 1 + source/general/models.rst | 2 +- source/helpers/date_helper.rst | 5 ++- source/helpers/download_helper.rst | 7 +++-- source/installation/downloads.rst | 3 +- source/installation/upgrade_312.rst | 2 +- source/installation/upgrade_313.rst | 44 ++++++++++++++++++++++++++ source/installation/upgrading.rst | 1 + source/libraries/form_validation.rst | 2 +- source/license.rst | 2 +- 14 files changed, 121 insertions(+), 24 deletions(-) create mode 100644 source/installation/upgrade_313.rst diff --git a/cilexer/cilexer/cilexer.py b/cilexer/cilexer/cilexer.py index 40582f8..4a9c64a 100644 --- a/cilexer/cilexer/cilexer.py +++ b/cilexer/cilexer/cilexer.py @@ -1,8 +1,7 @@ # CodeIgniter # https://codeigniter.com -# -# An open source application development framework for PHP -# +# # An open source application development framework for PHP +# # This content is released under the MIT License (MIT) # # Copyright (c) 2014 - 2016, British Columbia Institute of Technology @@ -26,7 +25,7 @@ # THE SOFTWARE. # # Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) -# Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) +# Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) # # http://opensource.org/licenses/MIT MIT License diff --git a/source/changelog.rst b/source/changelog.rst index 4e32443..380b23c 100644 --- a/source/changelog.rst +++ b/source/changelog.rst @@ -2,6 +2,51 @@ 更新紀錄 ######## +Version 3.1.3 +============= + +發布日期:Jan 09, 2017 + +- **安全性** + + - Fixed an XSS vulnerability in :doc:`Security Library ` method ``xss_clean()``. + - Fixed a possible file inclusion vulnerability in :doc:`Loader Library ` method ``vars()``. + - Fixed a possible remote code execution vulnerability in the :doc:`Email Library ` when 'mail' or 'sendmail' are used (thanks to Paul Buonopane from `NamePros `_). + - Added protection against timing side-channel attacks in :doc:`Security Library ` method ``csrf_verify()``. + - Added protection against BREACH attacks targeting the CSRF token field generated by :doc:`Form Helper ` function :php:func:`form_open()`. + +- 一般性變更 + + - Deprecated ``$config['allow_get_array']``. + - Deprecated ``$config['standardize_newlines']``. + - Deprecated :doc:`Date Helper ` function :php:func:`nice_date()`. + +3.1.3 錯誤修正 +-------------- + +- 錯誤修正(編號4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. +- 錯誤修正(編號4890) - :doc:`XML-RPC Library ` didn't work on PHP 7. +- Fixed a regression (#4887) - :doc:`File Uploading Library ` triggered fatal errors due to numerous PHP distribution channels (XAMPP and cPanel confirmed) explicitly disabling ext/fileinfo by default. +- 錯誤修正(編號4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. +- 錯誤修正(編號4902) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. +- 錯誤修正(編號4905) - :doc:`Loader Library ` didn't take into account possible user-provided directory paths when loading helpers. +- 錯誤修正(編號4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. +- 錯誤修正(編號4917) - :doc:`Date Helper ` function :php:func:`nice_date()` didn't handle YYYYMMDD inputs properly. +- 錯誤修正(編號4923) - :doc:`Session Library ` could execute an erroneous SQL query with the 'database' driver, if the lock attempt times out. +- 錯誤修正(編號4927) - :doc:`Output Library ` method ``get_header()`` returned the first matching header, regardless of whether it would be replaced by a second ``set_header()`` call. +- 錯誤修正(編號4844) - :doc:`Email Library ` didn't apply ``escapeshellarg()`` to the while passing the Sendmail ``-f`` parameter through ``popen()``. +- 錯誤修正(編號4928) - the bootstrap file didn't check if *config/constants.php* exists before trying to load it. +- 錯誤修正(編號4937) - :doc:`Image Manipulation Library ` method ``initialize()`` didn't translate *new_image* inputs to absolute paths. +- 錯誤修正(編號4941) - :doc:`Query Builder ` method ``order_by()`` didn't work with 'RANDOM' under the 'pdo/sqlite' driver. +- Fixed a regression (#4892) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. +- 錯誤修正(編號4953) - :doc:`Database Forge ` method ``create_table()`` didn't update an internal tables list cache if it exists but is empty. +- 錯誤修正(編號4958) - :doc:`Query Builder ` method ``count_all_results()`` didn't take into account cached ``ORDER BY`` clauses. +- 錯誤修正(編號4804) - :doc:`Query Builder ` method ``insert_batch()`` could fail if the input array pointer was modified. +- 錯誤修正(編號4962) - :doc:`Database Force ` method ``alter_table()`` would fail with the 'oci8' driver. +- 錯誤修正(編號4457) - :doc:`Image Manipulation Library ` method ``get_image_properties()`` didn't detect invalid images. +- 錯誤修正(編號4765) - :doc:`Email Library ` didn't send the ``User-Agent`` header without a prior call to ``clear()``. + + Version 3.1.2 ============= @@ -13,7 +58,7 @@ Version 3.1.2 - 一般性變更 - - Allowed PHP 4-style constructors (``Mathching_name::Matching_name()`` methods) to be used as routes, if there's a ``__construct()`` to override them. + - Allowed PHP 4-style constructors (``Matching_name::Matching_name()`` methods) to be used as routes, if there's a ``__construct()`` to override them. 3.1.2 錯誤修正 -------------- diff --git a/source/conf.py b/source/conf.py index 1da19ba..8666b50 100644 --- a/source/conf.py +++ b/source/conf.py @@ -41,16 +41,16 @@ # General information about the project. project = u'CodeIgniter' -copyright = u'2014 - 2016, British Columbia Institute of Technology' +copyright = u'2014 - 2017, British Columbia Institute of Technology' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '3.1.2' +version = '3.1.3' # The full version, including alpha/beta/rc tags. -release = '3.1.2' +release = '3.1.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/source/documentation/index.rst b/source/documentation/index.rst index c4532b8..aaac33e 100644 --- a/source/documentation/index.rst +++ b/source/documentation/index.rst @@ -18,7 +18,7 @@ It is created automatically by inserting the following: .. raw:: html -
+
.. contents:: :local: @@ -43,7 +43,7 @@ Pygments, so that code blocks can be properly highlighted. .. code-block:: bash easy_install "sphinx==1.2.3" - easy_install sphinxcontrib-phpdomain + easy_install "sphinxcontrib-phpdomain==0.1.3.post1" Then follow the directions in the README file in the :samp:`cilexer` folder inside the documentation repository to install the CI Lexer. @@ -115,9 +115,9 @@ For example, consider the following ReST: .. code-block:: rst - .. class:: Some_class + .. php:class:: Some_class - .. method:: some_method ( $foo [, $bar [, $bat]]) + .. php:method:: some_method ( $foo [, $bar [, $bat]]) This function will perform some action. The ``$bar`` array must contain a something and something else, and along with ``$bat`` is an optional @@ -151,7 +151,7 @@ For example, consider the following ReST: See also :meth:`Some_class::should_do_something` - .. method:: should_do_something() + .. php:method:: should_do_something() :returns: Whether or not something should be done :rtype: bool @@ -159,10 +159,10 @@ For example, consider the following ReST: It creates the following display: -.. class:: Some_class +.. php:class:: Some_class - .. method:: some_method ( $foo [, $bar [, $bat]]) + .. php:method:: some_method ( $foo [, $bar [, $bat]]) This function will perform some action. The ``$bar`` array must contain a something and something else, and along with ``$bat`` is an optional @@ -196,7 +196,7 @@ It creates the following display: See also :meth:`Some_class::should_do_something` - .. method:: should_do_something() + .. php:method:: should_do_something() :returns: Whether or not something should be done :rtype: bool diff --git a/source/general/core_classes.rst b/source/general/core_classes.rst index 1dd6bb2..484d40e 100644 --- a/source/general/core_classes.rst +++ b/source/general/core_classes.rst @@ -82,6 +82,7 @@ public function __construct() { parent::__construct(); + // Your own constructor code } public function index() diff --git a/source/general/models.rst b/source/general/models.rst index b99bf51..684bc1d 100644 --- a/source/general/models.rst +++ b/source/general/models.rst @@ -19,8 +19,8 @@ Models 是 PHP 類別,它是被設計來存取資料庫用的。比如說, public function __construct() { - // Call the CI_Model constructor parent::__construct(); + // Your own constructor code } public function get_last_ten_entries() diff --git a/source/helpers/date_helper.rst b/source/helpers/date_helper.rst index ff20198..b984c80 100644 --- a/source/helpers/date_helper.rst +++ b/source/helpers/date_helper.rst @@ -75,7 +75,7 @@ Date 輔助函式的載入語法如下 echo standard_date($format, $time); .. 提醒:: 此函式將被停用,建議使用內建的 ``date()`` 並搭配 `DateTime's format constants - `_ 來取代之 + `_ 來取代之 :: echo date(DATE_RFC822, time()); @@ -206,6 +206,9 @@ Date 輔助函式的載入語法如下 // Should Produce: 2001-09-11 $better_date = nice_date($bad_date, 'Y-m-d'); + .. 提醒:: This function is DEPRECATED. Use PHP's native `DateTime class + `_ instead. + .. php:function:: timespan([$seconds = 1[, $time = ''[, $units = '']]]) :param int $seconds: 秒數 diff --git a/source/helpers/download_helper.rst b/source/helpers/download_helper.rst index 0e74428..3868b31 100644 --- a/source/helpers/download_helper.rst +++ b/source/helpers/download_helper.rst @@ -26,7 +26,7 @@ The following functions are available: .. php:function:: force_download([$filename = ''[, $data = ''[, $set_mime = FALSE]]]) - :param string $filename: Filename + :param mixed $filename: Filename :param mixed $data: File contents :param bool $set_mime: Whether to try to send the actual MIME type :rtype: void @@ -37,7 +37,10 @@ The following functions are available: file data. If you set the second parameter to NULL and ``$filename`` is an existing, readable - file path, then its content will be read instead. + file path, then its content will be read instead. You may also set ``$filename`` + as an associative array with a single element, where the key of that element would be + the local file you are trying to read and where the value is the name of the downloadable + file that will be sent to browser. An example of this is provided below. If you set the third parameter to boolean TRUE, then the actual file MIME type (based on the filename extension) will be sent, so that if your browser has a diff --git a/source/installation/downloads.rst b/source/installation/downloads.rst index c134044..d961620 100644 --- a/source/installation/downloads.rst +++ b/source/installation/downloads.rst @@ -2,7 +2,8 @@ 下載 CodeIgniter ####################### -- `CodeIgniter v3.1.2 (目前版本) `_ +- `CodeIgniter v3.1.3 (目前版本) `_ +- `CodeIgniter v3.1.2 `_ - `CodeIgniter v3.1.1 `_ - `CodeIgniter v3.1.0 `_ - `CodeIgniter v3.0.6 `_ diff --git a/source/installation/upgrade_312.rst b/source/installation/upgrade_312.rst index 4c495c0..2b085f4 100644 --- a/source/installation/upgrade_312.rst +++ b/source/installation/upgrade_312.rst @@ -9,7 +9,7 @@ 取代 *system/* 目錄打下的所有目錄與檔案 -.. 注意:: 假如您有修改此目錄底下的檔案,麻煩請先複製備份。 +.. 提醒:: 假如您有修改此目錄底下的檔案,麻煩請先複製備份。 步驟 2: 更新 "ci_sessions" 資料表 ================================= diff --git a/source/installation/upgrade_313.rst b/source/installation/upgrade_313.rst new file mode 100644 index 0000000..637ed64 --- /dev/null +++ b/source/installation/upgrade_313.rst @@ -0,0 +1,44 @@ +##################### +從 3.1.2 升級到 3.1. +##################### + +在執行升級之前,你應該更換 index.php 為靜態檔案,將網站導向此靜態網頁。 + +步驟 1:更新網站 CodeIgniter 檔案 +================================= + +取代 *system/* 目錄打下的所有目錄與檔案 + +.. 提醒:: 假如您有修改此目錄底下的檔案,麻煩請先複製備份。 + +步驟 2: 移除輔助函式 nice_date() 的使用 (deprecation) +===================================================== + +The :doc:`Date Helper <../helpers/date_helper>` function ``nice_date()`` is +no longer useful since the introduction of PHP's `DateTime classes +`_ + +You can replace it with the following: +:: + + DateTime::createFromFormat($input_format, $input_date)->format($desired_output_format); + +Thus, ``nice_date()`` is now deprecated and scheduled for removal in +CodeIgniter 3.2+. + +.. 提醒:: The function is still available, but you're strongly encouraged + to remove its usage sooner rather than later. + +步驟 3: 移除 $config['standardize_newlines'] 的使用 +=================================================== + +The :doc:`Input Library <../libraries/input>` would optionally replace +occurences of `\r\n`, `\r`, `\n` in input data with whatever the ``PHP_EOL`` +value is on your system - if you've set ``$config['standardize_newlines']`` +to ``TRUE`` in your *application/config/config.php*. + +This functionality is now deprecated and scheduled for removal in +CodeIgniter 3.2.+. + +.. 提醒:: The functionality is still available, but you're strongly + encouraged to remove its usage sooner rather than later. diff --git a/source/installation/upgrading.rst b/source/installation/upgrading.rst index 7eb4258..2fe0760 100644 --- a/source/installation/upgrading.rst +++ b/source/installation/upgrading.rst @@ -7,6 +7,7 @@ .. toctree:: :titlesonly: + 從 3.1.2 升級到 3.1.3 從 3.1.1 升級到 3.1.2 從 3.1.0 升級到 3.1.1 從 3.0.6 升級到 3.1.0 diff --git a/source/libraries/form_validation.rst b/source/libraries/form_validation.rst index 21e63d0..0bf3506 100644 --- a/source/libraries/form_validation.rst +++ b/source/libraries/form_validation.rst @@ -987,7 +987,7 @@ Rule Parameter Description **valid_url** No Returns FALSE if the form element does not contain a valid URL. **valid_email** No Returns FALSE if the form element does not contain a valid email address. **valid_emails** No Returns FALSE if any value provided in a comma separated list is not a valid email. -**valid_ip** No Returns FALSE if the supplied IP is not valid. +**valid_ip** Yes Returns FALSE if the supplied IP address is not valid. Accepts an optional parameter of 'ipv4' or 'ipv6' to specify an IP format. **valid_base64** No Returns FALSE if the supplied string contains anything other than valid Base64 characters. ========================= ========== ============================================================================================= ======================= diff --git a/source/license.rst b/source/license.rst index aa171c3..a6d2a1c 100644 --- a/source/license.rst +++ b/source/license.rst @@ -2,7 +2,7 @@ The MIT License (MIT) ##################### -Copyright (c) 2014 - 2016, British Columbia Institute of Technology +Copyright (c) 2014 - 2017, British Columbia Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 30c9aeaf3328563cc952d9af1ffa9ec4297f55cf Mon Sep 17 00:00:00 2001 From: Richer Yang Date: Mon, 26 Jun 2017 15:55:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=203.1.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/changelog.rst | 96 +++++++++++++++++++++++------ source/conf.py | 4 +- source/database/transactions.rst | 2 +- source/general/common_functions.rst | 2 +- source/general/routing.rst | 2 - source/helpers/cookie_helper.rst | 2 +- source/helpers/form_helper.rst | 49 +++++++++++---- source/helpers/string_helper.rst | 2 +- source/installation/downloads.rst | 4 +- source/installation/upgrade_300.rst | 2 +- source/installation/upgrade_313.rst | 4 +- source/installation/upgrade_314.rst | 12 ++++ source/installation/upgrade_315.rst | 12 ++++ source/installation/upgrading.rst | 2 + source/libraries/encryption.rst | 2 +- source/libraries/ftp.rst | 2 +- source/libraries/input.rst | 10 +-- source/libraries/pagination.rst | 2 +- source/libraries/security.rst | 9 ++- source/libraries/sessions.rst | 2 +- 20 files changed, 169 insertions(+), 53 deletions(-) create mode 100644 source/installation/upgrade_314.rst create mode 100644 source/installation/upgrade_315.rst diff --git a/source/changelog.rst b/source/changelog.rst index 380b23c..5fead8c 100644 --- a/source/changelog.rst +++ b/source/changelog.rst @@ -2,6 +2,66 @@ 更新紀錄 ######## +Version 3.1.5 +============= + +發布日期:Jun 19, 2017 + +- **安全性** + + - :doc:`Form Validation Library ` rule ``valid_email`` could be bypassed if ``idn_to_ascii()`` is available. + +- 一般性變更 + + - Updated :doc:`Form Helper ` function :php:func:`form_label()` to accept HTML attributes as a string. + +3.1.5 錯誤修正 +-------------- + +- 錯誤修正(編號 5070) - :doc:`Email Library ` didn't properly detect 7-bit encoding. +- 錯誤修正(編號 5084) - :doc:`XML-RPC Library ` errored because of a variable name typo. +- 錯誤修正(編號 5108) - :doc:`Inflector Helper ` function :php:func:`singular()` didn't properly handle 'quizzes'. +- Fixed a regression (#5131) - private controller methods triggered PHP errors instead of a 404 response. +- 錯誤修正(編號 5150) - :doc:`Database Forge ` method ``modify_column()`` triggered an error while renaming columns with the 'oci8', 'pdo/oci' drivers. +- 錯誤修正(編號 5155) - :doc:`Query Builder ` method ``count_all_results()`` returned incorrect result for queries using ``LIMIT``, ``OFFSET``. + +Version 3.1.4 +============= + +發布日期:Mar 20, 2017 + +- **安全性** + + - Fixed a header injection vulnerability in :doc:`common function ` :php:func:`set_status_header()` under Apache (thanks to Guillermo Caminer from `Flowgate `_). + - Fixed byte-safety issues in :doc:`Encrypt Library ` (DEPRECATED) when ``mbstring.func_overload`` is enabled. + - Fixed byte-safety issues in :doc:`Encryption Library ` when ``mbstring.func_overload`` is enabled. + - Fixed byte-safety issues in :doc:`compatibility functions ` ``password_hash()``, ``hash_pbkdf2()`` when ``mbstring.func_overload`` is enabled. + - Updated :doc:`Encrypt Library ` (DEPRECATED) to call ``mcrypt_create_iv()`` with ``MCRYPT_DEV_URANDOM``. + +- 一般性變更 + + - Updated the :doc:`Image Manipulation Library ` to work-around an issue with some JPEGs when using GD. + +3.1.4 錯誤修正 +-------------- + +- Fixed a regression (#4975) - :doc:`Loader Library ` couldn't handle objects passed as view variables. +- 錯誤修正(編號 4977) - :doc:`Loader Library ` method ``helper()`` could accept any character as a filename extension separator. +- Fixed a regression where the :doc:`Session Library ` would fail on a ``session_regenerate_id(TRUE)`` call with the 'database' driver. +- 錯誤修正(編號 4987) - :doc:`Query Builder ` caching didn't keep track of table aliases. +- Fixed a bug where :doc:`Text Helper ` function ``ascii_to_entities()`` wasn't byte-safe when ``mbstring.func_overload`` is enabled. +- Fixed a bug where ``CI_Log``, ``CI_Output``, ``CI_Email`` and ``CI_Zip`` didn't handle strings in a byte-safe manner when ``mbstring.func_overload`` is enabled. +- Fixed a bug where :doc:`Session Library ` didn't read session data in a byte-safe manner when ``mbstring.func_overload`` is enabled. +- 錯誤修正(編號 4990) - :doc:`Profiler ` didn't close ``
`` tags it generated.
+-  錯誤修正(編號 4990) - :doc:`Profiler ` didn't HTML-escape quotes for ``$_SESSION`` variables.
+-  Fixed a bug where :doc:`Input Library ` method ``set_cookie()`` didn't allow its *httponly* and *secure* parameters to be overriden to ``FALSE``.
+-  錯誤修正(編號 5006) - :doc:`common function ` :php:func:`get_mimes()` didn't load *application/config/mimes.php* if an environment specific config exists.
+-  錯誤修正(編號 5006) - :doc:`common function ` :php:func:`remove_invisible_characters()` didn't remove URL-encoded ``0x7F``.
+-  錯誤修正(編號 4815) - :doc:`Database Library ` stripped URL-encoded sequences while escaping strings with the 'mssql' driver.
+-  錯誤修正(編號 5044) - :doc:`HTML Helper ` function :php:func:`img()` didn't accept ``data:`` URI schemes for the image source.
+-  錯誤修正(編號 5050) - :doc:`Database Library ` tried to access an undefined property in a number of error handling cases.
+-  錯誤修正(編號 5057) - :doc:`Database ` driver 'postgre' didn't actually apply extra options (such as 'connect_timeout') to its DSN.
+
 Version 3.1.3
 =============
 
@@ -140,26 +200,26 @@ Version 3.1.0
 
 -  Fixed a bug where :doc:`Image Manipulation Library ` didn't escape image source paths passed to ImageMagick as shell arguments.
 -  錯誤修正(編號 861) - :doc:`Database Forge ` method ``create_table()`` incorrectly accepts field width constraints for MSSQL/SQLSRV integer-type columns.
--  錯誤修正(編號 4562) - :doc:`Cache Library ` didn't check if ``Memcached::quit()`` is available before calling it.
--  錯誤修正(編號 4563) - :doc:`Input Library ` method ``request_headers()`` ignores ``$xss_clean`` parameter value after first call.
--  錯誤修正(編號 4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it.
--  錯誤修正(編號 4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled.
--  錯誤修正(編號 4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields.
--  錯誤修正(編號 4637) - :doc:`Database ` method ``error()`` returned ``FALSE`` with the 'oci8' driver if there was no error.
--  錯誤修正(編號 4647) - :doc:`Query Builder ` method ``count_all_results()`` doesn't take into account ``GROUP BY`` clauses while deciding whether to do a subquery or not.
+-  錯誤修正(編號 4562) - :doc:`Cache Library ` didn't check if ``Memcached::quit()`` is available before calling it.
+-  錯誤修正(編號 4563) - :doc:`Input Library ` method ``request_headers()`` ignores ``$xss_clean`` parameter value after first call.
+-  錯誤修正(編號 4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it.
+-  錯誤修正(編號 4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled.
+-  錯誤修正(編號 4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields.
+-  錯誤修正(編號 4637) - :doc:`Database ` method ``error()`` returned ``FALSE`` with the 'oci8' driver if there was no error.
+-  錯誤修正(編號 4647) - :doc:`Query Builder ` method ``count_all_results()`` doesn't take into account ``GROUP BY`` clauses while deciding whether to do a subquery or not.
 -  Fixed a bug where :doc:`Session Library ` 'redis' driver didn't properly detect if a connection is properly closed on PHP 5.x.
--  錯誤修正(編號 4583) - :doc:`Email Library ` didn't properly handle inline attachments in HTML emails.
+-  錯誤修正(編號 4583) - :doc:`Email Library ` didn't properly handle inline attachments in HTML emails.
 -  Fixed a bug where :doc:`Database ` method ``db_select()`` didn't clear metadata cached for the previously used database.
--  錯誤修正(編號 4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories.
--  錯誤修正(編號 4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting.
--  錯誤修正(編號 4678) - :doc:`Database Forge ` tried to use unsupported ``IF NOT EXISTS`` clause when creating tables on Oracle.
--  錯誤修正(編號 4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename.
--  錯誤修正(編號 4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address.
--  錯誤修正(編號 4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header.
--  錯誤修正(編號 4713) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` could return wrong affected rows count.
--  錯誤修正(編號 4712) - :doc:`Email Library ` doesn't sent ``RSET`` to SMTP servers after a failure and while using keep-alive.
--  錯誤修正(編號 4724) - :doc:`Common function ` :php:func:`is_https()` compared the ``X-Forwarded-Proto`` HTTP header case-sensitively.
--  錯誤修正(編號 4725) - :doc:`Common function ` :php:func:`remove_invisible_characters()` searched case-sensitively for URL-encoded characters.
+-  錯誤修正(編號 4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories.
+-  錯誤修正(編號 4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting.
+-  錯誤修正(編號 4678) - :doc:`Database Forge ` tried to use unsupported ``IF NOT EXISTS`` clause when creating tables on Oracle.
+-  錯誤修正(編號 4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename.
+-  錯誤修正(編號 4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address.
+-  錯誤修正(編號 4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header.
+-  錯誤修正(編號 4713) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` could return wrong affected rows count.
+-  錯誤修正(編號 4712) - :doc:`Email Library ` doesn't sent ``RSET`` to SMTP servers after a failure and while using keep-alive.
+-  錯誤修正(編號 4724) - :doc:`Common function ` :php:func:`is_https()` compared the ``X-Forwarded-Proto`` HTTP header case-sensitively.
+-  錯誤修正(編號 4725) - :doc:`Common function ` :php:func:`remove_invisible_characters()` searched case-sensitively for URL-encoded characters.
 
 Version 3.0.6
 =============
diff --git a/source/conf.py b/source/conf.py
index 8666b50..da9766f 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -48,9 +48,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '3.1.3'
+version = '3.1.5'
 # The full version, including alpha/beta/rc tags.
-release = '3.1.3'
+release = '3.1.5'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/source/database/transactions.rst b/source/database/transactions.rst
index e25b8ed..cfd6a56 100644
--- a/source/database/transactions.rst
+++ b/source/database/transactions.rst
@@ -87,7 +87,7 @@ If you would like to disable transactions you can do so using
 	$this->db->query('AN SQL QUERY...');
 	$this->db->trans_complete();
 
-When transactions are disabled, your queries will be auto-commited, just as
+When transactions are disabled, your queries will be auto-committed, just as
 they are when running queries without transactions, practically ignoring
 any calls to ``trans_start()``, ``trans_complete()``, etc.
 
diff --git a/source/general/common_functions.rst b/source/general/common_functions.rst
index d294c7c..cf99d6e 100644
--- a/source/general/common_functions.rst
+++ b/source/general/common_functions.rst
@@ -91,7 +91,7 @@ CodeIgniter 使用少許幾個全域函數來協助運行,你也可以在任
 .. function:: set_status_header($code[, $text = ''])
 
 	:param	int	$code: HTTP 回應狀態碼
-	:param	string	$text: 客製化狀態碼訊息
+	:param	string $text: 客製化狀態碼訊息
 	:rtype:	void
 
 	允許你操作設定伺服器標頭狀態。例如: ::
diff --git a/source/general/routing.rst b/source/general/routing.rst
index 4181c1f..39bd0d4 100644
--- a/source/general/routing.rst
+++ b/source/general/routing.rst
@@ -156,5 +156,3 @@ Same per-directory rules as with 'default_controller' apply here as well.
 很顯然這是布林值,這不是真的路由。
 這個選項使你自動地在控制器的方法中 URI 片段將底線替換掉破折號(’-‘),如果你需要做成這樣,從而節省您更多的路由項目。
 這是必須的,因為破折號不是有效得類別或者方法名稱字元,如果你使用破折號,會導致重大錯誤。
-
-.. important:: 在任何的萬用字元或者正規表達式路由,保留的路由一定要留著。
diff --git a/source/helpers/cookie_helper.rst b/source/helpers/cookie_helper.rst
index 5fb4e2c..191d52b 100644
--- a/source/helpers/cookie_helper.rst
+++ b/source/helpers/cookie_helper.rst
@@ -25,7 +25,7 @@ Cookie 輔助函式的載入語法如下:
 允許使用的函式格式如下:
 
 
-.. php:function:: set_cookie($name[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
+.. php:function:: set_cookie($name[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = NULL[, $httponly = NULL]]]]]]])
 
 	:param	mixed	$name: Cookie 名稱或包含函式中所有有效參數的陣列
 	:param	string	$value: Cookie 值
diff --git a/source/helpers/form_helper.rst b/source/helpers/form_helper.rst
index a89c992..cd57e91 100644
--- a/source/helpers/form_helper.rst
+++ b/source/helpers/form_helper.rst
@@ -190,7 +190,7 @@ The following functions are available:
 
 	:param	array	$data: Field attributes data
 	:param	string	$value: Field value
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML text input field tag
 	:rtype:	string
 
@@ -225,11 +225,16 @@ The following functions are available:
 		$js = 'onClick="some_function()"';
 		echo form_input('username', 'johndoe', $js);
 
+	Or you can pass it as an array::
+
+		$js = array('onClick' => 'some_function();');
+		echo form_input('username', 'johndoe', $js);
+
 .. php:function:: form_password([$data = ''[, $value = ''[, $extra = '']]])
 
 	:param	array	$data: Field attributes data
 	:param	string	$value: Field value
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML password input field tag
 	:rtype:	string
 
@@ -241,7 +246,7 @@ The following functions are available:
 
 	:param	array	$data: Field attributes data
 	:param	string	$value: Field value
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML file upload input field tag
 	:rtype:	string
 
@@ -254,7 +259,7 @@ The following functions are available:
 
 	:param	array	$data: Field attributes data
 	:param	string	$value: Field value
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML textarea tag
 	:rtype:	string
 
@@ -269,7 +274,7 @@ The following functions are available:
 	:param	string	$name: Field name
 	:param	array	$options: An associative array of options to be listed
 	:param	array	$selected: List of fields to mark with the *selected* attribute
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML dropdown select field tag
 	:rtype:	string
 
@@ -323,6 +328,14 @@ The following functions are available:
 		$js = 'id="shirts" onChange="some_function();"';
 		echo form_dropdown('shirts', $options, 'large', $js);
 
+	Or you can pass it as an array::
+
+		$js = array(
+			'id'       => 'shirts',
+			'onChange' => 'some_function();'
+		);
+		echo form_dropdown('shirts', $options, 'large', $js);
+
 	If the array passed as ``$options`` is a multidimensional array, then
 	``form_dropdown()`` will produce an  with the array key as the
 	label.
@@ -333,7 +346,7 @@ The following functions are available:
 	:param	string	$name: Field name
 	:param	array	$options: An associative array of options to be listed
 	:param	array	$selected: List of fields to mark with the *selected* attribute
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML dropdown multiselect field tag
 	:rtype:	string
 
@@ -398,7 +411,7 @@ The following functions are available:
 	:param	string	$extra: Anything to append after the closing tag, *as is*
 	:returns:	An HTML fieldset closing tag
 	:rtype:	string
-
+	
 
 	Produces a closing  tag. The only advantage to using this
 	function is it permits you to pass data to it which will be added below
@@ -416,7 +429,7 @@ The following functions are available:
 	:param	array	$data: Field attributes data
 	:param	string	$value: Field value
 	:param	bool	$checked: Whether to mark the checkbox as being *checked*
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML checkbox input tag
 	:rtype:	string
 
@@ -449,13 +462,18 @@ The following functions are available:
 		$js = 'onClick="some_function()"';
 		echo form_checkbox('newsletter', 'accept', TRUE, $js);
 
+	Or you can pass it as an array::
+
+		$js = array('onClick' => 'some_function();');
+		echo form_checkbox('newsletter', 'accept', TRUE, $js);
+
 
 .. php:function:: form_radio([$data = ''[, $value = ''[, $checked = FALSE[, $extra = '']]]])
 
 	:param	array	$data: Field attributes data
 	:param	string	$value: Field value
 	:param	bool	$checked: Whether to mark the radio button as being *checked*
-	:param	string	$extra: Extra attributes to be added to the tag *as is*
+	:param	mixed	$extra: Extra attributes to be added to the tag either as an array or a literal string
 	:returns:	An HTML radio input tag
 	:rtype:	string
 
@@ -467,7 +485,7 @@ The following functions are available:
 
 	:param	string	$label_text: Text to put in the