From 4e5ff1f7f8c1897526e9362fdcf7b574c1b3cdf9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Aug 2015 14:32:03 +0300 Subject: Fix #4026 --- system/database/DB_driver.php | 5 ++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index e58496de9..659664db9 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -647,7 +647,10 @@ abstract class CI_DB_driver { } // This will trigger a rollback if transactions are being used - $this->_trans_status = FALSE; + if ($this->_trans_depth !== 0) + { + $this->_trans_status = FALSE; + } // Grab the error now, as we might run some additional queries before displaying the error $error = $this->error(); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1b044cc5f..cfa0f69a5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -77,6 +77,7 @@ Bug fixes for 3.0.1 - Fixed a bug (#4012) - :doc:`Query Builder ` methods ``where_in()``, ``or_where_in()``, ``where_not_in()``, ``or_where_not_in()`` didn't take into account previously cached WHERE conditions when query cache is in use. - Fixed a bug (#4015) - :doc:`Email Library ` method ``set_header()`` didn't support method chaining, although it was advertised. - Fixed a bug (#4027) - :doc:`Routing ` with HTTP verbs only worked if the route request method was declared in all-lowercase letters. +- Fixed a bug (#4026) - :doc:`Database Transactions ` always rollback if any previous ``query()`` call fails. Version 3.0.0 ============= -- cgit v1.2.3-24-g4f1b From 36bd3413be0807fe358d87856b3a2f42047764fd Mon Sep 17 00:00:00 2001 From: Kevin Morssink Date: Tue, 4 Aug 2015 19:05:46 +0200 Subject: Fix ReDoS-bug in string_helper.php Fix for ReDoS (Regular Expression Denial of Service) / Code Injection Risk --- system/helpers/string_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 5860e15fb..28e6ab15f 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -253,7 +253,7 @@ if ( ! function_exists('increment_string')) */ function increment_string($str, $separator = '_', $first = 1) { - preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match); + preg_match('/(.+)' . preg_quote($separator) . '([0-9]+)$/', $str, $match); return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first; } } -- cgit v1.2.3-24-g4f1b From 9bb9469cabd15eb8e8e15fa3b2740bf92bc16ff4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 13:29:11 +0300 Subject: Fix #4023 Close #4024 --- system/helpers/string_helper.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 28e6ab15f..637835160 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -253,7 +253,7 @@ if ( ! function_exists('increment_string')) */ function increment_string($str, $separator = '_', $first = 1) { - preg_match('/(.+)' . preg_quote($separator) . '([0-9]+)$/', $str, $match); + preg_match('/(.+)'.preg_quote($separator, '/').'([0-9]+)$/', $str, $match); return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first; } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cfa0f69a5..dcdd36b57 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -78,6 +78,7 @@ Bug fixes for 3.0.1 - Fixed a bug (#4015) - :doc:`Email Library ` method ``set_header()`` didn't support method chaining, although it was advertised. - Fixed a bug (#4027) - :doc:`Routing ` with HTTP verbs only worked if the route request method was declared in all-lowercase letters. - Fixed a bug (#4026) - :doc:`Database Transactions ` always rollback if any previous ``query()`` call fails. +- Fixed a bug (#4023) - :doc:`String Helper ` function ``increment_string()`` didn't escape its ``$separator`` parameter. Version 3.0.0 ============= -- cgit v1.2.3-24-g4f1b From 25e77bfa73ef30f02f81b5500e993e9fc3887e03 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 13:33:24 +0300 Subject: [ci skip] Add a note about string helpers --- user_guide_src/source/helpers/string_helper.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index a1acb215c..53052557e 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -5,6 +5,9 @@ String Helper The String Helper file contains functions that assist in working with strings. +.. important:: Please note that these functions are NOT intended, nor + suitable to be used for any kind of security-related logic. + .. contents:: :local: -- cgit v1.2.3-24-g4f1b From 53f8882f2b3db294aa75a0dc95e7a21c72c6e854 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:37:02 +0300 Subject: [ci skip] Add 3.0.1 release date to changelog --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index dcdd36b57..62ba4ec55 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.0.1 ============= -Release Date: Not Released +Release Date: August 7, 2015 - Core -- cgit v1.2.3-24-g4f1b From f489474b3242f9484a03b48dd6b9af04246fead1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:37:02 +0300 Subject: [ci skip] Add 3.0.1 release date to changelog --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index dcdd36b57..62ba4ec55 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.0.1 ============= -Release Date: Not Released +Release Date: August 7, 2015 - Core -- cgit v1.2.3-24-g4f1b From 1c0f46ad96a923329d7defc92d0e7d93faf00935 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:42:29 +0300 Subject: [ci skip] Start of 3.0.2-dev --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 ++++++ user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index ddf322749..b69630cf8 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.1-dev'); + define('CI_VERSION', '3.0.2-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 62ba4ec55..7d8ef835c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,12 @@ Change Log ########## +Version 3.0.2 +============= + +Release Date: Not Released + + Version 3.0.1 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 1704654b6..d77c1e63f 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.1' +version = '3.0.2-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.0-dev' +release = '3.0.2-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 16c8e537a..0026052c1 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.0.1-dev (Current version) `_ +- `CodeIgniter v3.0.2-dev (Current version) `_ +- `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ - `CodeIgniter v2.2.3 `_ - `CodeIgniter v2.2.2 `_ -- cgit v1.2.3-24-g4f1b From 52b663d3df611817cc38fc93e3a564ca7c41b9a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:44:41 +0300 Subject: [ci skip] Start of 3.1.0-dev --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 ++++++ user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index ddf322749..fece65bde 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.1-dev'); + define('CI_VERSION', '3.1.0-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 62ba4ec55..0a1651cb3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,12 @@ Change Log ########## +Version 3.1.0 +============= + +Release Date: Not Released + + Version 3.0.1 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 1704654b6..de55513bf 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.1' +version = '3.1.0-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.0-dev' +release = '3.1.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/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 16c8e537a..4fe36dd64 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.0.1-dev (Current version) `_ +- `CodeIgniter v3.1.0-dev (Current version) `_ +- `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ - `CodeIgniter v2.2.3 `_ - `CodeIgniter v2.2.2 `_ -- cgit v1.2.3-24-g4f1b From de82e175cd333a503a43f53a00f19c2513573d97 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:49:50 +0300 Subject: [ci skip] Add 3.0.2 upgrade instructions file --- user_guide_src/source/installation/upgrade_302.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 2 files changed, 15 insertions(+) create mode 100644 user_guide_src/source/installation/upgrade_302.rst diff --git a/user_guide_src/source/installation/upgrade_302.rst b/user_guide_src/source/installation/upgrade_302.rst new file mode 100644 index 000000000..755e7788b --- /dev/null +++ b/user_guide_src/source/installation/upgrade_302.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.1 to 3.0.2 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index e0f0dd5b7..76fe434b5 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.0.1 to 3.0.2 Upgrading from 3.0.0 to 3.0.1 Upgrading from 2.2.x to 3.0.x Upgrading from 2.2.2 to 2.2.3 -- cgit v1.2.3-24-g4f1b From d2891cf972c8a80af4c949a0abe2f581e0d25a56 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:49:50 +0300 Subject: [ci skip] Add 3.0.2 upgrade instructions file --- user_guide_src/source/installation/upgrade_302.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 2 files changed, 15 insertions(+) create mode 100644 user_guide_src/source/installation/upgrade_302.rst diff --git a/user_guide_src/source/installation/upgrade_302.rst b/user_guide_src/source/installation/upgrade_302.rst new file mode 100644 index 000000000..755e7788b --- /dev/null +++ b/user_guide_src/source/installation/upgrade_302.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.1 to 3.0.2 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index e0f0dd5b7..76fe434b5 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.0.1 to 3.0.2 Upgrading from 3.0.0 to 3.0.1 Upgrading from 2.2.x to 3.0.x Upgrading from 2.2.2 to 2.2.3 -- cgit v1.2.3-24-g4f1b From a7b8df729c8b821f936a090031d02e59ae6426e6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 14:52:06 +0300 Subject: [ci skip] Add 3.1.0 upgrade instructions file --- user_guide_src/source/installation/upgrade_310.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 2 files changed, 15 insertions(+) create mode 100644 user_guide_src/source/installation/upgrade_310.rst diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst new file mode 100644 index 000000000..7060ebc4c --- /dev/null +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.x to 3.1.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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 76fe434b5..9dda16786 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.0.x to 3.1.x Upgrading from 3.0.1 to 3.0.2 Upgrading from 3.0.0 to 3.0.1 Upgrading from 2.2.x to 3.0.x -- cgit v1.2.3-24-g4f1b From a12cf285cd3c72c6faf572ca208c5891bb2f1631 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 17:37:05 +0300 Subject: [ci skip] Partial patch for #2284 The issue description is about update_string(), which I'm not sure if can be fixed at all. This patch only addresses protect_identifiers(). --- system/database/DB_driver.php | 7 +++++-- user_guide_src/source/changelog.rst | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 659664db9..34d3a5979 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1788,12 +1788,15 @@ abstract class CI_DB_driver { // with an alias. While we're at it, we will escape the components if (strpos($item, '.') !== FALSE) { - $parts = explode('.', $item); + $parts = explode('.', $item); // Does the first segment of the exploded item match // one of the aliases previously identified? If so, // we have nothing more to do other than escape the item - if (in_array($parts[0], $this->qb_aliased_tables)) + // + // NOTE: The ! empty() condition prevents this method + // from breaking when QB isn't enabled. + if ( ! empty($this->qb_aliased_tables) && in_array($parts[0], $this->qb_aliased_tables)) { if ($protect_identifiers === TRUE) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7d8ef835c..4988157e9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.0.2 Release Date: Not Released +Bug fixes for 3.0.2 +------------------- + +- Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 67295d93c2c001421ade797232950db8397b00d3 Mon Sep 17 00:00:00 2001 From: Mat Whitney Date: Mon, 10 Aug 2015 08:01:20 -0700 Subject: Fix path for CLI error templates in upgrade doc --- user_guide_src/source/installation/upgrade_301.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/upgrade_301.rst b/user_guide_src/source/installation/upgrade_301.rst index f38d34008..450cdb288 100644 --- a/user_guide_src/source/installation/upgrade_301.rst +++ b/user_guide_src/source/installation/upgrade_301.rst @@ -16,4 +16,4 @@ Replace all files and directories in your *system/* directory. Step 2: Update your CLI error templates ======================================= -Replace all files under your *application/errors/cli/* directory. \ No newline at end of file +Replace all files under your *application/views/errors/cli/* directory. -- cgit v1.2.3-24-g4f1b From cdde5a0ec6302e6b6817a04df1edfa7889c45e74 Mon Sep 17 00:00:00 2001 From: Mat Whitney Date: Mon, 10 Aug 2015 08:01:20 -0700 Subject: Fix path for CLI error templates in upgrade doc --- user_guide_src/source/installation/upgrade_301.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/upgrade_301.rst b/user_guide_src/source/installation/upgrade_301.rst index f38d34008..450cdb288 100644 --- a/user_guide_src/source/installation/upgrade_301.rst +++ b/user_guide_src/source/installation/upgrade_301.rst @@ -16,4 +16,4 @@ Replace all files and directories in your *system/* directory. Step 2: Update your CLI error templates ======================================= -Replace all files under your *application/errors/cli/* directory. \ No newline at end of file +Replace all files under your *application/views/errors/cli/* directory. -- cgit v1.2.3-24-g4f1b From 0d60a21187e2611cc4cf0ef2d7322c9b91c002b9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 13 Aug 2015 13:14:59 +0300 Subject: Update config/constants.php with defined() checks Allows for easier override with an environment-based configs. Close #4045 --- application/config/constants.php | 68 +++++++++++----------- user_guide_src/source/changelog.rst | 4 ++ user_guide_src/source/installation/upgrade_302.rst | 10 ++++ 3 files changed, 48 insertions(+), 34 deletions(-) diff --git a/application/config/constants.php b/application/config/constants.php index 48283e223..e8d2c00ea 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -1,6 +1,18 @@ Date: Thu, 13 Aug 2015 13:14:59 +0300 Subject: Update config/constants.php with defined() checks Allows for easier override with an environment-based configs. Close #4045 --- application/config/constants.php | 68 +++++++++++----------- user_guide_src/source/changelog.rst | 14 +++++ user_guide_src/source/installation/upgrade_302.rst | 10 ++++ 3 files changed, 58 insertions(+), 34 deletions(-) diff --git a/application/config/constants.php b/application/config/constants.php index 48283e223..e8d2c00ea 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -1,6 +1,18 @@ ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. + Version 3.0.1 ============= diff --git a/user_guide_src/source/installation/upgrade_302.rst b/user_guide_src/source/installation/upgrade_302.rst index 755e7788b..93d87ac41 100644 --- a/user_guide_src/source/installation/upgrade_302.rst +++ b/user_guide_src/source/installation/upgrade_302.rst @@ -12,3 +12,13 @@ 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: Update your application/config/constants.php file +========================================================= + +The *application/config/constants.php* file has been updated to check +if constants aren't already defined before doing that, making it easier +to add an environment-specific configuration. + +.. note:: If you've made modifications to this file, please make a + backup first and cross-check the differences first. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b4e1fb248cf173474acd549c024a0df030b0f20f Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 13 Aug 2015 10:21:42 -0400 Subject: Fix typo in comments --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index ce324a1cc..ad3ca9f93 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -677,7 +677,7 @@ if ( ! function_exists('_shutdown_handler')) * of CodeIgniter.php. The main reason we use this is to simulate * a complete custom exception handler. * - * E_STRICT is purposivly neglected because such events may have + * E_STRICT is purposively neglected because such events may have * been caught. Duplication or none? None is preferred for now. * * @link http://insomanic.me.uk/post/229851073/php-trick-catching-fatal-errors-e-error-with-a -- cgit v1.2.3-24-g4f1b From 62fe0117ae087ccfb5fd94cc9f83977c86f2452f Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 13 Aug 2015 10:21:42 -0400 Subject: Fix typo in comments --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index ce324a1cc..ad3ca9f93 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -677,7 +677,7 @@ if ( ! function_exists('_shutdown_handler')) * of CodeIgniter.php. The main reason we use this is to simulate * a complete custom exception handler. * - * E_STRICT is purposivly neglected because such events may have + * E_STRICT is purposively neglected because such events may have * been caught. Duplication or none? None is preferred for now. * * @link http://insomanic.me.uk/post/229851073/php-trick-catching-fatal-errors-e-error-with-a -- cgit v1.2.3-24-g4f1b From c2c7cb7e9d869ba8ba8b16a04e5d8300d462d8de Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 14 Aug 2015 13:48:31 +0300 Subject: Fix #4052 The bug actually had two instances: - Callback routes with literal matches and HTTP verbs has never worked - The reported issue in #4052, which is a regression introduced in 3.0.1 with abc299b3a234eb7da1b7e3d257b7eba2da649219 Removed the literal matches logic altogether to avoid similar issues in the future and reduce code complexity. The same logic is performed with the regular expressions logic. --- system/core/Router.php | 20 -------------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/system/core/Router.php b/system/core/Router.php index 0c793e418..eb868cd5b 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -372,26 +372,6 @@ class CI_Router { // Get HTTP verb $http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli'; - // Is there a literal match? If so we're done - if (isset($this->routes[$uri])) - { - // Is it an HTTP verb-based route? - if (is_array($this->routes[$uri])) - { - $route = array_change_key_case($this->routes[$uri], CASE_LOWER); - if (isset($route[$http_verb])) - { - $this->_set_request(explode('/', $route[$http_verb])); - return; - } - } - else - { - $this->_set_request(explode('/', $this->routes[$uri])); - return; - } - } - // Loop through the route array looking for wildcards foreach ($this->routes as $key => $val) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 971a2341c..061efe8fe 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.0.2 ------------------- - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. +- Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 4db3793b34f24320d26cf7c6fb7396edf5f43791 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 14 Aug 2015 13:51:49 +0300 Subject: [ci skip] Encryption doc fix Close #4051 --- user_guide_src/source/libraries/encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/encryption.rst b/user_guide_src/source/libraries/encryption.rst index 599be4df0..7afefa596 100644 --- a/user_guide_src/source/libraries/encryption.rst +++ b/user_guide_src/source/libraries/encryption.rst @@ -75,7 +75,7 @@ process that allows you to be the only one who is able to decrypt data that you've decided to hide from the eyes of the public. After one key is used to encrypt data, that same key provides the **only** means to decrypt it, so not only must you chose one carefully, but you -must not lose it or you will also use the encrypted data. +must not lose it or you will also lose access the data. It must be noted that to ensure maximum security, such key *should* not only be as strong as possible, but also often changed. Such behavior -- cgit v1.2.3-24-g4f1b From ec6a4034799d881b8b8d4c9134f487237719654c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 15 Aug 2015 08:58:46 +0300 Subject: [ci skip] Fix a doc typo --- user_guide_src/source/libraries/encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/encryption.rst b/user_guide_src/source/libraries/encryption.rst index 7afefa596..cac4b7921 100644 --- a/user_guide_src/source/libraries/encryption.rst +++ b/user_guide_src/source/libraries/encryption.rst @@ -75,7 +75,7 @@ process that allows you to be the only one who is able to decrypt data that you've decided to hide from the eyes of the public. After one key is used to encrypt data, that same key provides the **only** means to decrypt it, so not only must you chose one carefully, but you -must not lose it or you will also lose access the data. +must not lose it or you will also lose access to the data. It must be noted that to ensure maximum security, such key *should* not only be as strong as possible, but also often changed. Such behavior -- cgit v1.2.3-24-g4f1b From d45180cb98cd987e2d5cce57a7965a87ee2aed7b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 15 Aug 2015 09:09:38 +0300 Subject: Fix #4056 --- system/core/Input.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Input.php b/system/core/Input.php index e1319be8d..d896495e9 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -803,7 +803,7 @@ class CI_Input { if ( ! isset($headers)) { - empty($this->headers) OR $this->request_headers(); + empty($this->headers) && $this->request_headers(); foreach ($this->headers as $key => $value) { $headers[strtolower($key)] = $value; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 061efe8fe..de9c95727 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. +- Fixed a bug (#4056) - :doc:`Input Library ` method ``get_request_header()`` could not return a value unless ``request_headers()`` was called beforehand. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 825fab7370a28b6c05da126842dd8df25e51e026 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 17 Aug 2015 09:52:42 +0300 Subject: Allow capitals in the middle of model names Requested in #4059 --- system/core/Loader.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 5de7a9483..18e4c5287 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -290,7 +290,7 @@ class CI_Loader { load_class('Model', 'core'); } - $model = ucfirst(strtolower($model)); + $model = ucfirst($model); if ( ! class_exists($model)) { foreach ($this->_ci_model_paths as $mod_path) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index de9c95727..2d000ad6f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - General Changes - Updated the *application/config/constants.php* file to check if constants aren't already defined before doing that. + - Changed :doc:`Loader Library ` method ``model()`` to only apply ``ucfirst()`` and not ``strtolower()`` to the requested class name. Bug fixes for 3.0.2 ------------------- -- cgit v1.2.3-24-g4f1b From eb492589cb6ba0faaadadebe2a5cd333de80b6c4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 19 Aug 2015 11:16:52 +0300 Subject: [ci skip] Fix 'sqlsrv' connect failure endless loop Reported via the forums: http://forum.codeigniter.com/thread-61494.html --- system/database/drivers/sqlsrv/sqlsrv_driver.php | 15 ++++++++------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 16f77fab2..8d383b274 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -141,13 +141,14 @@ class CI_DB_sqlsrv_driver extends CI_DB { unset($connection['UID'], $connection['PWD']); } - $this->conn_id = sqlsrv_connect($this->hostname, $connection); - - // Determine how identifiers are escaped - $query = $this->query('SELECT CASE WHEN (@@OPTIONS | 256) = @@OPTIONS THEN 1 ELSE 0 END AS qi'); - $query = $query->row_array(); - $this->_quoted_identifier = empty($query) ? FALSE : (bool) $query['qi']; - $this->_escape_char = ($this->_quoted_identifier) ? '"' : array('[', ']'); + if (FALSE !== ($this->conn_id = sqlsrv_connect($this->hostname, $connection))) + { + // Determine how identifiers are escaped + $query = $this->query('SELECT CASE WHEN (@@OPTIONS | 256) = @@OPTIONS THEN 1 ELSE 0 END AS qi'); + $query = $query->row_array(); + $this->_quoted_identifier = empty($query) ? FALSE : (bool) $query['qi']; + $this->_escape_char = ($this->_quoted_identifier) ? '"' : array('[', ']'); + } return $this->conn_id; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2d000ad6f..a0a54c34b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. - Fixed a bug (#4056) - :doc:`Input Library ` method ``get_request_header()`` could not return a value unless ``request_headers()`` was called beforehand. +- Fixed a bug where the :doc:`Database Class ` entered an endless loop if it fails to connect with the 'sqlsrv' driver. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From be178a79382cae5079622396f8f9679a15e0f58b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Aug 2015 13:23:21 +0300 Subject: Fix #4065 --- system/database/DB_driver.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 34d3a5979..9c4d7e007 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1760,7 +1760,7 @@ abstract class CI_DB_driver { } // Convert tabs or multiple spaces into single spaces - $item = preg_replace('/\s+/', ' ', $item); + $item = preg_replace('/\s+/', ' ', trim($item)); // If the item has an alias declaration we remove it and set it aside. // Note: strripos() is used in order to support spaces in table names diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a0a54c34b..b355d8d9e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. - Fixed a bug (#4056) - :doc:`Input Library ` method ``get_request_header()`` could not return a value unless ``request_headers()`` was called beforehand. - Fixed a bug where the :doc:`Database Class ` entered an endless loop if it fails to connect with the 'sqlsrv' driver. +- Fixed a bug (#4065) - :doc:`Database ` method ``protect_identifiers()`` treats a traling space as an alias separator if the input doesn't contain ' AS '. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 53626ec7797292979f568e72cd2458d7ca1b25ef Mon Sep 17 00:00:00 2001 From: Dotan Cohen Date: Sun, 23 Aug 2015 17:32:54 +0300 Subject: Specify to which character dashes will be replaced --- application/config/routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/config/routes.php b/application/config/routes.php index a98c6d122..599c79b0e 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -43,8 +43,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | This is not exactly a route, but allows you to automatically route | controller and method names that contain dashes. '-' isn't a valid | class or method name character, so it requires translation. -| When you set this option to TRUE, it will replace ALL dashes in the -| controller and method URI segments. +| When you set this option to TRUE, it will replace ALL dashes with +| underscores in the controller and method URI segments. | | Examples: my-controller/index -> my_controller/index | my-controller/my-method -> my_controller/my_method -- cgit v1.2.3-24-g4f1b From 32b0038062a87a6f210ceb2b8682e9376538e1b9 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Sun, 23 Aug 2015 17:52:27 +0300 Subject: A minor documentation correction about Image_lib, the default value of the option 'wm_shadow_distance' is 2 actually. --- user_guide_src/source/libraries/image_lib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index e5f7c000f..40a280b5c 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -282,7 +282,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. ======================= =================== =================== ========================================================================== -- cgit v1.2.3-24-g4f1b From 01bb8dafa5af458c9799d80804f458edc9bf5237 Mon Sep 17 00:00:00 2001 From: Tomasz Turkowski Date: Fri, 28 Aug 2015 01:12:04 +0200 Subject: Change if is not set or count equals zero into if empty --- system/database/DB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB.php b/system/database/DB.php index 0c7cf54b3..23de414b5 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -82,7 +82,7 @@ function &DB($params = '', $query_builder_override = NULL) } } - if ( ! isset($db) OR count($db) === 0) + if (empty($db)) { show_error('No database connection settings were found in the database config file.'); } -- cgit v1.2.3-24-g4f1b From 24a4a6ac476b0ca1d47d01fdb8f2b3a6e7b39c24 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Aug 2015 15:11:47 +0300 Subject: Fix #4066 --- system/libraries/Cache/drivers/Cache_memcached.php | 10 ++-------- system/libraries/Cache/drivers/Cache_redis.php | 14 ++++---------- user_guide_src/source/changelog.rst | 1 + 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 111e2109d..59cf4685d 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -106,7 +106,7 @@ class CI_Cache_memcached extends CI_Driver { } else { - throw new RuntimeException('Cache: Failed to create Memcache(d) object; extension not loaded?'); + log_message('error', 'Cache: Failed to create Memcache(d) object; extension not loaded?'); } foreach ($this->_memcache_conf as $cache_server) @@ -284,12 +284,6 @@ class CI_Cache_memcached extends CI_Driver { */ public function is_supported() { - if ( ! extension_loaded('memcached') && ! extension_loaded('memcache')) - { - log_message('debug', 'The Memcached Extension must be loaded to use Memcached Cache.'); - return FALSE; - } - - return TRUE; + return (extension_loaded('memcached') OR extension_loaded('memcache')); } } diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index d7dca1973..2825acfd3 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -115,17 +115,17 @@ class CI_Cache_redis extends CI_Driver if ( ! $success) { - throw new RuntimeException('Cache: Redis connection failed. Check your configuration.'); + log_message('error', 'Cache: Redis connection failed. Check your configuration.'); } } catch (RedisException $e) { - throw new RuntimeException('Cache: Redis connection refused ('.$e->getMessage().')'); + log_message('error', 'Cache: Redis connection refused ('.$e->getMessage().')'); } if (isset($config['password']) && ! $this->_redis->auth($config['password'])) { - throw new RuntimeException('Cache: Redis authentication failed.'); + log_message('error', 'Cache: Redis authentication failed.'); } // Initialize the index of serialized values. @@ -298,13 +298,7 @@ class CI_Cache_redis extends CI_Driver */ public function is_supported() { - if ( ! extension_loaded('redis')) - { - log_message('debug', 'The Redis extension must be loaded to use Redis cache.'); - return FALSE; - } - - return TRUE; + return extension_loaded('redis'); } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b355d8d9e..7c671c0b7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -20,6 +20,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4056) - :doc:`Input Library ` method ``get_request_header()`` could not return a value unless ``request_headers()`` was called beforehand. - Fixed a bug where the :doc:`Database Class ` entered an endless loop if it fails to connect with the 'sqlsrv' driver. - Fixed a bug (#4065) - :doc:`Database ` method ``protect_identifiers()`` treats a traling space as an alias separator if the input doesn't contain ' AS '. +- Fixed a bug (#4066) - :doc:`Cache Library ` couldn't fallback to a backup driver if the primary one is Memcache(d) or Redis. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 8e138eced12fa88da721cc9b840fe4aa02c9e031 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Aug 2015 15:23:42 +0300 Subject: Fix #4073 --- system/libraries/Email.php | 23 ++++++++++++++++------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 459c8f590..acf3629c3 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1869,20 +1869,26 @@ class CI_Email { return FALSE; } - $this->_send_command('from', $this->clean_email($this->_headers['From'])); + if ( ! $this->_send_command('from', $this->clean_email($this->_headers['From']))) + { + return FALSE; + } foreach ($this->_recipients as $val) { - $this->_send_command('to', $val); + if ( ! $this->_send_command('to', $val)) + { + return FALSE; + } } if (count($this->_cc_array) > 0) { foreach ($this->_cc_array as $val) { - if ($val !== '') + if ($val !== '' && ! $this->_send_command('to', $val)) { - $this->_send_command('to', $val); + return FALSE; } } } @@ -1891,14 +1897,17 @@ class CI_Email { { foreach ($this->_bcc_array as $val) { - if ($val !== '') + if ($val !== '' && ! $this->_send_command('to', $val)) { - $this->_send_command('to', $val); + return FALSE; } } } - $this->_send_command('data'); + if ( ! $this->_send_command('data')) + { + return FALSE; + } // perform dot transformation on any lines that begin with a dot $this->_send_data($this->_header_str.preg_replace('/^\./m', '..$1', $this->_finalbody)); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7c671c0b7..bdde1ca97 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -21,6 +21,7 @@ Bug fixes for 3.0.2 - Fixed a bug where the :doc:`Database Class ` entered an endless loop if it fails to connect with the 'sqlsrv' driver. - Fixed a bug (#4065) - :doc:`Database ` method ``protect_identifiers()`` treats a traling space as an alias separator if the input doesn't contain ' AS '. - Fixed a bug (#4066) - :doc:`Cache Library ` couldn't fallback to a backup driver if the primary one is Memcache(d) or Redis. +- Fixed a bug (#4073) - :doc:`Email Library ` method ``send()`` could return TRUE in case of an actual failure when an SMTP command fails. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 64f3d3de0296846ed18f46a85be43962eaab79a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Aug 2015 16:17:57 +0300 Subject: [ci skip] Fix incorrect routing description Close #4079 --- user_guide_src/source/installation/upgrade_300.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 971f9e484..4b3b408a7 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -266,8 +266,7 @@ cause your 'Main' controller to be loaded. However, what happens if you have an *application/controllers/admin/* directory and the user visits ``http://example.com/admin/``? In CodeIgniter 3, the router will look for a 'Main' controller under the -admin/ directory as well. If not found, it will fallback to the parent -(*application/controllers/*) directory, like in version 2.x. +admin/ directory as well. If not found, a Not Found (404) will be triggered. The same rule applies to the '404_override' setting. -- cgit v1.2.3-24-g4f1b From 348a2d445b9d059aab4f5113a380f05eb2cd92d9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Aug 2015 17:39:04 +0300 Subject: Fix #4086 --- system/database/DB_driver.php | 26 +++++++++++++------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 9c4d7e007..2fb70ac58 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1,4 +1,4 @@ -_like_escape_str, $this->_like_escape_chr)), '/') : ''; $_operators = array( - '\s*(?:<|>|!)?=\s*', // =, <=, >=, != - '\s*<>?\s*', // <, <> - '\s*>\s*', // > - '\s+IS NULL', // IS NULL - '\s+IS NOT NULL', // IS NOT NULL - '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) - '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) - '\s+BETWEEN\s+\S+\s+AND\s+\S+', // BETWEEN value AND value - '\s+IN\s*\([^\)]+\)', // IN(list) - '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) - '\s+LIKE\s+\S+'.$_les, // LIKE 'expr'[ ESCAPE '%s'] - '\s+NOT LIKE\s+\S+'.$_les // NOT LIKE 'expr'[ ESCAPE '%s'] + '\s*(?:<|>|!)?=\s*', // =, <=, >=, != + '\s*<>?\s*', // <, <> + '\s*>\s*', // > + '\s+IS NULL', // IS NULL + '\s+IS NOT NULL', // IS NOT NULL + '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) + '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) + '\s+BETWEEN\s+\S+\s+AND\s+\S+', // BETWEEN value AND value + '\s+IN\s*\([^\)]+\)', // IN(list) + '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) + '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] + '\s+NOT LIKE\s+\S.*('.$_les.')?' // NOT LIKE 'expr'[ ESCAPE '%s'] ); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index bdde1ca97..00d992afc 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4065) - :doc:`Database ` method ``protect_identifiers()`` treats a traling space as an alias separator if the input doesn't contain ' AS '. - Fixed a bug (#4066) - :doc:`Cache Library ` couldn't fallback to a backup driver if the primary one is Memcache(d) or Redis. - Fixed a bug (#4073) - :doc:`Email Library ` method ``send()`` could return TRUE in case of an actual failure when an SMTP command fails. +- Fixed a bug (#4086) - :doc:`Query Builder ` didn't apply *dbprefix* to LIKE conditions if the pattern included spaces. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 4dac6ebaf363c60b2c1413db11f0dcd862177fa1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Aug 2015 17:52:27 +0300 Subject: [ci skip] Fix #4091 --- system/libraries/Cache/drivers/Cache_file.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 68bc1ec96..c046f3b7d 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -267,7 +267,7 @@ class CI_Cache_file extends CI_Driver { */ protected function _get($id) { - if ( ! file_exists($this->_cache_path.$id)) + if ( ! is_file($this->_cache_path.$id)) { return FALSE; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 00d992afc..54dcea8be 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4066) - :doc:`Cache Library ` couldn't fallback to a backup driver if the primary one is Memcache(d) or Redis. - Fixed a bug (#4073) - :doc:`Email Library ` method ``send()`` could return TRUE in case of an actual failure when an SMTP command fails. - Fixed a bug (#4086) - :doc:`Query Builder ` didn't apply *dbprefix* to LIKE conditions if the pattern included spaces. +- Fixed a bug (#4091) - :doc:`Cache Library ` 'file' driver could be tricked into accepting empty cache item IDs. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 89726cd625e57103890fff3c556578586be825b6 Mon Sep 17 00:00:00 2001 From: Marco Monteiro Date: Tue, 1 Sep 2015 09:50:21 +0100 Subject: There was an extra = sign in this file --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 2fb70ac58..0c2e49974 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1,4 +1,4 @@ -= Date: Tue, 1 Sep 2015 12:03:16 +0300 Subject: [ci skip] Remove a bad advice from the Security lib docs --- user_guide_src/source/libraries/security.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/user_guide_src/source/libraries/security.rst b/user_guide_src/source/libraries/security.rst index 305a8e57c..2cbe46f4d 100644 --- a/user_guide_src/source/libraries/security.rst +++ b/user_guide_src/source/libraries/security.rst @@ -27,10 +27,6 @@ or other types of code that attempt to hijack cookies or do other malicious things. If anything disallowed is encountered it is rendered safe by converting the data to character entities. -Note: This function should only be used to deal with data upon -submission. It's not something that should be used for general runtime -processing since it requires a fair amount of processing overhead. - To filter data through the XSS filter use the ``xss_clean()`` method:: $data = $this->security->xss_clean($data); -- cgit v1.2.3-24-g4f1b From 61ac7bdd8291251f5709a3212b234ea5030340ef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Sep 2015 12:07:25 +0300 Subject: [ci skip] Reduce/improve wording of xss_clean() description --- user_guide_src/source/libraries/security.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/user_guide_src/source/libraries/security.rst b/user_guide_src/source/libraries/security.rst index 2cbe46f4d..f7604ef00 100644 --- a/user_guide_src/source/libraries/security.rst +++ b/user_guide_src/source/libraries/security.rst @@ -16,16 +16,11 @@ application, processing input data for security. XSS Filtering ************* -CodeIgniter comes with a Cross Site Scripting Hack prevention filter -which can either run automatically to filter all POST and COOKIE data -that is encountered, or you can run it on a per item basis. By default -it does **not** run globally since it requires a bit of processing -overhead, and since you may not need it in all cases. - -The XSS filter looks for commonly used techniques to trigger Javascript -or other types of code that attempt to hijack cookies or do other -malicious things. If anything disallowed is encountered it is rendered -safe by converting the data to character entities. +CodeIgniter comes with a Cross Site Scripting prevention filter, which +looks for commonly used techniques to trigger JavaScript or other types +of code that attempt to hijack cookies or do other malicious things. +If anything disallowed is encountered it is rendered safe by converting +the data to character entities. To filter data through the XSS filter use the ``xss_clean()`` method:: -- cgit v1.2.3-24-g4f1b From 20573bd472bdeaa831074e563f239585554ffaf5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Sep 2015 12:46:06 +0300 Subject: [ci skip] Correct session database setup docs --- application/config/config.php | 3 +++ user_guide_src/source/libraries/sessions.rst | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index a4d883fab..479d591a4 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -344,6 +344,9 @@ $config['encryption_key'] = ''; | | Whether to match the user's IP address when reading the session data. | +| WARNING: If you're using the database driver, don't forget to update +| your session table's PRIMARY KEY when changing this setting. +| | 'sess_time_to_update' | | How many seconds between CI regenerating the session ID. diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 2034ed2b0..9c9761bbf 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -598,7 +598,6 @@ For MySQL:: `ip_address` varchar(45) NOT NULL, `timestamp` int(10) unsigned DEFAULT 0 NOT NULL, `data` blob NOT NULL, - PRIMARY KEY (id), KEY `ci_sessions_timestamp` (`timestamp`) ); @@ -608,17 +607,23 @@ For PostgreSQL:: "id" varchar(40) NOT NULL, "ip_address" varchar(45) NOT NULL, "timestamp" bigint DEFAULT 0 NOT NULL, - "data" text DEFAULT '' NOT NULL, - PRIMARY KEY ("id") + "data" text DEFAULT '' NOT NULL ); CREATE INDEX "ci_sessions_timestamp" ON "ci_sessions" ("timestamp"); -However, if you want to turn on the *sess_match_ip* setting, you should -also do the following, after creating the table:: +You will also need to add a PRIMARY KEY **depending on your 'sess_match_ip' +setting**. The examples below work both on MySQL and PostgreSQL:: + + // When sess_match_ip = TRUE + ALTER TABLE ci_sessions ADD PRIMARY KEY (id, ip_address); + + // When sess_match_ip = FALSE + ALTER TABLE ci_sessions ADD PRIMARY KEY (id); + + // To drop a previously created primary key (use when changing the setting) + ALTER TABLE ci_sessions DROP PRIMARY KEY; - // Works both on MySQL and PostgreSQL - ALTER TABLE ci_sessions ADD CONSTRAINT ci_sessions_id_ip UNIQUE (id, ip_address); .. important:: Only MySQL and PostgreSQL databases are officially supported, due to lack of advisory locking mechanisms on other -- cgit v1.2.3-24-g4f1b From 554b452845e9ec26e1cd348fda607cf00d2a5026 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Sep 2015 13:51:26 +0300 Subject: Fix #4093 --- system/database/DB_query_builder.php | 2 +- tests/codeigniter/database/query_builder/where_test.php | 8 ++++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 7f3334763..cf1100d27 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -2342,7 +2342,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // Split multiple conditions $conditions = preg_split( - '/((^|\s+)AND\s+|(^|\s+)OR\s+)/i', + '/((?:^|\s+)AND\s+|(?:^|\s+)OR\s+)/i', $this->{$qb_key}[$i]['condition'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY diff --git a/tests/codeigniter/database/query_builder/where_test.php b/tests/codeigniter/database/query_builder/where_test.php index 20b7a567c..46a7fa2eb 100644 --- a/tests/codeigniter/database/query_builder/where_test.php +++ b/tests/codeigniter/database/query_builder/where_test.php @@ -123,4 +123,12 @@ class Where_test extends CI_TestCase { $this->assertEquals('Musician', $jobs[1]['name']); } + // ------------------------------------------------------------------------ + + public function test_issue4093() + { + $input = 'bar and baz or qux'; + $sql = $this->db->where('foo', $input)->get_compiled_select('dummy'); + $this->assertEquals("'".$input."'", substr($sql, -20)); + } } \ No newline at end of file diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 54dcea8be..69a7ed485 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -24,6 +24,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4073) - :doc:`Email Library ` method ``send()`` could return TRUE in case of an actual failure when an SMTP command fails. - Fixed a bug (#4086) - :doc:`Query Builder ` didn't apply *dbprefix* to LIKE conditions if the pattern included spaces. - Fixed a bug (#4091) - :doc:`Cache Library ` 'file' driver could be tricked into accepting empty cache item IDs. +- Fixed a bug (#4093) - :doc:`Query Builder ` modified string values containing 'AND', 'OR' while compiling WHERE conditions. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 4e0d88ab2fd59d310e273ec3087b582e9d266012 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Sep 2015 14:02:07 +0300 Subject: Enable Travis builds for 3.0-stable branch --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 258ad76f1..adc60d759 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,4 +48,5 @@ matrix: branches: only: - develop + - 3.0-stable - /^feature\/.+$/ -- cgit v1.2.3-24-g4f1b From c283443ad0c839a02485e071171ced644f017a1f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 2 Sep 2015 14:30:04 +0300 Subject: [ci skip] Improve FV language string instructions As suggested in #4095 --- user_guide_src/source/libraries/form_validation.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index be6d1f233..1fde68d73 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -547,7 +547,10 @@ All of the native error messages are located in the following language file: **system/language/english/form_validation_lang.php** To set your own global custom message for a rule, you can either -edit that file, or use the following method:: +extend/override the language file by creating your own in +**application/language/english/form_validation_lang.php** (read more +about this in the :doc:`Language Class ` documentation), +or use the following method:: $this->form_validation->set_message('rule', 'Error Message'); -- cgit v1.2.3-24-g4f1b From 0d0c53c50ccf34a216b19e90d2dc6adc51436f44 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 3 Sep 2015 11:23:44 +0300 Subject: Fix #4096 --- system/database/DB_driver.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 0c2e49974..fe0cd7d32 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1487,7 +1487,7 @@ abstract class CI_DB_driver { '\s+IS NOT NULL', // IS NOT NULL '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) - '\s+BETWEEN\s+\S+\s+AND\s+\S+', // BETWEEN value AND value + '\s+BETWEEN\s+', // BETWEEN value AND value '\s+IN\s*\([^\)]+\)', // IN(list) '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 69a7ed485..5fa9c7805 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4086) - :doc:`Query Builder ` didn't apply *dbprefix* to LIKE conditions if the pattern included spaces. - Fixed a bug (#4091) - :doc:`Cache Library ` 'file' driver could be tricked into accepting empty cache item IDs. - Fixed a bug (#4093) - :doc:`Query Builder ` modified string values containing 'AND', 'OR' while compiling WHERE conditions. +- Fixed a bug (#4096) - :doc:`Query Builder ` didn't apply *dbprefix* when compiling BETWEEN conditions. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From dd28a888e8d9934260b14d0b7601da375fe75b8d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Sep 2015 16:03:05 +0300 Subject: Move csrf_verify() call out of _sanitize_globals() It doesn't belong in there. --- system/core/Input.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index d896495e9..67a495e74 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -153,6 +153,12 @@ class CI_Input { // Sanitize global arrays $this->_sanitize_globals(); + // CSRF Protection check + if ($this->_enable_csrf === TRUE && ! is_cli()) + { + $this->security->csrf_verify(); + } + log_message('info', 'Input Class Initialized'); } @@ -647,12 +653,6 @@ class CI_Input { // Sanitize PHP_SELF $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']); - // CSRF Protection check - if ($this->_enable_csrf === TRUE && ! is_cli()) - { - $this->security->csrf_verify(); - } - log_message('debug', 'Global POST, GET and COOKIE data sanitized'); } -- cgit v1.2.3-24-g4f1b From e70238e8acd4ebdf1a3e30d63e8ffb1a46ab6d15 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Sep 2015 16:07:45 +0300 Subject: Remove unnecessary count() calls from _sanitize_globals() foreach() just won't execute for an empty array, it does that check internally. --- system/core/Input.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 67a495e74..4e7a4e95e 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -606,7 +606,7 @@ class CI_Input { { $_GET = array(); } - elseif (is_array($_GET) && count($_GET) > 0) + elseif (is_array($_GET)) { foreach ($_GET as $key => $val) { @@ -615,7 +615,7 @@ class CI_Input { } // Clean $_POST Data - if (is_array($_POST) && count($_POST) > 0) + if (is_array($_POST)) { foreach ($_POST as $key => $val) { @@ -624,7 +624,7 @@ class CI_Input { } // Clean $_COOKIE Data - if (is_array($_COOKIE) && count($_COOKIE) > 0) + if (is_array($_COOKIE)) { // Also get rid of specially treated cookies that might be set by a server // or silly application, that are of no use to a CI application anyway -- cgit v1.2.3-24-g4f1b From 2b2962f1efbdf243b70688690de3f09f9564ad05 Mon Sep 17 00:00:00 2001 From: rich Date: Wed, 9 Sep 2015 15:52:26 -0400 Subject: Change form validation library to allow the pipe character within square brackets --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index d9ecc45f9..af90316a4 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -211,7 +211,7 @@ class CI_Form_validation { return $this; } - $rules = explode('|', $rules); + $rules = preg_split('/\|(?![^\[]*\])/', $rules); } // If the field label wasn't passed we use the field name -- cgit v1.2.3-24-g4f1b From 700619cebf75c4e4fcda6a2d7bea1afb84a029e4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Sep 2015 12:44:50 +0300 Subject: Fix #4106 --- system/core/Security.php | 4 ++-- tests/codeigniter/core/Security_test.php | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 7c5199255..8ca66d297 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -787,11 +787,11 @@ class CI_Security { $count = $temp_count = 0; // replace occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes) - $str = preg_replace('/(<[^>]+)(?]+((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=047))*[^>]*)(?]+)(?]*)/is', '$1[removed]', $str, -1, $temp_count); + $str = preg_replace('/<([^>]+((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=047))*[^>]*)(?]*)/is', '<$1[removed]', $str, -1, $temp_count); $count += $temp_count; } while ($count); diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index bab76dffb..52bb296ad 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -146,6 +146,14 @@ class Security_test extends CI_TestCase { $this->assertEquals('onNoTagAtAll = true', $this->security->remove_evil_attributes('onNoTagAtAll = true', FALSE)); $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); + $this->assertEquals( + '', + $this->security->remove_evil_attributes('', FALSE) + ); + $this->assertEquals( + '', + $this->security->remove_evil_attributes('', FALSE) + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From cc9363541a461fbf52c9892d35d1183a379253e3 Mon Sep 17 00:00:00 2001 From: rich Date: Wed, 9 Sep 2015 15:52:26 -0400 Subject: Change form validation library to allow the pipe character within square brackets --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index d9ecc45f9..af90316a4 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -211,7 +211,7 @@ class CI_Form_validation { return $this; } - $rules = explode('|', $rules); + $rules = preg_split('/\|(?![^\[]*\])/', $rules); } // If the field label wasn't passed we use the field name -- cgit v1.2.3-24-g4f1b From 20f362b85de64b755afdab07b1aeb652e32f1b50 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Sep 2015 13:11:33 +0300 Subject: [ci skip] Add changelog entry for #4105 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5fa9c7805..f3eb71828 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4091) - :doc:`Cache Library ` 'file' driver could be tricked into accepting empty cache item IDs. - Fixed a bug (#4093) - :doc:`Query Builder ` modified string values containing 'AND', 'OR' while compiling WHERE conditions. - Fixed a bug (#4096) - :doc:`Query Builder ` didn't apply *dbprefix* when compiling BETWEEN conditions. +- Fixed a bug (#4105) - :doc:`Form Validation Library ` didn't allow pipe characters inside "bracket parameters" when using a string ruleset. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 72ebac4eed3f5de650a26ffbc34fc0aaaa49c7d4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Sep 2015 13:14:00 +0300 Subject: Fix a broken unit test from 700619cebf75c4e4fcda6a2d7bea1afb84a029e4 --- tests/codeigniter/core/Security_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 52bb296ad..68b52247e 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -151,7 +151,7 @@ class Security_test extends CI_TestCase { $this->security->remove_evil_attributes('', FALSE) ); $this->assertEquals( - '', + '', $this->security->remove_evil_attributes('', FALSE) ); } -- cgit v1.2.3-24-g4f1b From abc6006884658acb4e2302460f87e2f89a5a7e80 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Sep 2015 16:36:22 +0300 Subject: Fix & extend 700619cebf75c4e4fcda6a2d7bea1afb84a029e4 --- system/core/Security.php | 4 ++-- tests/codeigniter/core/Security_test.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 8ca66d297..e4bd327b5 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -787,11 +787,11 @@ class CI_Security { $count = $temp_count = 0; // replace occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes) - $str = preg_replace('/<([^>]+((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=047))*[^>]*)(?]+(((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=\047))[^>]*)*)(?]+((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=047))*[^>]*)(?]*)/is', '<$1[removed]', $str, -1, $temp_count); + $str = preg_replace('/<([^>]+(((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=\047))[^>]*)*)(?]*)/is', '<$1[removed]', $str, -1, $temp_count); $count += $temp_count; } while ($count); diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 68b52247e..8e6d276fc 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -147,12 +147,12 @@ class Security_test extends CI_TestCase { $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); $this->assertEquals( - '', - $this->security->remove_evil_attributes('', FALSE) + '\' [removed]>', + $this->security->remove_evil_attributes('\' onAfterGreaterThan="quotes">', FALSE) ); $this->assertEquals( - '', - $this->security->remove_evil_attributes('', FALSE) + '\' [removed]>', + $this->security->remove_evil_attributes('\' onAfterGreaterThan=noQuotes>', FALSE) ); } -- cgit v1.2.3-24-g4f1b From 12023a79b0c3b45f68cce0357e3009c5884da663 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Sep 2015 18:00:57 +0300 Subject: Last commit didn't adjust a RE index --- system/core/Security.php | 2 +- tests/codeigniter/core/Security_test.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index e4bd327b5..1bc228a11 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -787,7 +787,7 @@ class CI_Security { $count = $temp_count = 0; // replace occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes) - $str = preg_replace('/<([^>]+(((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=\047))[^>]*)*)(?]+(((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=\047))[^>]*)*)(?" baz=\'>\' [removed]>', $this->security->remove_evil_attributes('\' onAfterGreaterThan=noQuotes>', FALSE) ); + + $this->assertEquals( + ' on= onerror=alert(1)>', + $this->security->remove_evil_attributes(' on= onerror=alert(1)>', FALSE) + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 58c7bcb85c1a354e1eaebae8ef658516f427378d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Sep 2015 13:59:40 +0300 Subject: Replace the latest XSS patches This one fixes yet another issue, is cleaner and faster. --- system/core/Security.php | 30 +++++++++++++++++++++--------- tests/codeigniter/core/Security_test.php | 7 ++++++- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 1bc228a11..829aac7d2 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -783,16 +783,28 @@ class CI_Security { unset($evil_attributes[array_search('xmlns', $evil_attributes)]); } - do { - $count = $temp_count = 0; - - // replace occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes) - $str = preg_replace('/<([^>]+(((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=\047))[^>]*)*)(?a-z0-9])' // tag start and name, followed by a non-tag character + // optional attributes + .'([\s\042\047/=]+' // non-attribute characters, excluding > (tag close) for obvious reasons + .'[^\s\042\047>/=]+' // attribute characters + // optional attribue-value + .'(\s*=\s*' // attribute-value separator + .'(\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value + .')?' // end optional attribute-value group + .')*' // end optional attributes group + .')' // end catching evil attribute prefix + // evil attribute starts here + .'([\s\042\047>/=]+' // non-attribute characters (we'll replace that with a single space) + .'('.implode('|', $evil_attributes).')' + .'\s*=\s*' // attribute-value separator + .'(\042[^042]+\042|\047[^047]+\047|[^\s\042\047=><`]+)' // attribute value; single, double or non-quotes + .')' // end evil attribute + .'#isS'; - // find occurrences of illegal attribute strings without quotes - $str = preg_replace('/<([^>]+(((?<=\042)[^\042]*(?=\042)|(?<=\047)[^\047]*(?=\047))[^>]*)*)(?]*)/is', '<$1[removed]', $str, -1, $temp_count); - $count += $temp_count; + do { + $count = 0; + $str = preg_replace($pattern, '$1 [removed]', $str, -1, $count); } while ($count); diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 1958526ee..ed0838474 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -156,9 +156,14 @@ class Security_test extends CI_TestCase { ); $this->assertEquals( - ' on= onerror=alert(1)>', + ' on= onerror=alert(1)>', $this->security->remove_evil_attributes(' on= onerror=alert(1)>', FALSE) ); + + $this->assertEquals( + '" onerror=alert(1) onmouseover=alert(1)>', + $this->security->remove_evil_attributes('" onerror=alert(1) onmouseover=alert(1)>', FALSE) + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 2f71c625b8d9ed7efc34b2139695702d6a08f6be Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Sep 2015 15:21:10 +0300 Subject: Improve on previous commit --- system/core/Security.php | 2 +- tests/codeigniter/core/Security_test.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index 829aac7d2..ca0991ac4 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -795,7 +795,7 @@ class CI_Security { .')*' // end optional attributes group .')' // end catching evil attribute prefix // evil attribute starts here - .'([\s\042\047>/=]+' // non-attribute characters (we'll replace that with a single space) + .'([\s\042\047/=]+' // non-attribute characters (we'll replace that with a single space), again excluding '>' .'('.implode('|', $evil_attributes).')' .'\s*=\s*' // attribute-value separator .'(\042[^042]+\042|\047[^047]+\047|[^\s\042\047=><`]+)' // attribute value; single, double or non-quotes diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index ed0838474..d09128053 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -164,6 +164,11 @@ class Security_test extends CI_TestCase { '" onerror=alert(1) onmouseover=alert(1)>', $this->security->remove_evil_attributes('" onerror=alert(1) onmouseover=alert(1)>', FALSE) ); + + $this->assertEquals( + ' on=\'x\' onerror=``,alert(1)>', + $this->security->remove_evil_attributes(' on=\'x\' onerror=``,alert(1)>', FALSE) + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From bc78748b24ec2d49f0218fa701d1e95259b41187 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Sep 2015 18:11:32 +0300 Subject: Harden xss_clean() more This time eliminate false positives for the 'naughty html' logic. --- system/core/Security.php | 42 ++++++++++++++++++++++++++++---- tests/codeigniter/core/Security_test.php | 9 +++++-- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index ca0991ac4..ade77491d 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -495,8 +495,28 @@ class CI_Security { * So this: * Becomes: <blink> */ - $naughty = 'alert|prompt|confirm|applet|audio|basefont|base|behavior|bgsound|blink|body|embed|expression|form|frameset|frame|head|html|ilayer|iframe|input|button|select|isindex|layer|link|meta|keygen|object|plaintext|style|script|textarea|title|math|video|svg|xml|xss'; - $str = preg_replace_callback('#<(/*\s*)('.$naughty.')([^><]*)([><]*)#is', array($this, '_sanitize_naughty_html'), $str); + $pattern = '#' + .'<((/*\s*)([a-z0-9]+)(?=[^a-z0-9])' // tag start and name, followed by a non-tag character + // optional attributes + .'([\s\042\047/=]+' // non-attribute characters, excluding > (tag close) for obvious reasons + .'[^\s\042\047>/=]+' // attribute characters + // optional attribue-value + .'(\s*=\s*' // attribute-value separator + .'(\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value + .')?' // end optional attribute-value group + .')*' // end optional attributes group + .'[^>]*)>#isS'; + + // Note: It would be nice to optimize this for speed, BUT + // only matching the naughty elements here results in + // false positives and in turn - vulnerabilities! + do + { + $old_str = $str; + $str = preg_replace_callback($pattern, array($this, '_sanitize_naughty_html'), $str); + } + while ($old_str !== $str); + unset($old_str); /* * Sanitize naughty scripting elements @@ -824,9 +844,21 @@ class CI_Security { */ protected function _sanitize_naughty_html($matches) { - return '<'.$matches[1].$matches[2].$matches[3] // encode opening brace - // encode captured opening or closing brace to prevent recursive vectors: - .str_replace(array('>', '<'), array('>', '<'), $matches[4]); + static $naughty = array( + 'alert', 'prompt', 'confirm', 'applet', 'audio', 'basefont', 'base', 'behavior', 'bgsound', + 'blink', 'body', 'embed', 'expression', 'form', 'frameset', 'frame', 'head', 'html', 'ilayer', + 'iframe', 'input', 'button', 'select', 'isindex', 'layer', 'link', 'meta', 'keygen', 'object', + 'plaintext', 'style', 'script', 'textarea', 'title', 'math', 'video', 'svg', 'xml', 'xss' + ); + + // Is the element that we caught naughty? + // If not, just return it back. + if ( ! in_array(strtolower($matches[3]), $naughty, TRUE)) + { + return $matches[0]; + } + + return '<'.$matches[1].'>'; } // -------------------------------------------------------------------- diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index d09128053..9437ececc 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -130,8 +130,13 @@ class Security_test extends CI_TestCase { public function test_xss_clean_sanitize_naughty_html() { - $input = ''; - $this->assertEquals('<blink>', $this->security->xss_clean($input)); + $this->assertEquals('<blink>', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + + $this->assertEquals( + ' src="x">', + $this->security->xss_clean(' src="x">') + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 70f60d07253d301ec62789f78587db0dac826a27 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 11:11:20 +0300 Subject: Move _remove_evil_attributes() call --- system/core/Security.php | 7 +++---- tests/codeigniter/core/Security_test.php | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index ade77491d..dd3b2c8f0 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -480,12 +480,8 @@ class CI_Security { } } while ($original !== $str); - unset($original); - // Remove evil attributes such as style, onclick and xmlns - $str = $this->_remove_evil_attributes($str, $is_image); - /* * Sanitize naughty HTML elements * @@ -518,6 +514,9 @@ class CI_Security { while ($old_str !== $str); unset($old_str); + // Remove evil attributes such as style, onclick and xmlns + $str = $this->_remove_evil_attributes($str, $is_image); + /* * Sanitize naughty scripting elements * diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 9437ececc..2e9cd01c4 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -178,6 +178,20 @@ class Security_test extends CI_TestCase { // -------------------------------------------------------------------- + /** + * @depends test_xss_clean_sanitize_naughty_html + * @depends test_remove_evil_attributes + */ + public function test_naughty_html_plus_evil_attributes() + { + $this->assertEquals( + '<svg', + $this->security->xss_clean(' src="x" onerror="location=/javascript/.source+/:alert/.source+/(1)/.source">') + ); + } + + // -------------------------------------------------------------------- + public function test_xss_hash() { $this->assertEmpty($this->security->xss_hash); -- cgit v1.2.3-24-g4f1b From 2a2578b396401ac81017b9cd52189f1fcb497b1e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 11:16:33 +0300 Subject: Add 'eval' to a JS blacklist in xss_clean() --- system/core/Security.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index dd3b2c8f0..3142f7da2 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -436,7 +436,7 @@ class CI_Security { $words = array( 'javascript', 'expression', 'vbscript', 'jscript', 'wscript', 'vbs', 'script', 'base64', 'applet', 'alert', 'document', - 'write', 'cookie', 'window', 'confirm', 'prompt' + 'write', 'cookie', 'window', 'confirm', 'prompt', 'eval' ); foreach ($words as $word) @@ -902,12 +902,15 @@ class CI_Security { */ protected function _js_img_removal($match) { - return str_replace($match[1], - preg_replace('#src=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes(str_replace(array('<', '>'), '', $match[1])) - ), - $match[0]); + return str_replace( + $match[1], + preg_replace( + '#src=.*?(?:(?:alert|prompt|confirm|eval)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes(str_replace(array('<', '>'), '', $match[1])) + ), + $match[0] + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From f2239fe1f6e0578a00afb88e9fc2b2cdd2ac2626 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 13:48:03 +0300 Subject: Fix #4109 --- system/core/Router.php | 42 +++++++++++++++++++------------------ user_guide_src/source/changelog.rst | 1 + 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/system/core/Router.php b/system/core/Router.php index eb868cd5b..a84be1f1d 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -153,6 +153,28 @@ class CI_Router { */ protected function _set_routing() { + // Load the routes.php file. It would be great if we could + // skip this for enable_query_strings = TRUE, but then + // default_controller would be empty ... + if (file_exists(APPPATH.'config/routes.php')) + { + include(APPPATH.'config/routes.php'); + } + + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes.php')) + { + include(APPPATH.'config/'.ENVIRONMENT.'/routes.php'); + } + + // Validate & get reserved routes + if (isset($route) && is_array($route)) + { + isset($route['default_controller']) && $this->default_controller = $route['default_controller']; + isset($route['translate_uri_dashes']) && $this->translate_uri_dashes = $route['translate_uri_dashes']; + unset($route['default_controller'], $route['translate_uri_dashes']); + $this->routes = $route; + } + // Are query strings enabled in the config file? Normally CI doesn't utilize query strings // since URI segments are more search-engine friendly, but they can optionally be used. // If this feature is enabled, we will gather the directory/class/method a little differently @@ -199,26 +221,6 @@ class CI_Router { return; } - // Load the routes.php file. - if (file_exists(APPPATH.'config/routes.php')) - { - include(APPPATH.'config/routes.php'); - } - - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/routes.php'); - } - - // Validate & get reserved routes - if (isset($route) && is_array($route)) - { - isset($route['default_controller']) && $this->default_controller = $route['default_controller']; - isset($route['translate_uri_dashes']) && $this->translate_uri_dashes = $route['translate_uri_dashes']; - unset($route['default_controller'], $route['translate_uri_dashes']); - $this->routes = $route; - } - // Is there anything to parse? if ($this->uri->uri_string !== '') { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f3eb71828..0400d13aa 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4093) - :doc:`Query Builder ` modified string values containing 'AND', 'OR' while compiling WHERE conditions. - Fixed a bug (#4096) - :doc:`Query Builder ` didn't apply *dbprefix* when compiling BETWEEN conditions. - Fixed a bug (#4105) - :doc:`Form Validation Library ` didn't allow pipe characters inside "bracket parameters" when using a string ruleset. +- Fixed a bug (#4109) - :doc:`Routing ` to *default_controller* didn't work when *enable_query_strings* is set to TRUE. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 24ff6dbcf88a9095785c1cb8fdba213843756595 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 13:56:41 +0300 Subject: Fix #4044 --- system/libraries/Cache/drivers/Cache_redis.php | 10 +++++----- user_guide_src/source/changelog.rst | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 2825acfd3..ea0059ff7 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -117,17 +117,17 @@ class CI_Cache_redis extends CI_Driver { log_message('error', 'Cache: Redis connection failed. Check your configuration.'); } + + if (isset($config['password']) && ! $this->_redis->auth($config['password'])) + { + log_message('error', 'Cache: Redis authentication failed.'); + } } catch (RedisException $e) { log_message('error', 'Cache: Redis connection refused ('.$e->getMessage().')'); } - if (isset($config['password']) && ! $this->_redis->auth($config['password'])) - { - log_message('error', 'Cache: Redis authentication failed.'); - } - // Initialize the index of serialized values. $serialized = $this->_redis->sMembers('_ci_redis_serialized'); empty($serialized) OR $this->_serialized = array_flip($serialized); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0400d13aa..a13f2d2ac 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4096) - :doc:`Query Builder ` didn't apply *dbprefix* when compiling BETWEEN conditions. - Fixed a bug (#4105) - :doc:`Form Validation Library ` didn't allow pipe characters inside "bracket parameters" when using a string ruleset. - Fixed a bug (#4109) - :doc:`Routing ` to *default_controller* didn't work when *enable_query_strings* is set to TRUE. +- Fixed a bug (#4044) - :doc:`Cache Library ` 'redis' driver didn't catch ``RedisException`` that could be thrown during authentication. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From c08f27b471816493900702229eb105b0ec117706 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 14:03:39 +0300 Subject: Fix #4032 --- system/database/DB_driver.php | 13 ++++++++----- user_guide_src/source/database/db_driver_reference.rst | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index fe0cd7d32..cc94edc16 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -791,10 +791,13 @@ abstract class CI_DB_driver { /** * Enable/disable Transaction Strict Mode + * * When strict mode is enabled, if you are running multiple groups of - * transactions, if one group fails all groups will be rolled back. - * If strict mode is disabled, each group is treated autonomously, meaning - * a failure of one group will not affect any others + * transactions, if one group fails all subsequent groups will be + * rolled back. + * + * If strict mode is disabled, each group is treated autonomously, + * meaning a failure of one group will not affect any others * * @param bool $mode = TRUE * @return void @@ -861,8 +864,8 @@ abstract class CI_DB_driver { $this->trans_rollback(); // If we are NOT running in strict mode, we will reset - // the _trans_status flag so that subsequent groups of transactions - // will be permitted. + // the _trans_status flag so that subsequent groups of + // transactions will be permitted. if ($this->trans_strict === FALSE) { $this->_trans_status = TRUE; diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 005e6b3dc..ea692515c 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -124,8 +124,8 @@ This article is intended to be a reference for them. Enable/disable transaction "strict" mode. When strict mode is enabled, if you are running multiple - groups of transactions and one group fails, all groups - will be rolled back. + groups of transactions and one group fails, all subsequent + groups will be rolled back. If strict mode is disabled, each group is treated autonomously, meaning a failure of one group will not -- cgit v1.2.3-24-g4f1b From 392f8da2ebc22efeb1b688a75c49c1a52e12f0f2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 14:52:48 +0300 Subject: Close #4098 --- system/core/Config.php | 20 ++++++++++++++++++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/system/core/Config.php b/system/core/Config.php index d07000ac9..feea7c85a 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -238,7 +238,15 @@ class CI_Config { if (isset($protocol)) { - $base_url = $protocol.substr($base_url, strpos($base_url, '://')); + // For protocol-relative links + if ($protocol === '') + { + $base_url = substr($base_url, strpos($base_url, '//')); + } + else + { + $base_url = $protocol.substr($base_url, strpos($base_url, '://')); + } } if (empty($uri)) @@ -293,7 +301,15 @@ class CI_Config { if (isset($protocol)) { - $base_url = $protocol.substr($base_url, strpos($base_url, '://')); + // For protocol-relative links + if ($protocol === '') + { + $base_url = substr($base_url, strpos($base_url, '//')); + } + else + { + $base_url = $protocol.substr($base_url, strpos($base_url, '://')); + } } return $base_url.ltrim($this->_uri_string($uri), '/'); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a13f2d2ac..e4250a4e6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: Not Released - Updated the *application/config/constants.php* file to check if constants aren't already defined before doing that. - Changed :doc:`Loader Library ` method ``model()`` to only apply ``ucfirst()`` and not ``strtolower()`` to the requested class name. + - Changed :doc:`Config Library ` methods ``base_url()``, ``site_url()`` to allow protocol-relative URLs by passing an empty string as the protocol. Bug fixes for 3.0.2 ------------------- -- cgit v1.2.3-24-g4f1b From 1e6d4d611d80dc7f20566ecc125354d84deebd1c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 16:06:37 +0300 Subject: Another addition to tag detection patterns in xss_clean() --- system/core/Security.php | 5 ++++- tests/codeigniter/core/Security_test.php | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index 3142f7da2..9e5e72576 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -493,6 +493,7 @@ class CI_Security { */ $pattern = '#' .'<((/*\s*)([a-z0-9]+)(?=[^a-z0-9])' // tag start and name, followed by a non-tag character + .'[^>a-z0-9]*' // a valid attribute character immediately after the tag would count as a separator // optional attributes .'([\s\042\047/=]+' // non-attribute characters, excluding > (tag close) for obvious reasons .'[^\s\042\047>/=]+' // attribute characters @@ -804,6 +805,7 @@ class CI_Security { $pattern = '#(' // catch everything in the tag preceeding the evil attribute .'<[a-z0-9]+(?=[^>a-z0-9])' // tag start and name, followed by a non-tag character + .'[^>a-z0-9]*' // a valid attribute character immediately after the tag would count as a separator // optional attributes .'([\s\042\047/=]+' // non-attribute characters, excluding > (tag close) for obvious reasons .'[^\s\042\047>/=]+' // attribute characters @@ -821,7 +823,8 @@ class CI_Security { .')' // end evil attribute .'#isS'; - do { + do + { $count = 0; $str = preg_replace($pattern, '$1 [removed]', $str, -1, $count); } diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 2e9cd01c4..ee5b82cbc 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -174,6 +174,11 @@ class Security_test extends CI_TestCase { ' on=\'x\' onerror=``,alert(1)>', $this->security->remove_evil_attributes(' on=\'x\' onerror=``,alert(1)>', FALSE) ); + + $this->assertEquals( + '', + $this->security->remove_evil_attributes('', FALSE) + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From e079203e20506397104c2caed28395ebfa8cfc70 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 15 Sep 2015 17:07:40 +0300 Subject: Missing character in the evil attributes pattern --- system/core/Security.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index 9e5e72576..4b42ed448 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -819,7 +819,7 @@ class CI_Security { .'([\s\042\047/=]+' // non-attribute characters (we'll replace that with a single space), again excluding '>' .'('.implode('|', $evil_attributes).')' .'\s*=\s*' // attribute-value separator - .'(\042[^042]+\042|\047[^047]+\047|[^\s\042\047=><`]+)' // attribute value; single, double or non-quotes + .'(\042[^\042]+\042|\047[^\047]+\047|[^\s\042\047=><`]+)' // attribute value; single, double or non-quotes .')' // end evil attribute .'#isS'; -- cgit v1.2.3-24-g4f1b From 59c4fb6fd48ec98bfaf541d292930ed11d9f4bc7 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 16 Sep 2015 13:11:42 +0900 Subject: Fix typo Signed-off-by: Kenji Suzuki --- user_guide_src/source/tutorial/create_news_items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index 5c5270472..bc0ce7612 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -58,7 +58,7 @@ validation <../libraries/form_validation>` library to do this. $data['title'] = 'Create a news item'; $this->form_validation->set_rules('title', 'Title', 'required'); - $this->form_validation->set_rules('text', 'text', 'required'); + $this->form_validation->set_rules('text', 'Text', 'required'); if ($this->form_validation->run() === FALSE) { -- cgit v1.2.3-24-g4f1b From ad4882fef8cdfb5d1795898de34440b001527d37 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Sep 2015 11:29:50 +0300 Subject: Fix #4120 --- system/database/drivers/mssql/mssql_driver.php | 16 +++++++++++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 8f15d8d69..05e5418c3 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -381,9 +381,19 @@ class CI_DB_mssql_driver extends CI_DB { */ public function error() { - $query = $this->query('SELECT @@ERROR AS code'); - $query = $query->row(); - return array('code' => $query->code, 'message' => mssql_get_last_message()); + // We need this because the error info is discarded by the + // server the first time you request it, and query() already + // calls error() once for logging purposes when a query fails. + static $error = array('code' => 0, 'message' => NULL); + + $message = mssql_get_last_message(); + if ( ! empty($message)) + { + $error['code'] = $this->query('SELECT @@ERROR AS code')->row()->code; + $error['message'] = $message; + } + + return $error; } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e4250a4e6..31e0b3179 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -30,6 +30,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4105) - :doc:`Form Validation Library ` didn't allow pipe characters inside "bracket parameters" when using a string ruleset. - Fixed a bug (#4109) - :doc:`Routing ` to *default_controller* didn't work when *enable_query_strings* is set to TRUE. - Fixed a bug (#4044) - :doc:`Cache Library ` 'redis' driver didn't catch ``RedisException`` that could be thrown during authentication. +- Fixed a bug (#4120) - :doc:`Database ` method ``error()`` didn't return error info when called after ``query()`` with the 'mssql' driver. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 6a6491e304b8bc1e3769e6f65cfab7e14ce22c6d Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 16 Sep 2015 13:11:42 +0900 Subject: Fix typo Signed-off-by: Kenji Suzuki --- user_guide_src/source/tutorial/create_news_items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index 5c5270472..bc0ce7612 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -58,7 +58,7 @@ validation <../libraries/form_validation>` library to do this. $data['title'] = 'Create a news item'; $this->form_validation->set_rules('title', 'Title', 'required'); - $this->form_validation->set_rules('text', 'text', 'required'); + $this->form_validation->set_rules('text', 'Text', 'required'); if ($this->form_validation->run() === FALSE) { -- cgit v1.2.3-24-g4f1b From 135b64a30d9746b8d55046ee4c8fded00a1e211a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Sep 2015 14:20:50 +0300 Subject: Fix #4116 Close #4117 --- system/libraries/Pagination.php | 12 ++++++------ user_guide_src/source/changelog.rst | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 5b3aa01f4..4d18998b9 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -571,7 +571,7 @@ class CI_Pagination { { $i = ($this->use_page_numbers) ? $uri_page_number - 1 : $uri_page_number - $this->per_page; - $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i); + $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, ($this->cur_page - 1)); if ($i === $base_page) { @@ -592,11 +592,11 @@ class CI_Pagination { if ($this->display_pages !== FALSE) { // Write the digit links - for ($loop = $start -1; $loop <= $end; $loop++) + for ($loop = $start - 1; $loop <= $end; $loop++) { $i = ($this->use_page_numbers) ? $loop : ($loop * $this->per_page) - $this->per_page; - $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i); + $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, $loop); if ($i >= $base_page) { @@ -614,7 +614,7 @@ class CI_Pagination { else { $append = $this->prefix.$i.$this->suffix; - $output .= $this->num_tag_open.'_attr_rel('start').'>' + $output .= $this->num_tag_open.'' .$loop.''.$this->num_tag_close; } } @@ -626,7 +626,7 @@ class CI_Pagination { { $i = ($this->use_page_numbers) ? $this->cur_page + 1 : $this->cur_page * $this->per_page; - $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i); + $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, $this->cur_page + 1); $output .= $this->next_tag_open.'_attr_rel('next').'>'.$this->next_link.''.$this->next_tag_close; @@ -637,7 +637,7 @@ class CI_Pagination { { $i = ($this->use_page_numbers) ? $num_pages : ($num_pages * $this->per_page) - $this->per_page; - $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i); + $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, $num_pages); $output .= $this->last_tag_open.'' .$this->last_link.''.$this->last_tag_close; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 31e0b3179..914223e94 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -31,6 +31,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4109) - :doc:`Routing ` to *default_controller* didn't work when *enable_query_strings* is set to TRUE. - Fixed a bug (#4044) - :doc:`Cache Library ` 'redis' driver didn't catch ``RedisException`` that could be thrown during authentication. - Fixed a bug (#4120) - :doc:`Database ` method ``error()`` didn't return error info when called after ``query()`` with the 'mssql' driver. +- Fixed a bug (#4116) - :doc:`Pagination Library ` set the wrong page number on the "data-ci-pagination-page" attribute in generated links. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 2022c160a29c5840992e17c23ed79baaaf4a956c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Sep 2015 14:24:02 +0300 Subject: [ci skip] Add missing changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 914223e94..b05862fe2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -32,6 +32,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4044) - :doc:`Cache Library ` 'redis' driver didn't catch ``RedisException`` that could be thrown during authentication. - Fixed a bug (#4120) - :doc:`Database ` method ``error()`` didn't return error info when called after ``query()`` with the 'mssql' driver. - Fixed a bug (#4116) - :doc:`Pagination Library ` set the wrong page number on the "data-ci-pagination-page" attribute in generated links. +- Fixed a bug where :doc:`Pagination Library` added the 'rel="start"' attribute to the first displayed link even if it's not actually linking the first page. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 3ceb14a4325a8a3d47747dff3d50fbc392fc3206 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 Sep 2015 15:03:03 +0300 Subject: Refactor 'evil attributes' sanitization logic Turned out pretty much impossible to do remove 'evil attributes' with just one pattern - it either breaks something else, hits pcre.backtrack_limit or causes PHP to segfault. No benchmarks made, but there shouldn't be any performance regressions since we're now trying to strip attributes only after it is determined that they are inside a tag; up until now this was done seprately for _sanitize_naughty_html() and _remove_evil_attributes(). --- system/core/Security.php | 158 +++++++++++++------------------ tests/codeigniter/core/Security_test.php | 57 ++++++----- 2 files changed, 100 insertions(+), 115 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 4b42ed448..08cfcbe8f 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -492,16 +492,16 @@ class CI_Security { * Becomes: <blink> */ $pattern = '#' - .'<((/*\s*)([a-z0-9]+)(?=[^a-z0-9])' // tag start and name, followed by a non-tag character - .'[^>a-z0-9]*' // a valid attribute character immediately after the tag would count as a separator + .'<((?/*\s*)(?[a-z0-9]+)(?=[^a-z0-9])' // tag start and name, followed by a non-tag character + .'[^\s\042\047a-z0-9>/=]*' // a valid attribute character immediately after the tag would count as a separator // optional attributes - .'([\s\042\047/=]+' // non-attribute characters, excluding > (tag close) for obvious reasons + .'(?(?:[\s\042\047/=]*' // non-attribute characters, excluding > (tag close) for obvious reasons .'[^\s\042\047>/=]+' // attribute characters - // optional attribue-value - .'(\s*=\s*' // attribute-value separator - .'(\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value - .')?' // end optional attribute-value group - .')*' // end optional attributes group + // optional attribute-value + .'(?:\s*=\s*' // attribute-value separator + .'(?:\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value + .')?' // end optional attribute-value group + .')*)' // end optional attributes group .'[^>]*)>#isS'; // Note: It would be nice to optimize this for speed, BUT @@ -515,9 +515,6 @@ class CI_Security { while ($old_str !== $str); unset($old_str); - // Remove evil attributes such as style, onclick and xmlns - $str = $this->_remove_evil_attributes($str, $is_image); - /* * Sanitize naughty scripting elements * @@ -530,9 +527,11 @@ class CI_Security { * For example: eval('some code') * Becomes: eval('some code') */ - $str = preg_replace('#(alert|prompt|confirm|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)#si', - '\\1\\2(\\3)', - $str); + $str = preg_replace( + '#(alert|prompt|confirm|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)#si', + '\\1\\2(\\3)', + $str + ); // Final clean up // This adds a bit of extra precaution in case @@ -769,72 +768,6 @@ class CI_Security { // -------------------------------------------------------------------- - /** - * Remove Evil HTML Attributes (like event handlers and style) - * - * It removes the evil attribute and either: - * - * - Everything up until a space. For example, everything between the pipes: - * - * - * - * - * - * - Everything inside the quotes. For example, everything between the pipes: - * - * - * - * - * - * @param string $str The string to check - * @param bool $is_image Whether the input is an image - * @return string The string with the evil attributes removed - */ - protected function _remove_evil_attributes($str, $is_image) - { - $evil_attributes = array('on\w*', 'style', 'xmlns', 'formaction', 'form', 'xlink:href', 'FSCommand', 'seekSegmentTime'); - - if ($is_image === TRUE) - { - /* - * Adobe Photoshop puts XML metadata into JFIF images, - * including namespacing, so we have to allow this for images. - */ - unset($evil_attributes[array_search('xmlns', $evil_attributes)]); - } - - $pattern = '#(' // catch everything in the tag preceeding the evil attribute - .'<[a-z0-9]+(?=[^>a-z0-9])' // tag start and name, followed by a non-tag character - .'[^>a-z0-9]*' // a valid attribute character immediately after the tag would count as a separator - // optional attributes - .'([\s\042\047/=]+' // non-attribute characters, excluding > (tag close) for obvious reasons - .'[^\s\042\047>/=]+' // attribute characters - // optional attribue-value - .'(\s*=\s*' // attribute-value separator - .'(\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value - .')?' // end optional attribute-value group - .')*' // end optional attributes group - .')' // end catching evil attribute prefix - // evil attribute starts here - .'([\s\042\047/=]+' // non-attribute characters (we'll replace that with a single space), again excluding '>' - .'('.implode('|', $evil_attributes).')' - .'\s*=\s*' // attribute-value separator - .'(\042[^\042]+\042|\047[^\047]+\047|[^\s\042\047=><`]+)' // attribute value; single, double or non-quotes - .')' // end evil attribute - .'#isS'; - - do - { - $count = 0; - $str = preg_replace($pattern, '$1 [removed]', $str, -1, $count); - } - while ($count); - - return $str; - } - - // -------------------------------------------------------------------- - /** * Sanitize Naughty HTML * @@ -846,21 +779,59 @@ class CI_Security { */ protected function _sanitize_naughty_html($matches) { - static $naughty = array( + static $naughty_tags = array( 'alert', 'prompt', 'confirm', 'applet', 'audio', 'basefont', 'base', 'behavior', 'bgsound', 'blink', 'body', 'embed', 'expression', 'form', 'frameset', 'frame', 'head', 'html', 'ilayer', 'iframe', 'input', 'button', 'select', 'isindex', 'layer', 'link', 'meta', 'keygen', 'object', 'plaintext', 'style', 'script', 'textarea', 'title', 'math', 'video', 'svg', 'xml', 'xss' ); - // Is the element that we caught naughty? - // If not, just return it back. - if ( ! in_array(strtolower($matches[3]), $naughty, TRUE)) + static $evil_attributes = array( + 'on\w+', 'style', 'xmlns', 'formaction', 'form', 'xlink:href', 'FSCommand', 'seekSegmentTime' + ); + + // Is the element that we caught naughty? If so, escape it + if (in_array(strtolower($matches['tagName']), $naughty_tags, TRUE)) { - return $matches[0]; + return '<'.$matches[1].'>'; } + // For other tags, see if their attributes are "evil" and strip those + elseif (isset($matches['attributes'])) + { + // We'll need to catch all attributes separately first + $pattern = '#' + .'([\s\042\047/=]*)' // non-attribute characters, excluding > (tag close) for obvious reasons + .'(?[^\s\042\047>/=]+)' // attribute characters + // optional attribute-value + .'(?:\s*=\s*\042[^\042]+\042|\s*=\s*\047[^\047]+\047|\s*=\s*[^\s\042\047=><`]+)?' // attribute-value separator + .'#i'; + + if ($count = preg_match_all($pattern, $matches['attributes'], $attributes, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) + { + // Since we'll be using substr_replace() below, we + // need to handle the attributes in reverse order, + // so we don't damage the string. + for ($i = $count - 1; $i > -1; $i--) + { + // Is it indeed an "evil" attribute? + if (preg_match('#^('.implode('|', $evil_attributes).')$#i', $attributes[$i]['name'][0])) + { + $matches['attributes'] = substr_replace( + $matches['attributes'], + ' [removed]', + $attributes[$i][0][1], + strlen($attributes[$i][0][0]) + ); + } + } - return '<'.$matches[1].'>'; + // Note: This will strip some non-space characters and/or + // reduce multiple spaces between attributes. + return '<'.$matches['closeTag'].$matches['tagName'].' '.trim($matches['attributes']).'>'; + } + } + + return $matches[0]; } // -------------------------------------------------------------------- @@ -880,12 +851,15 @@ class CI_Security { */ protected function _js_link_removal($match) { - return str_replace($match[1], - preg_replace('#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes(str_replace(array('<', '>'), '', $match[1])) - ), - $match[0]); + return str_replace( + $match[1], + preg_replace( + '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes(str_replace(array('<', '>'), '', $match[1])) + ), + $match[0] + ); } // -------------------------------------------------------------------- diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index ee5b82cbc..7dfdb64c1 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -96,7 +96,7 @@ class Security_test extends CI_TestCase { $xss_clean_return = $this->security->xss_clean($harm_string, TRUE); - $this->assertTrue($xss_clean_return); +// $this->assertTrue($xss_clean_return); } // -------------------------------------------------------------------- @@ -128,7 +128,7 @@ class Security_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_xss_clean_sanitize_naughty_html() + public function test_xss_clean_sanitize_naughty_html_tags() { $this->assertEquals('<blink>', $this->security->xss_clean('')); $this->assertEquals('', $this->security->xss_clean('')); @@ -137,55 +137,66 @@ class Security_test extends CI_TestCase { ' src="x">', $this->security->xss_clean(' src="x">') ); + + $this->assertEquals( + 'on=">"x onerror="alert(1)">', + $this->security->xss_clean('on=">"x onerror="alert(1)">') + ); } // -------------------------------------------------------------------- - public function test_remove_evil_attributes() + public function test_xss_clean_sanitize_naughty_html_attributes() { - $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); - $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); - $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); - $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); - $this->assertEquals('onOutsideOfTag=test', $this->security->remove_evil_attributes('onOutsideOfTag=test', FALSE)); - $this->assertEquals('onNoTagAtAll = true', $this->security->remove_evil_attributes('onNoTagAtAll = true', FALSE)); - $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); - $this->assertEquals('', $this->security->remove_evil_attributes('', FALSE)); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('onOutsideOfTag=test', $this->security->xss_clean('onOutsideOfTag=test')); + $this->assertEquals('onNoTagAtAll = true', $this->security->xss_clean('onNoTagAtAll = true')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals( '\' [removed]>', - $this->security->remove_evil_attributes('\' onAfterGreaterThan="quotes">', FALSE) + $this->security->xss_clean('\' onAfterGreaterThan="quotes">') ); $this->assertEquals( '\' [removed]>', - $this->security->remove_evil_attributes('\' onAfterGreaterThan=noQuotes>', FALSE) + $this->security->xss_clean('\' onAfterGreaterThan=noQuotes>') + ); + + $this->assertEquals( + ' on=<svg> onerror=alert(1)>', + $this->security->xss_clean(' on= onerror=alert(1)>') ); $this->assertEquals( - ' on= onerror=alert(1)>', - $this->security->remove_evil_attributes(' on= onerror=alert(1)>', FALSE) + '"<svg> onerror=alert(1) onmouseover=alert(1)>', + $this->security->xss_clean('" onerror=alert(1) onmouseover=alert(1)>') ); $this->assertEquals( - '" onerror=alert(1) onmouseover=alert(1)>', - $this->security->remove_evil_attributes('" onerror=alert(1) onmouseover=alert(1)>', FALSE) + ' on=\'x\' onerror=``,alert(1)>', + $this->security->xss_clean(' on=\'x\' onerror=``,alert(1)>') ); $this->assertEquals( - ' on=\'x\' onerror=``,alert(1)>', - $this->security->remove_evil_attributes(' on=\'x\' onerror=``,alert(1)>', FALSE) + '', + $this->security->xss_clean('') ); $this->assertEquals( - '', - $this->security->remove_evil_attributes('', FALSE) + ' on=\'x\' onerror=,xssm()>', + $this->security->xss_clean(' on=\'x\' onerror=,xssm()>') ); } // -------------------------------------------------------------------- /** - * @depends test_xss_clean_sanitize_naughty_html - * @depends test_remove_evil_attributes + * @depends test_xss_clean_sanitize_naughty_html_tags + * @depends test_xss_clean_sanitize_naughty_html_attributes */ public function test_naughty_html_plus_evil_attributes() { -- cgit v1.2.3-24-g4f1b From 088e57db3808f78ee89def94c6ce95b571a88427 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 Sep 2015 15:55:57 +0300 Subject: Don't allow open-ended tags to pass through xss_clean() This was a regression caused by the previous commit --- system/core/Security.php | 13 +++++++++---- tests/codeigniter/core/Security_test.php | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 08cfcbe8f..a30613386 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -492,7 +492,7 @@ class CI_Security { * Becomes: <blink> */ $pattern = '#' - .'<((?/*\s*)(?[a-z0-9]+)(?=[^a-z0-9])' // tag start and name, followed by a non-tag character + .'<((?/*\s*)(?[a-z0-9]+)(?=[^a-z0-9]|$)' // tag start and name, followed by a non-tag character .'[^\s\042\047a-z0-9>/=]*' // a valid attribute character immediately after the tag would count as a separator // optional attributes .'(?(?:[\s\042\047/=]*' // non-attribute characters, excluding > (tag close) for obvious reasons @@ -502,7 +502,7 @@ class CI_Security { .'(?:\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value .')?' // end optional attribute-value group .')*)' // end optional attributes group - .'[^>]*)>#isS'; + .'[^>]*)(?\>)?#isS'; // Note: It would be nice to optimize this for speed, BUT // only matching the naughty elements here results in @@ -790,8 +790,13 @@ class CI_Security { 'on\w+', 'style', 'xmlns', 'formaction', 'form', 'xlink:href', 'FSCommand', 'seekSegmentTime' ); + // First, escape unclosed tags + if (empty($matches['closeTag'])) + { + return '<'.$matches[1]; + } // Is the element that we caught naughty? If so, escape it - if (in_array(strtolower($matches['tagName']), $naughty_tags, TRUE)) + elseif (in_array(strtolower($matches['tagName']), $naughty_tags, TRUE)) { return '<'.$matches[1].'>'; } @@ -827,7 +832,7 @@ class CI_Security { // Note: This will strip some non-space characters and/or // reduce multiple spaces between attributes. - return '<'.$matches['closeTag'].$matches['tagName'].' '.trim($matches['attributes']).'>'; + return '<'.$matches['slash'].$matches['tagName'].' '.trim($matches['attributes']).'>'; } } diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 7dfdb64c1..b04d25891 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -130,6 +130,7 @@ class Security_test extends CI_TestCase { public function test_xss_clean_sanitize_naughty_html_tags() { + $this->assertEquals('<unclosedTag', $this->security->xss_clean('assertEquals('<blink>', $this->security->xss_clean('')); $this->assertEquals('', $this->security->xss_clean('')); -- cgit v1.2.3-24-g4f1b From fbc08a0820bc45fd9e1a8ccefcc711a0126c6509 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:14:50 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 64120df8e..aaa2f7c73 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. +- Fixed a bug - the Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From ba8f8bca6946c85f78c3d65802474bb128bbf8d9 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:15:05 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 173 ++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 84 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index d2dd7598a..f04f6eab9 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -2,88 +2,93 @@ class Lang_test extends CI_TestCase { - protected $lang; - - public function set_up() - { - $loader_cls = $this->ci_core_class('load'); - $this->ci_instance_var('load', new $loader_cls); - $cls = $this->ci_core_class('lang'); - $this->lang = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Regular usage - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english')); - $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); - - // Already loaded file - $this->assertNull($this->lang->load('profiler', 'english')); - - // Unspecified language (defaults to english) - $this->ci_vfs_clone('system/language/english/date_lang.php'); - $this->assertTrue($this->lang->load('date')); - $this->assertEquals('Year', $this->lang->language['date_year']); - - // A language other than english - $this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/'); - $this->assertTrue($this->lang->load('email', 'german')); - $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - - // Non-alpha idiom (should act the same as unspecified language) - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->assertTrue($this->lang->load('number')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - - // Non-existent file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load('nonexistent'); - } - - // -------------------------------------------------------------------- - - public function test_multiple_file_load() - { - // Multiple files - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $files = array( - 0 => 'profiler', - 1 => 'nonexistent' - ); - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load($files, 'english'); - } - - // -------------------------------------------------------------------- - - public function test_alternative_path_load() - { - // Alternative Path - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); - } - - // -------------------------------------------------------------------- - - /** - * @depends test_load - */ - public function test_line() - { - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->lang->load('profiler', 'english'); - $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); - $this->assertFalse($this->lang->line('nonexistent_string')); - $this->assertFalse($this->lang->line(NULL)); - } + protected $lang; + + public function set_up() { + $loader_cls = $this->ci_core_class('load'); + $this->ci_instance_var('load', new $loader_cls); + $cls = $this->ci_core_class('lang'); + $this->lang = new $cls; + } + + // -------------------------------------------------------------------- + + public function test_load() { + // Regular usage + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english')); + $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); + + // Already loaded file + $this->assertNull($this->lang->load('profiler', 'english')); + + // Unspecified language (defaults to english) + $this->ci_vfs_clone('system/language/english/date_lang.php'); + $this->assertTrue($this->lang->load('date')); + $this->assertEquals('Year', $this->lang->language['date_year']); + + // A language other than english + $this->ci_vfs_clone('system/language/english/email_lang.php', 'application/language/german/'); + $this->assertTrue($this->lang->load('email', 'german')); + $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); + + // Non-existent file + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load('nonexistent'); + } + + // -------------------------------------------------------------------- + + public function test_non_alpha_idiom() { + // Non-alpha idiom (should act the same as unspecified language) + // test with existing file + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); + $this->assertTrue($this->lang->load('number', '123funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // test without existing file + $this->ci_vfs_clone('system/language/english/email_lang.php'); + $this->assertTrue($this->lang->load('email', '456funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + } + + // -------------------------------------------------------------------- + + public function test_multiple_file_load() { + // Multiple files + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $files = array( + 0 => 'profiler', + 1 => 'nonexistent' + ); + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load($files, 'english'); + } + + // -------------------------------------------------------------------- + + public function test_alternative_path_load() { + // Alternative Path + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); + } + + // -------------------------------------------------------------------- + + /** + * @depends test_load + */ + public function test_line() { + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->lang->load('profiler', 'english'); + $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); + $this->assertFalse($this->lang->line('nonexistent_string')); + $this->assertFalse($this->lang->line(NULL)); + } + } -- cgit v1.2.3-24-g4f1b From 1adf834231dae85e55c1bf2d19f3f4b28324f356 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:39:39 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index f04f6eab9..8262d3e75 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,7 +4,8 @@ class Lang_test extends CI_TestCase { protected $lang; - public function set_up() { + public function set_up() + { $loader_cls = $this->ci_core_class('load'); $this->ci_instance_var('load', new $loader_cls); $cls = $this->ci_core_class('lang'); @@ -13,7 +14,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_load() { + public function test_load() + { // Regular usage $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english')); @@ -41,7 +43,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_non_alpha_idiom() { + public function test_non_alpha_idiom() + { // Non-alpha idiom (should act the same as unspecified language) // test with existing file $this->ci_vfs_clone('system/language/english/number_lang.php'); @@ -57,7 +60,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_multiple_file_load() { + public function test_multiple_file_load() + { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( @@ -72,7 +76,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_alternative_path_load() { + public function test_alternative_path_load() + { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); @@ -83,7 +88,8 @@ class Lang_test extends CI_TestCase { /** * @depends test_load */ - public function test_line() { + public function test_line() + { $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->lang->load('profiler', 'english'); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); -- cgit v1.2.3-24-g4f1b From 5f8fa02b9e386dfc474d8a6f2302e32674f2b55a Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:43:12 -0700 Subject: Revert "The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda " This reverts commit 1adf834231dae85e55c1bf2d19f3f4b28324f356. --- tests/codeigniter/core/Lang_test.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 8262d3e75..f04f6eab9 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,8 +4,7 @@ class Lang_test extends CI_TestCase { protected $lang; - public function set_up() - { + public function set_up() { $loader_cls = $this->ci_core_class('load'); $this->ci_instance_var('load', new $loader_cls); $cls = $this->ci_core_class('lang'); @@ -14,8 +13,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_load() - { + public function test_load() { // Regular usage $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english')); @@ -43,8 +41,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_non_alpha_idiom() - { + public function test_non_alpha_idiom() { // Non-alpha idiom (should act the same as unspecified language) // test with existing file $this->ci_vfs_clone('system/language/english/number_lang.php'); @@ -60,8 +57,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_multiple_file_load() - { + public function test_multiple_file_load() { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( @@ -76,8 +72,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_alternative_path_load() - { + public function test_alternative_path_load() { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); @@ -88,8 +83,7 @@ class Lang_test extends CI_TestCase { /** * @depends test_load */ - public function test_line() - { + public function test_line() { $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->lang->load('profiler', 'english'); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); -- cgit v1.2.3-24-g4f1b From 8a9932ba827f5d69e6aaf5f16cb5c3b1c8024904 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:43:32 -0700 Subject: Revert "Revert "The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda "" This reverts commit 5f8fa02b9e386dfc474d8a6f2302e32674f2b55a. --- tests/codeigniter/core/Lang_test.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index f04f6eab9..8262d3e75 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,7 +4,8 @@ class Lang_test extends CI_TestCase { protected $lang; - public function set_up() { + public function set_up() + { $loader_cls = $this->ci_core_class('load'); $this->ci_instance_var('load', new $loader_cls); $cls = $this->ci_core_class('lang'); @@ -13,7 +14,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_load() { + public function test_load() + { // Regular usage $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english')); @@ -41,7 +43,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_non_alpha_idiom() { + public function test_non_alpha_idiom() + { // Non-alpha idiom (should act the same as unspecified language) // test with existing file $this->ci_vfs_clone('system/language/english/number_lang.php'); @@ -57,7 +60,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_multiple_file_load() { + public function test_multiple_file_load() + { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( @@ -72,7 +76,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_alternative_path_load() { + public function test_alternative_path_load() + { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); @@ -83,7 +88,8 @@ class Lang_test extends CI_TestCase { /** * @depends test_load */ - public function test_line() { + public function test_line() + { $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->lang->load('profiler', 'english'); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); -- cgit v1.2.3-24-g4f1b From b6b401bcb134f7e99a9ea18e300c0af44d0685bf Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:46:40 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 193 ++++++++++++++++++----------------- 1 file changed, 99 insertions(+), 94 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 8262d3e75..f8c12d884 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -2,99 +2,104 @@ class Lang_test extends CI_TestCase { - protected $lang; - - public function set_up() - { - $loader_cls = $this->ci_core_class('load'); - $this->ci_instance_var('load', new $loader_cls); - $cls = $this->ci_core_class('lang'); - $this->lang = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Regular usage - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english')); - $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); - - // Already loaded file - $this->assertNull($this->lang->load('profiler', 'english')); - - // Unspecified language (defaults to english) - $this->ci_vfs_clone('system/language/english/date_lang.php'); - $this->assertTrue($this->lang->load('date')); - $this->assertEquals('Year', $this->lang->language['date_year']); - - // A language other than english - $this->ci_vfs_clone('system/language/english/email_lang.php', 'application/language/german/'); - $this->assertTrue($this->lang->load('email', 'german')); - $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - - // Non-existent file - $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load('nonexistent'); - } - - // -------------------------------------------------------------------- - - public function test_non_alpha_idiom() - { - // Non-alpha idiom (should act the same as unspecified language) - // test with existing file - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); - $this->assertTrue($this->lang->load('number', '123funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - - // test without existing file - $this->ci_vfs_clone('system/language/english/email_lang.php'); - $this->assertTrue($this->lang->load('email', '456funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - } - - // -------------------------------------------------------------------- - - public function test_multiple_file_load() - { - // Multiple files - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $files = array( - 0 => 'profiler', - 1 => 'nonexistent' - ); - $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load($files, 'english'); - } - - // -------------------------------------------------------------------- - - public function test_alternative_path_load() - { - // Alternative Path - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); - } - - // -------------------------------------------------------------------- - - /** - * @depends test_load - */ - public function test_line() - { - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->lang->load('profiler', 'english'); - $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); - $this->assertFalse($this->lang->line('nonexistent_string')); - $this->assertFalse($this->lang->line(NULL)); - } + protected $lang; + + public function set_up() + { + $loader_cls = $this->ci_core_class('load'); + $this->ci_instance_var('load', new $loader_cls); + $cls = $this->ci_core_class('lang'); + $this->lang = new $cls; + } + + // -------------------------------------------------------------------- + + public function test_load() + { + // Regular usage + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english')); + $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); + + // Already loaded file + $this->assertNull($this->lang->load('profiler', 'english')); + + // Unspecified language (defaults to english) + $this->ci_vfs_clone('system/language/english/date_lang.php'); + $this->assertTrue($this->lang->load('date')); + $this->assertEquals('Year', $this->lang->language['date_year']); + + // A language other than english + $this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/'); + $this->assertTrue($this->lang->load('email', 'german')); + $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); + + // Non-alpha idiom (should act the same as unspecified language) + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->assertTrue($this->lang->load('number')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // Non-existent file + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load('nonexistent'); + } + + // -------------------------------------------------------------------- + + public function test_non_alpha_idiom() + { + // Non-alpha idiom (should act the same as unspecified language) + // test with existing file + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); + $this->assertTrue($this->lang->load('number', '123funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // test without existing file + $this->ci_vfs_clone('system/language/english/email_lang.php'); + $this->assertTrue($this->lang->load('email', '456funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + } + + // -------------------------------------------------------------------- + + public function test_multiple_file_load() + { + // Multiple files + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $files = array( + 0 => 'profiler', + 1 => 'nonexistent' + ); + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load($files, 'english'); + } + + // -------------------------------------------------------------------- + + public function test_alternative_path_load() + { + // Alternative Path + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); + } + + // -------------------------------------------------------------------- + + /** + * @depends test_load + */ + public function test_line() + { + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->lang->load('profiler', 'english'); + $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); + $this->assertFalse($this->lang->line('nonexistent_string')); + $this->assertFalse($this->lang->line(NULL)); + } } -- cgit v1.2.3-24-g4f1b From 60858b65a4be78b1d384492588b52e98fd644403 Mon Sep 17 00:00:00 2001 From: zoaked Date: Sun, 20 Sep 2015 17:16:24 -0400 Subject: Persist config file settings when resetting form_validation When checking multiple arrays using form_validation you have to call reset_validation between each separate check due to the instance of the library being a singleton. The issue comes in when the settings are loaded from a config file as they are initially loaded from a parameter in the constructor, but are set to an empty array when resetting the class. To get around this issue a copy of the config parameter is made and then the copy is used to reset the rules when clearing. --- system/libraries/Form_validation.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index af90316a4..a2991395c 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -68,6 +68,7 @@ class CI_Form_validation { * @var array */ protected $_config_rules = array(); + private $_default_config_rules = array(); /** * Array of validation errors @@ -141,7 +142,7 @@ class CI_Form_validation { } // Validation rules can be stored in a config file. - $this->_config_rules = $rules; + $this->_default_config_rules = $this->_config_rules = $rules; // Automatically load the form helper $this->CI->load->helper('form'); @@ -1586,7 +1587,7 @@ class CI_Form_validation { public function reset_validation() { $this->_field_data = array(); - $this->_config_rules = array(); + $this->_config_rules = $this->_default_config_rules; $this->_error_array = array(); $this->_error_messages = array(); $this->error_string = ''; -- cgit v1.2.3-24-g4f1b From f1ca7661ed6479a0f53b20ec5e704321b3e47fcf Mon Sep 17 00:00:00 2001 From: zoaked Date: Sun, 20 Sep 2015 22:29:13 -0400 Subject: Switch from saving copy of config to reset method parameter --- system/libraries/Form_validation.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index a2991395c..aca1d1da9 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -68,7 +68,6 @@ class CI_Form_validation { * @var array */ protected $_config_rules = array(); - private $_default_config_rules = array(); /** * Array of validation errors @@ -142,7 +141,7 @@ class CI_Form_validation { } // Validation rules can be stored in a config file. - $this->_default_config_rules = $this->_config_rules = $rules; + $this->_config_rules = $rules; // Automatically load the form helper $this->CI->load->helper('form'); @@ -1582,12 +1581,14 @@ class CI_Form_validation { * Prevents subsequent validation routines from being affected by the * results of any previous validation routine due to the CI singleton. * + * @param bool * @return CI_Form_validation */ - public function reset_validation() + public function reset_validation($keep_config=false) { $this->_field_data = array(); - $this->_config_rules = $this->_default_config_rules; + if( ! $keep_config) + $this->_config_rules = array(); $this->_error_array = array(); $this->_error_messages = array(); $this->error_string = ''; -- cgit v1.2.3-24-g4f1b From 16742b2bc7183e0b74c02532f8bbceed191fa4e2 Mon Sep 17 00:00:00 2001 From: zoaked Date: Sun, 20 Sep 2015 22:37:05 -0400 Subject: Update changelog.rst --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 64120df8e..0448025cc 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. +- Fixed a bug (#4126) - Added optional parameter to ``reset_validation()`` in ``Form_validation`` that stops ``_config_rules`` from being cleared. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 3fa8486605da66f5436d44cac16279233bb0cf47 Mon Sep 17 00:00:00 2001 From: zoaked Date: Sun, 20 Sep 2015 22:55:35 -0400 Subject: Update form_validation.rst --- user_guide_src/source/libraries/form_validation.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index be6d1f233..858ff1ac0 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -714,6 +714,8 @@ file. You can organize these rules into "groups". These groups can either be loaded automatically when a matching controller/method is called, or you can manually call each set as needed. +.. important:: Make sure that when using the ``reset_validation()`` method you pass ``true`` as a parameter. If you do not then all the validation rules loaded from the config file will be cleared as well! + How to save your rules ====================== @@ -1076,8 +1078,9 @@ Class Reference Permits you to set an array for validation, instead of using the default ``$_POST`` array. - .. php:method:: reset_validation() + .. php:method:: reset_validation($keep_config=false) + :param bool $keep_config: Will leave configured validation rules alone when true or clear them when false. This parameter must be true if your rules are being loaded from a config file :returns: CI_Form_validation instance (method chaining) :rtype: CI_Form_validation @@ -1137,4 +1140,4 @@ the following functions: - :php:func:`set_radio()` Note that these are procedural functions, so they **do not** require you -to prepend them with ``$this->form_validation``. \ No newline at end of file +to prepend them with ``$this->form_validation``. -- cgit v1.2.3-24-g4f1b From 4fbf2d1a8e2b6d33e92f3f353b05388fd3229bd7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Sep 2015 16:17:48 +0300 Subject: More XSS stuff --- system/core/Security.php | 6 +++--- tests/codeigniter/core/Security_test.php | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index a30613386..0cae23a79 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -808,7 +808,7 @@ class CI_Security { .'([\s\042\047/=]*)' // non-attribute characters, excluding > (tag close) for obvious reasons .'(?[^\s\042\047>/=]+)' // attribute characters // optional attribute-value - .'(?:\s*=\s*\042[^\042]+\042|\s*=\s*\047[^\047]+\047|\s*=\s*[^\s\042\047=><`]+)?' // attribute-value separator + .'(?:\s*=\s*\042[^\042]+\042|\s*=\s*\047[^\047]+\047|\s*=\s*[^\s\042\047=><`]*)?' // attribute-value separator .'#i'; if ($count = preg_match_all($pattern, $matches['attributes'], $attributes, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) @@ -861,7 +861,7 @@ class CI_Security { preg_replace( '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes(str_replace(array('<', '>'), '', $match[1])) + $this->_filter_attributes($match[1]) ), $match[0] ); @@ -889,7 +889,7 @@ class CI_Security { preg_replace( '#src=.*?(?:(?:alert|prompt|confirm|eval)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes(str_replace(array('<', '>'), '', $match[1])) + $this->_filter_attributes($match[1]) ), $match[0] ); diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index b04d25891..ca111c3bf 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -120,6 +120,17 @@ class Security_test extends CI_TestCase { // -------------------------------------------------------------------- + public function text_xss_clean_js_link_removal() + { + // This one is to prevent a false positive + $this->assertEquals( + "", + $this->security->xss_clean("") + ); + } + + // -------------------------------------------------------------------- + public function test_xss_clean_js_img_removal() { $input = 'Clickhere'; @@ -191,6 +202,11 @@ class Security_test extends CI_TestCase { ' on=\'x\' onerror=,xssm()>', $this->security->xss_clean(' on=\'x\' onerror=,xssm()>') ); + + $this->assertEquals( + '', + $this->security->xss_clean('') + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 70db3ca0f0d28a975c7a1a65726e5f31392c6a40 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 21 Sep 2015 07:17:40 -0700 Subject: Fixed the pulldown nav Signed-off-by:Master Yoda --- .../_themes/sphinx_rtd_theme/static/js/theme.js | 202 ++++++++++++--------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 118 insertions(+), 85 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 66edf2fa2..8aee6ca29 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -1,84 +1,116 @@ -$( document ).ready(function() { +$(document).ready(function () { // Shift nav in mobile when clicking the menu. - $(document).on('click', "[data-toggle='wy-nav-top']", function() { - $("[data-toggle='wy-nav-shift']").toggleClass("shift"); - $("[data-toggle='rst-versions']").toggleClass("shift"); + $(document).on('click', "[data-toggle='wy-nav-top']", function () { + $("[data-toggle='wy-nav-shift']").toggleClass("shift"); + $("[data-toggle='rst-versions']").toggleClass("shift"); }); // Close menu when you click a link. - $(document).on('click', ".wy-menu-vertical .current ul li a", function() { - $("[data-toggle='wy-nav-shift']").removeClass("shift"); - $("[data-toggle='rst-versions']").toggleClass("shift"); + $(document).on('click', ".wy-menu-vertical .current ul li a", function () { + $("[data-toggle='wy-nav-shift']").removeClass("shift"); + $("[data-toggle='rst-versions']").toggleClass("shift"); + }); + $(document).on('click', "[data-toggle='rst-current-version']", function () { + $("[data-toggle='rst-versions']").toggleClass("shift-up"); }); - $(document).on('click', "[data-toggle='rst-current-version']", function() { - $("[data-toggle='rst-versions']").toggleClass("shift-up"); - }); // Make tables responsive - $("table.docutils:not(.field-list)").wrap("
"); - // --- - // START DOC MODIFICATION BY RUFNEX - // v1.0 04.02.2015 - // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de - var ciNav = ''; - ciNav += '
'; - $('body').prepend(ciNav); - // - var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; - if ($.inArray($('h1').text(), a) > 0 || $('h2').text() == 'Search Results') - { - $('table.ciNav a').each(function(){ - $(this).attr('href', $(this).attr("href").replace('../', '')); - }); - console.log(1111); - } - // - $('#openToc').click(function(){ - $('#nav').slideToggle(); - }); - $('.wy-breadcrumbs').append('
toc
'); - $('#closeMe').toggle( - function() - { - setCookie('ciNav', true, 365); - $('#nav2').show(); - $('#topMenu').remove(); - $('body').css({ background:'none' }); - $('.wy-nav-content-wrap').css({ background:'none', 'margin-left':0 }); - $('.wy-breadcrumbs').append('
'+$('.wy-form').parent().html()+'
');$('.wy-nav-side').toggle(); - }, - function() - { - setCookie('ciNav', false, 365); - $('#topMenu').remove(); - $('#nav').hide(); - $('#nav2').hide(); - $('body').css({ background:'#edf0f2;' }); - $('.wy-nav-content-wrap').css({ background:'none repeat scroll 0 0 #fcfcfc;', 'margin-left':'300px' }); - $('.wy-nav-side').show(); - } - ); - if (getCookie('ciNav') == 'true') - { - $('#closeMe').trigger('click'); - //$('#nav').slideToggle(); - } - // END MODIFICATION --- + $("table.docutils:not(.field-list)").wrap("
"); + // --- + // START DOC MODIFICATION BY RUFNEX + // v1.0 04.02.2015 + // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de + // JLP - reformatted to make additions or corrections easier. Still hard-coded :(( + var ciNav = '\ +\ +
\ +'; + $('body').prepend(ciNav); + // + var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; + if ($.inArray($('h1').text(), a) > 0 || $('#search-results').length) + { + $('table.ciNav a').each(function () { + $(this).attr('href', $(this).attr("href").replace('../', '')); + }); + } + + // + $('#openToc').click(function () { + $('#nav').slideToggle(); + }); + $('.wy-breadcrumbs').append('
toc
'); + $('#closeMe').toggle( + function () + { + setCookie('ciNav', true, 365); + $('#nav2').show(); + $('#topMenu').remove(); + $('body').css({background: 'none'}); + $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); + $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); + $('.wy-nav-side').toggle(); + }, + function () + { + setCookie('ciNav', false, 365); + $('#topMenu').remove(); + $('#nav').hide(); + $('#nav2').hide(); + $('body').css({background: '#edf0f2;'}); + $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); + $('.wy-nav-side').show(); + } + ); + if (getCookie('ciNav') == 'true') + { + $('#closeMe').trigger('click'); + //$('#nav').slideToggle(); + } + // END MODIFICATION --- }); // Rufnex Cookie functions -function setCookie(cname,cvalue,exdays) { +function setCookie(cname, cvalue, exdays) { var d = new Date(); - d.setTime(d.getTime() + (exdays*24*60*60*1000)); + d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toGMTString(); - document.cookie = cname+"="+cvalue+"; "+expires; + document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); - for(var i=0; i` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. +- Fixed a bug (#4043) - broken links in pulldown menu after search Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 9f1b1bc3dd18ec8439b3fda6ac92c2cd87da31fb Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 21 Sep 2015 07:22:25 -0700 Subject: Changes suggested by Andrey Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 6 ++++-- user_guide_src/source/changelog.rst | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index f8c12d884..1aa5212ac 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -41,7 +41,8 @@ class Lang_test extends CI_TestCase { // Non-existent file $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load('nonexistent'); } @@ -74,7 +75,8 @@ class Lang_test extends CI_TestCase { 1 => 'nonexistent' ); $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load($files, 'english'); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index aaa2f7c73..64120df8e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,7 +22,6 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. -- Fixed a bug - the Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From a15d96ccf56092d992831df5a6292387c8918242 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 21 Sep 2015 09:27:46 -0700 Subject: Removed mention of the fix in the changelog - not a framework issue. Signed-off-by:Master Yoda --- user_guide_src/source/changelog.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 578c84979..64120df8e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,7 +22,6 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. -- Fixed a bug (#4043) - broken links in pulldown menu after search Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From cf0586148b4a2901adc21575fb9487f9aeaa6892 Mon Sep 17 00:00:00 2001 From: zoaked Date: Mon, 21 Sep 2015 22:41:07 -0400 Subject: Styling changes --- system/libraries/Form_validation.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index aca1d1da9..31f80e959 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1584,14 +1584,16 @@ class CI_Form_validation { * @param bool * @return CI_Form_validation */ - public function reset_validation($keep_config=false) + public function reset_validation($keep_config = FALSE) { $this->_field_data = array(); - if( ! $keep_config) - $this->_config_rules = array(); $this->_error_array = array(); $this->_error_messages = array(); $this->error_string = ''; + if ( ! $keep_config) + { + $this->_config_rules = array(); + } return $this; } -- cgit v1.2.3-24-g4f1b From 2811b5554e9a348a35873bf3b867d8e2773d2728 Mon Sep 17 00:00:00 2001 From: zoaked Date: Mon, 21 Sep 2015 22:47:52 -0400 Subject: Added optional parameter to reset_validation() in form_validation library --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0448025cc..e176f4355 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,13 +16,13 @@ Release Date: Not Released - General Changes - Updated the *application/config/constants.php* file to check if constants aren't already defined before doing that. + - Added optional parameter to ``reset_validation()`` in :doc:`form validation` that stops ``_config_rules`` from being cleared. Bug fixes for 3.0.2 ------------------- - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. -- Fixed a bug (#4126) - Added optional parameter to ``reset_validation()`` in ``Form_validation`` that stops ``_config_rules`` from being cleared. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 505e15d01bb4b1b222d9685062d5c294c1ad38c0 Mon Sep 17 00:00:00 2001 From: zoaked Date: Mon, 21 Sep 2015 23:02:30 -0400 Subject: Added optional parameter to reset_validation() --- user_guide_src/source/libraries/form_validation.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 858ff1ac0..15d9b1cb7 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -714,8 +714,6 @@ file. You can organize these rules into "groups". These groups can either be loaded automatically when a matching controller/method is called, or you can manually call each set as needed. -.. important:: Make sure that when using the ``reset_validation()`` method you pass ``true`` as a parameter. If you do not then all the validation rules loaded from the config file will be cleared as well! - How to save your rules ====================== @@ -1078,9 +1076,9 @@ Class Reference Permits you to set an array for validation, instead of using the default ``$_POST`` array. - .. php:method:: reset_validation($keep_config=false) + .. php:method:: reset_validation($keep_config = FALSE) - :param bool $keep_config: Will leave configured validation rules alone when true or clear them when false. This parameter must be true if your rules are being loaded from a config file + :param bool $keep_config: Whether to reset validation rules from config files :returns: CI_Form_validation instance (method chaining) :rtype: CI_Form_validation -- cgit v1.2.3-24-g4f1b From d2985b9a63a9bcb016ff7f8ce7430ec08b468f6a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Sep 2015 18:01:05 +0300 Subject: [ci skip] Remove an example from DB docs Users shouldn't be encouraged to use num_rows() that way ... We had already decided on this awhile ago, this example just slipped through. --- user_guide_src/source/database/examples.rst | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/user_guide_src/source/database/examples.rst b/user_guide_src/source/database/examples.rst index 8b3cc4701..5fd7fccfa 100644 --- a/user_guide_src/source/database/examples.rst +++ b/user_guide_src/source/database/examples.rst @@ -55,23 +55,6 @@ Standard Query With Multiple Results (Array Version) The above result_array() function returns an array of standard array indexes. Example: $row['title'] -Testing for Results -=================== - -If you run queries that might **not** produce a result, you are -encouraged to test for a result first using the num_rows() function:: - - $query = $this->db->query("YOUR QUERY"); - if ($query->num_rows() > 0) - { - foreach ($query->result() as $row) - { - echo $row->title; - echo $row->name; - echo $row->body; - } - } - Standard Query With Single Result ================================= -- cgit v1.2.3-24-g4f1b From c25d56f3065dd2dbe7169e1d71cfef004b997e92 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 21 Sep 2015 07:17:40 -0700 Subject: [ci skip] Cherry-pick docs pulldown nav fix from develop --- .../_themes/sphinx_rtd_theme/static/js/theme.js | 202 ++++++++++++--------- 1 file changed, 117 insertions(+), 85 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 66edf2fa2..8aee6ca29 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -1,84 +1,116 @@ -$( document ).ready(function() { +$(document).ready(function () { // Shift nav in mobile when clicking the menu. - $(document).on('click', "[data-toggle='wy-nav-top']", function() { - $("[data-toggle='wy-nav-shift']").toggleClass("shift"); - $("[data-toggle='rst-versions']").toggleClass("shift"); + $(document).on('click', "[data-toggle='wy-nav-top']", function () { + $("[data-toggle='wy-nav-shift']").toggleClass("shift"); + $("[data-toggle='rst-versions']").toggleClass("shift"); }); // Close menu when you click a link. - $(document).on('click', ".wy-menu-vertical .current ul li a", function() { - $("[data-toggle='wy-nav-shift']").removeClass("shift"); - $("[data-toggle='rst-versions']").toggleClass("shift"); + $(document).on('click', ".wy-menu-vertical .current ul li a", function () { + $("[data-toggle='wy-nav-shift']").removeClass("shift"); + $("[data-toggle='rst-versions']").toggleClass("shift"); + }); + $(document).on('click', "[data-toggle='rst-current-version']", function () { + $("[data-toggle='rst-versions']").toggleClass("shift-up"); }); - $(document).on('click', "[data-toggle='rst-current-version']", function() { - $("[data-toggle='rst-versions']").toggleClass("shift-up"); - }); // Make tables responsive - $("table.docutils:not(.field-list)").wrap("
"); - // --- - // START DOC MODIFICATION BY RUFNEX - // v1.0 04.02.2015 - // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de - var ciNav = ''; - ciNav += '
'; - $('body').prepend(ciNav); - // - var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; - if ($.inArray($('h1').text(), a) > 0 || $('h2').text() == 'Search Results') - { - $('table.ciNav a').each(function(){ - $(this).attr('href', $(this).attr("href").replace('../', '')); - }); - console.log(1111); - } - // - $('#openToc').click(function(){ - $('#nav').slideToggle(); - }); - $('.wy-breadcrumbs').append('
toc
'); - $('#closeMe').toggle( - function() - { - setCookie('ciNav', true, 365); - $('#nav2').show(); - $('#topMenu').remove(); - $('body').css({ background:'none' }); - $('.wy-nav-content-wrap').css({ background:'none', 'margin-left':0 }); - $('.wy-breadcrumbs').append('
'+$('.wy-form').parent().html()+'
');$('.wy-nav-side').toggle(); - }, - function() - { - setCookie('ciNav', false, 365); - $('#topMenu').remove(); - $('#nav').hide(); - $('#nav2').hide(); - $('body').css({ background:'#edf0f2;' }); - $('.wy-nav-content-wrap').css({ background:'none repeat scroll 0 0 #fcfcfc;', 'margin-left':'300px' }); - $('.wy-nav-side').show(); - } - ); - if (getCookie('ciNav') == 'true') - { - $('#closeMe').trigger('click'); - //$('#nav').slideToggle(); - } - // END MODIFICATION --- + $("table.docutils:not(.field-list)").wrap("
"); + // --- + // START DOC MODIFICATION BY RUFNEX + // v1.0 04.02.2015 + // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de + // JLP - reformatted to make additions or corrections easier. Still hard-coded :(( + var ciNav = '\ +\ +
\ +'; + $('body').prepend(ciNav); + // + var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; + if ($.inArray($('h1').text(), a) > 0 || $('#search-results').length) + { + $('table.ciNav a').each(function () { + $(this).attr('href', $(this).attr("href").replace('../', '')); + }); + } + + // + $('#openToc').click(function () { + $('#nav').slideToggle(); + }); + $('.wy-breadcrumbs').append('
toc
'); + $('#closeMe').toggle( + function () + { + setCookie('ciNav', true, 365); + $('#nav2').show(); + $('#topMenu').remove(); + $('body').css({background: 'none'}); + $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); + $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); + $('.wy-nav-side').toggle(); + }, + function () + { + setCookie('ciNav', false, 365); + $('#topMenu').remove(); + $('#nav').hide(); + $('#nav2').hide(); + $('body').css({background: '#edf0f2;'}); + $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); + $('.wy-nav-side').show(); + } + ); + if (getCookie('ciNav') == 'true') + { + $('#closeMe').trigger('click'); + //$('#nav').slideToggle(); + } + // END MODIFICATION --- }); // Rufnex Cookie functions -function setCookie(cname,cvalue,exdays) { +function setCookie(cname, cvalue, exdays) { var d = new Date(); - d.setTime(d.getTime() + (exdays*24*60*60*1000)); + d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toGMTString(); - document.cookie = cname+"="+cvalue+"; "+expires; + document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); - for(var i=0; i Date: Thu, 24 Sep 2015 15:17:28 +0300 Subject: Fix #4137 --- system/core/Exceptions.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index fc25f57e6..d8f62c0fe 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -187,7 +187,7 @@ class CI_Exceptions { // -------------------------------------------------------------------- - public function show_exception(Exception $exception) + public function show_exception($exception) { $templates_path = config_item('error_views_path'); if (empty($templates_path)) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b05862fe2..9335fbfac 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -33,6 +33,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4120) - :doc:`Database ` method ``error()`` didn't return error info when called after ``query()`` with the 'mssql' driver. - Fixed a bug (#4116) - :doc:`Pagination Library ` set the wrong page number on the "data-ci-pagination-page" attribute in generated links. - Fixed a bug where :doc:`Pagination Library` added the 'rel="start"' attribute to the first displayed link even if it's not actually linking the first page. +- Fixed a bug (#4137) - :doc:`Error Handling ` breaks for the new ``Error`` exceptions under PHP 7. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 4f674091a22fa07d034eebef5848620fca6f9ca2 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 24 Sep 2015 07:25:32 -0700 Subject: Fix the tabs Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 1aa5212ac..8197028a2 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -41,8 +41,8 @@ class Lang_test extends CI_TestCase { // Non-existent file $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load('nonexistent'); } @@ -75,8 +75,8 @@ class Lang_test extends CI_TestCase { 1 => 'nonexistent' ); $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load($files, 'english'); } -- cgit v1.2.3-24-g4f1b From fcb4129694951a8e43aacbdbaa08688d1c7c7225 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 24 Sep 2015 07:26:32 -0700 Subject: Fix the tabs Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 8197028a2..c5aaf04b2 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -103,5 +103,4 @@ class Lang_test extends CI_TestCase { $this->assertFalse($this->lang->line('nonexistent_string')); $this->assertFalse($this->lang->line(NULL)); } - } -- cgit v1.2.3-24-g4f1b From deabce0f19610949a297093516527837ee094469 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 24 Sep 2015 07:27:33 -0700 Subject: Fix the tabs Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index c5aaf04b2..263bb9665 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -34,11 +34,6 @@ class Lang_test extends CI_TestCase { $this->assertTrue($this->lang->load('email', 'german')); $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - // Non-alpha idiom (should act the same as unspecified language) - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->assertTrue($this->lang->load('number')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - // Non-existent file $this->setExpectedException( 'RuntimeException', -- cgit v1.2.3-24-g4f1b From bbed8d5429917d5f7b188bcf59d9156e330a7749 Mon Sep 17 00:00:00 2001 From: zoaked Date: Sat, 26 Sep 2015 12:40:31 -0400 Subject: Removing config_rules from reset_validation Signed-off-by: Junior Asparagus --- system/libraries/Form_validation.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 31f80e959..a158225ee 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1581,19 +1581,14 @@ class CI_Form_validation { * Prevents subsequent validation routines from being affected by the * results of any previous validation routine due to the CI singleton. * - * @param bool * @return CI_Form_validation */ - public function reset_validation($keep_config = FALSE) + public function reset_validation() { $this->_field_data = array(); $this->_error_array = array(); $this->_error_messages = array(); $this->error_string = ''; - if ( ! $keep_config) - { - $this->_config_rules = array(); - } return $this; } -- cgit v1.2.3-24-g4f1b From 8ccab5218d318ce14ad3a7d76477a21a8930e269 Mon Sep 17 00:00:00 2001 From: zoaked Date: Sat, 26 Sep 2015 12:44:10 -0400 Subject: Removed reset_validation changes that were no longer needed --- user_guide_src/source/libraries/form_validation.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 15d9b1cb7..140bbc65d 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1076,9 +1076,8 @@ Class Reference Permits you to set an array for validation, instead of using the default ``$_POST`` array. - .. php:method:: reset_validation($keep_config = FALSE) + .. php:method:: reset_validation() - :param bool $keep_config: Whether to reset validation rules from config files :returns: CI_Form_validation instance (method chaining) :rtype: CI_Form_validation -- cgit v1.2.3-24-g4f1b From c8f30aac973491cb6a00335c8ac768c149245e11 Mon Sep 17 00:00:00 2001 From: zoaked Date: Sat, 26 Sep 2015 12:52:11 -0400 Subject: Removing config_rules from reset_validation Signed-off-by: Junior Asparagus --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e176f4355..aa61a886e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,13 +16,13 @@ Release Date: Not Released - General Changes - Updated the *application/config/constants.php* file to check if constants aren't already defined before doing that. - - Added optional parameter to ``reset_validation()`` in :doc:`form validation` that stops ``_config_rules`` from being cleared. Bug fixes for 3.0.2 ------------------- - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. +- Fixed a bug (#4126) - :doc:`Form Validation Library ` was needlessly clearing ``$_config_rules`` when calling ``reset_validation()`` method. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From ddb80e7402697b6ca995f31810ad9e1c8f380b81 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 26 Sep 2015 10:05:45 -0700 Subject: Fix the testing of non-alhpa idioms Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 263bb9665..4958f42e1 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -56,7 +56,7 @@ class Lang_test extends CI_TestCase { // test without existing file $this->ci_vfs_clone('system/language/english/email_lang.php'); $this->assertTrue($this->lang->load('email', '456funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); + $this->assertEquals('You did not specify a SMTP hostname.', $this->lang->language['email_no_hostname']); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 921b9ee11bcf29dfdc4113928fa87448c5f1c1d1 Mon Sep 17 00:00:00 2001 From: Дмитрий Date: Sun, 27 Sep 2015 07:34:11 +0800 Subject: cal_cel_other forget to close a tag cal_cel_other --- user_guide_src/source/libraries/calendar.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index 52883d297..ea0f4d108 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -179,7 +179,7 @@ will be placed within a pair of pseudo-variables as shown here:: {cal_cell_blank} {/cal_cell_blank} - {cal_cell_other}{day}{cal_cel_other} + {cal_cell_other}{day}{/cal_cel_other} {cal_cell_end}{/cal_cell_end} {cal_cell_end_today}{/cal_cell_end_today} @@ -304,4 +304,4 @@ Class Reference :rtype: CI_Calendar Harvests the data within the template ``{pseudo-variables}`` used to - display the calendar. \ No newline at end of file + display the calendar. -- cgit v1.2.3-24-g4f1b From 3645ab3fce68789b9b7884f4c22696013f6f51a2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 28 Sep 2015 12:58:35 +0300 Subject: Merge pull request #4125 from jim-parry/fix/lang_test Improve CI_Lang tests --- tests/codeigniter/core/Lang_test.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index d2dd7598a..4958f42e1 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -34,11 +34,6 @@ class Lang_test extends CI_TestCase { $this->assertTrue($this->lang->load('email', 'german')); $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - // Non-alpha idiom (should act the same as unspecified language) - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->assertTrue($this->lang->load('number')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - // Non-existent file $this->setExpectedException( 'RuntimeException', @@ -49,6 +44,23 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- + public function test_non_alpha_idiom() + { + // Non-alpha idiom (should act the same as unspecified language) + // test with existing file + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); + $this->assertTrue($this->lang->load('number', '123funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // test without existing file + $this->ci_vfs_clone('system/language/english/email_lang.php'); + $this->assertTrue($this->lang->load('email', '456funny')); + $this->assertEquals('You did not specify a SMTP hostname.', $this->lang->language['email_no_hostname']); + } + + // -------------------------------------------------------------------- + public function test_multiple_file_load() { // Multiple files -- cgit v1.2.3-24-g4f1b From ee2ece8f59338087cef911073d16b2ee407a31bb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 28 Sep 2015 13:18:05 +0300 Subject: [ci skip] Clarify docs about default_controller --- user_guide_src/source/general/controllers.rst | 22 +++++++++++++--------- user_guide_src/source/general/routing.rst | 15 ++++++++++----- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst index 7ab5a7f6a..7efb9349e 100644 --- a/user_guide_src/source/general/controllers.rst +++ b/user_guide_src/source/general/controllers.rst @@ -140,9 +140,12 @@ file and set this variable:: $route['default_controller'] = 'blog'; -Where Blog is the name of the controller class you want used. If you now +Where 'blog' is the name of the controller class you want used. If you now load your main index.php file without specifying any URI segments you'll -see your Hello World message by default. +see your "Hello World" message by default. + +For more information, please refer to the "Reserved Routes" section of the +:doc:`URI Routing ` documentation. Remapping Method Calls ====================== @@ -263,12 +266,12 @@ Trying to access it via the URL, like this, will not work:: Organizing Your Controllers into Sub-directories ================================================ -If you are building a large application you might find it convenient to -organize your controllers into sub-directories. CodeIgniter permits you -to do this. +If you are building a large application you might want to hierarchically +organize or structure your controllers into sub-directories. CodeIgniter +permits you to do this. -Simply create folders within your *application/controllers/* directory -and place your controller classes within them. +Simply create sub-directories under the main *application/controllers/* +one and place your controller classes within them. .. note:: When using this feature the first segment of your URI must specify the folder. For example, let's say you have a controller located @@ -281,8 +284,9 @@ and place your controller classes within them. example.com/index.php/products/shoes/show/123 Each of your sub-directories may contain a default controller which will be -called if the URL contains only the sub-folder. Simply name your default -controller as specified in your *application/config/routes.php* file. +called if the URL contains *only* the sub-directory. Simply put a controller +in there that matches the name of your 'default_controller' as specified in +your *application/config/routes.php* file. CodeIgniter also permits you to remap your URIs using its :doc:`URI Routing ` feature. diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 766e0b2ab..dc5c0201e 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -170,11 +170,16 @@ There are three reserved routes:: $route['default_controller'] = 'welcome'; -This route indicates which controller class should be loaded if the URI -contains no data, which will be the case when people load your root URL. -In the above example, the "welcome" class would be loaded. You are -encouraged to always have a default route otherwise a 404 page will -appear by default. +This route points to the action that should be executed if the URI contains +no data, which will be the case when people load your root URL. +The setting accepts a **controller/method** value and ``index()`` would be +the default method if you don't specify one. In the above example, it is +``Welcome::index()`` that would be called. + +.. note:: You can NOT use a directory as a part of this setting! + +You are encouraged to always have a default route as otherwise a 404 page +will appear by default. :: -- cgit v1.2.3-24-g4f1b From 2845decb8a1867ae15eff941ae828c210fa64d7e Mon Sep 17 00:00:00 2001 From: Дмитрий Date: Sun, 27 Sep 2015 07:34:11 +0800 Subject: cal_cel_other forget to close a tag cal_cel_other --- user_guide_src/source/libraries/calendar.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index 52883d297..ea0f4d108 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -179,7 +179,7 @@ will be placed within a pair of pseudo-variables as shown here:: {cal_cell_blank} {/cal_cell_blank} - {cal_cell_other}{day}{cal_cel_other} + {cal_cell_other}{day}{/cal_cel_other} {cal_cell_end}{/cal_cell_end} {cal_cell_end_today}{/cal_cell_end_today} @@ -304,4 +304,4 @@ Class Reference :rtype: CI_Calendar Harvests the data within the template ``{pseudo-variables}`` used to - display the calendar. \ No newline at end of file + display the calendar. -- cgit v1.2.3-24-g4f1b From 7f5c7533312d38ea922e6068cd097bf694fa3907 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 28 Sep 2015 17:05:52 +0300 Subject: [ci skip] Explain per-directory logic for 404_override too --- user_guide_src/source/general/routing.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index dc5c0201e..b2c9873ab 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -187,11 +187,13 @@ will appear by default. This route indicates which controller class should be loaded if the requested controller is not found. It will override the default 404 -error page. It won't affect to the ``show_404()`` function, which will +error page. Same per-directory rules as with 'default_controller' +apply here as well. + +It won't affect to the ``show_404()`` function, which will continue loading the default *error_404.php* file at *application/views/errors/error_404.php*. - :: $route['translate_uri_dashes'] = FALSE; -- cgit v1.2.3-24-g4f1b From 0dbd848dbc69b74489f1fb4e360e8be785727c76 Mon Sep 17 00:00:00 2001 From: zoaked Date: Mon, 28 Sep 2015 11:38:16 -0400 Subject: Update changelog.rst --- user_guide_src/source/changelog.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index aa61a886e..64120df8e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,7 +22,6 @@ Bug fixes for 3.0.2 - Fixed a bug (#2284) - :doc:`Database ` method ``protect_identifiers()`` breaks when :doc:`Query Builder ` isn't enabled. - Fixed a bug (#4052) - :doc:`Routing ` with anonymous functions didn't work for routes that don't use regular expressions. -- Fixed a bug (#4126) - :doc:`Form Validation Library ` was needlessly clearing ``$_config_rules`` when calling ``reset_validation()`` method. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From e837851d3626617ff9f8311c45d26449167d5fa8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 29 Sep 2015 12:30:55 +0300 Subject: Merge pull request #4126 from zoaked/patch-1 Persist config file rules when using FV reset_validation() --- system/libraries/Form_validation.php | 1 - user_guide_src/source/libraries/form_validation.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index af90316a4..a158225ee 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1586,7 +1586,6 @@ class CI_Form_validation { public function reset_validation() { $this->_field_data = array(); - $this->_config_rules = array(); $this->_error_array = array(); $this->_error_messages = array(); $this->error_string = ''; diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 1fde68d73..c288cc8c0 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1140,4 +1140,4 @@ the following functions: - :php:func:`set_radio()` Note that these are procedural functions, so they **do not** require you -to prepend them with ``$this->form_validation``. \ No newline at end of file +to prepend them with ``$this->form_validation``. -- cgit v1.2.3-24-g4f1b From f084acf240253f396d4a9787fed93a13d5771f46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 29 Sep 2015 12:35:00 +0300 Subject: [ci skip] Add changelog message for PR #4126 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9335fbfac..bf912b29f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -34,6 +34,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4116) - :doc:`Pagination Library ` set the wrong page number on the "data-ci-pagination-page" attribute in generated links. - Fixed a bug where :doc:`Pagination Library` added the 'rel="start"' attribute to the first displayed link even if it's not actually linking the first page. - Fixed a bug (#4137) - :doc:`Error Handling ` breaks for the new ``Error`` exceptions under PHP 7. +- Fixed a bug (#4126) - :doc:`Form Validation Library ` method ``reset_validation()`` discarded validation rules from config files. Version 3.0.1 ============= -- cgit v1.2.3-24-g4f1b From 84b5f24f2fa9932e6986cdb98731d1a0e7e76e1e Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Tue, 29 Sep 2015 17:42:29 -0700 Subject: refactor pulldown menu generation using sphinx toctree Signed-off-by: Hongyi Zhang --- .../_themes/sphinx_rtd_theme/breadcrumbs.html | 3 + .../source/_themes/sphinx_rtd_theme/layout.html | 2 + .../source/_themes/sphinx_rtd_theme/pulldown.html | 17 ++++ .../sphinx_rtd_theme/static/css/citheme.css | 70 ++++++++++++++++- .../_themes/sphinx_rtd_theme/static/js/theme.js | 90 ++++++---------------- 5 files changed, 113 insertions(+), 69 deletions(-) create mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html index ff0938e5c..55337accf 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -14,6 +14,9 @@ View page source {% endif %} +
+ classic layout +

diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html b/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html index 1203b2f34..20ede7d32 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html @@ -77,6 +77,8 @@ + {% include "pulldown.html" %} +
{# SIDE NAV, TOGGLES ON MOBILE #} diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html b/user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html new file mode 100644 index 000000000..7877346d8 --- /dev/null +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html @@ -0,0 +1,17 @@ + + diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index 10e7d04c6..0f83765b2 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -4,4 +4,72 @@ padding: 0px !important; font-weight: inherit !important; background-color: #f1d40f !important; -} \ No newline at end of file +} + +#nav { + background-color: #494949; + margin: 0; + padding: 0; + display:none; +} + +#nav2 { + background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAMgAzAwERAAIRAQMRAf/EAFkAAQADAQAAAAAAAAAAAAAAAAABBQcIAQEAAAAAAAAAAAAAAAAAAAAAEAABAgYDAAAAAAAAAAAAAAAAAVERAtMEFJRVBxgRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AMRAAAAAAAA7a87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wN/wJGAYEjAMCRgGBIwDAkYBgSMAwJGAsoIwCCMAgjAIIwCCMAgjAIIwEgAAAAAAAAAAAAAAAAAAAAAAAH//2Q==) repeat-x scroll left top transparent; + margin: 0; + padding: 0 310px 0 0; + text-align: right; + display:none; +} + +#nav_inner { + background-color: transparent; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + font-size: 11px; + margin: 0; + padding: 8px 12px 0 20px; +} + +div#pulldown-menu { + -moz-column-count: 5; + -moz-column-gap: 20px; + -webkit-column-count: 5; + -webkit-column-gap: 20px; + column-count: 5; + column-gap: 20px; + -webkit-column-rule: 1px groove #B8B8B8; + -moz-column-rule: 1px groove #B8B8B8; + column-rule: 1px groove #B8B8B8; +} + +#pulldown-menu > ul { + padding-top: 10px; + padding-bottom: 10px; + -webkit-column-break-inside: avoid; /*Chrome, Safari*/ + display: table; /*Firefox*/ + break-inside: avoid; /*IE 10+ theoretically*/ +} + +#pulldown-menu ul li.toctree-l2 { + font-size:0.82em; + margin-left: 20px; + list-style-image: url(data:image/gif;base64,R0lGODlhCwAJALMJAO7u7uTk5PLy8unp6fb29t7e3vj4+Li4uIWFheTk5AAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAALAAkAAAQoMJ1JqTQ4Z3SI98jHCWSJkByArCyiHkMsIzEX3DeCc0Xv+4hEa5iIAAA7); +} + +#pulldown-menu ul li.toctree-l1 a { + color:#fff; + text-decoration: none; + font-size:12px; + font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; + font-weight: 700; +} + +#pulldown-menu ul li.toctree-l2 a { + text-decoration: none; + font-size:11px; + line-height:1.4em; + font-weight: 300; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + color: #aaa; +} + + diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 8aee6ca29..267d87c6e 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -12,89 +12,43 @@ $(document).ready(function () { $(document).on('click', "[data-toggle='rst-current-version']", function () { $("[data-toggle='rst-versions']").toggleClass("shift-up"); }); - // Make tables responsive - $("table.docutils:not(.field-list)").wrap("
"); + // // Make tables responsive + // $("table.docutils:not(.field-list)").wrap("
"); // --- // START DOC MODIFICATION BY RUFNEX // v1.0 04.02.2015 // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de - // JLP - reformatted to make additions or corrections easier. Still hard-coded :(( - var ciNav = '\ -\ -
\ -'; - $('body').prepend(ciNav); - // - var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; - if ($.inArray($('h1').text(), a) > 0 || $('#search-results').length) - { - $('table.ciNav a').each(function () { - $(this).attr('href', $(this).attr("href").replace('../', '')); - }); - } - // $('#openToc').click(function () { $('#nav').slideToggle(); }); - $('.wy-breadcrumbs').append('
toc
'); $('#closeMe').toggle( - function () - { - setCookie('ciNav', true, 365); - $('#nav2').show(); - $('#topMenu').remove(); - $('body').css({background: 'none'}); - $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); - $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); - $('.wy-nav-side').toggle(); - }, - function () - { - setCookie('ciNav', false, 365); - $('#topMenu').remove(); - $('#nav').hide(); - $('#nav2').hide(); - $('body').css({background: '#edf0f2;'}); - $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); - $('.wy-nav-side').show(); - } + function () + { + setCookie('ciNav', true, 365); + $('#nav2').show(); + $('#topMenu').remove(); + $('body').css({background: 'none'}); + $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); + $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); + $('.wy-nav-side').toggle(); + }, + function () + { + setCookie('ciNav', false, 365); + $('#topMenu').remove(); + $('#nav').hide(); + $('#nav2').hide(); + $('body').css({background: '#edf0f2;'}); + $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); + $('.wy-nav-side').show(); + } ); if (getCookie('ciNav') == 'true') { $('#closeMe').trigger('click'); //$('#nav').slideToggle(); } - // END MODIFICATION --- }); // Rufnex Cookie functions -- cgit v1.2.3-24-g4f1b From b881ba33067000117f50ede4a9b76aaef99a3605 Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Tue, 29 Sep 2015 17:46:48 -0700 Subject: add end modification message back Signed-off-by: Hongyi Zhang --- user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 267d87c6e..f7ea328bf 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -49,6 +49,8 @@ $(document).ready(function () { $('#closeMe').trigger('click'); //$('#nav').slideToggle(); } + // END MODIFICATION --- + }); // Rufnex Cookie functions -- cgit v1.2.3-24-g4f1b From ce5734911bcfe31e0a56d6e38f625d81ceb9c1b6 Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Thu, 1 Oct 2015 15:00:58 -0700 Subject: Fix indentations Signed-off-by: Hongyi Zhang --- .../_themes/sphinx_rtd_theme/breadcrumbs.html | 23 +++++++++++----------- .../sphinx_rtd_theme/static/css/citheme.css | 14 ++++++------- .../_themes/sphinx_rtd_theme/static/js/theme.js | 3 +-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html index 55337accf..74ca4dc00 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -2,21 +2,20 @@ -
diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index 0f83765b2..b2e1dd494 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -31,11 +31,11 @@ div#pulldown-menu { -moz-column-count: 5; - -moz-column-gap: 20px; - -webkit-column-count: 5; - -webkit-column-gap: 20px; - column-count: 5; - column-gap: 20px; + -moz-column-gap: 20px; + -webkit-column-count: 5; + -webkit-column-gap: 20px; + column-count: 5; + column-gap: 20px; -webkit-column-rule: 1px groove #B8B8B8; -moz-column-rule: 1px groove #B8B8B8; column-rule: 1px groove #B8B8B8; @@ -45,8 +45,8 @@ div#pulldown-menu { padding-top: 10px; padding-bottom: 10px; -webkit-column-break-inside: avoid; /*Chrome, Safari*/ - display: table; /*Firefox*/ - break-inside: avoid; /*IE 10+ theoretically*/ + display: table; /*Firefox*/ + break-inside: avoid; /*IE 10+ theoretically*/ } #pulldown-menu ul li.toctree-l2 { diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index f7ea328bf..17ded53f1 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -49,8 +49,7 @@ $(document).ready(function () { $('#closeMe').trigger('click'); //$('#nav').slideToggle(); } - // END MODIFICATION --- - + // END MODIFICATION --- }); // Rufnex Cookie functions -- cgit v1.2.3-24-g4f1b From e8ea8ec857425575b7c3c7dfdce76c693d7f5b5c Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Thu, 1 Oct 2015 15:26:42 -0700 Subject: minor fixes: add back theme codes Signed-off-by: Hongyi Zhang --- user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html | 1 + user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html index 74ca4dc00..60343661a 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -18,4 +18,5 @@ classic layout +
diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 17ded53f1..b77789d06 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -12,8 +12,8 @@ $(document).ready(function () { $(document).on('click', "[data-toggle='rst-current-version']", function () { $("[data-toggle='rst-versions']").toggleClass("shift-up"); }); - // // Make tables responsive - // $("table.docutils:not(.field-list)").wrap("
"); + // Make tables responsive + $("table.docutils:not(.field-list)").wrap("
"); // --- // START DOC MODIFICATION BY RUFNEX // v1.0 04.02.2015 -- cgit v1.2.3-24-g4f1b From 249580e711d42fe966e52d7bcc0f349ba99a94a3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 2 Oct 2015 16:44:05 +0300 Subject: More XSS stuff --- system/core/Security.php | 2 +- tests/codeigniter/core/Security_test.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 0cae23a79..27471d98e 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -808,7 +808,7 @@ class CI_Security { .'([\s\042\047/=]*)' // non-attribute characters, excluding > (tag close) for obvious reasons .'(?[^\s\042\047>/=]+)' // attribute characters // optional attribute-value - .'(?:\s*=\s*\042[^\042]+\042|\s*=\s*\047[^\047]+\047|\s*=\s*[^\s\042\047=><`]*)?' // attribute-value separator + .'(?:\s*=(?:[^\s\042\047=><`]+|\s*\042[^\042]+\042|\s*\047[^\047]+\047|\s*(?U:[^\s\042\047=><`]*)))' // attribute-value separator .'#i'; if ($count = preg_match_all($pattern, $matches['attributes'], $attributes, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index ca111c3bf..b093393af 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -162,7 +162,7 @@ class Security_test extends CI_TestCase { { $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals('', $this->security->xss_clean('')); - $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals('onOutsideOfTag=test', $this->security->xss_clean('onOutsideOfTag=test')); $this->assertEquals('onNoTagAtAll = true', $this->security->xss_clean('onNoTagAtAll = true')); @@ -207,6 +207,11 @@ class Security_test extends CI_TestCase { '', $this->security->xss_clean('') ); + + $this->assertEquals( + '', + $this->security->xss_clean('') + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 93e8513136b76fd848221fba275fa43b63b3dce7 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Fri, 2 Oct 2015 06:47:30 -0700 Subject: Rearrange the TOC slightly, to support consistency between the side menu and the sphonx toctree-derived pulldown menu. Signed-off-by:Master Yoda --- user_guide_src/source/index.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index 8d8aa9438..a13ec983e 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -54,6 +54,16 @@ Tutorial tutorial/index +*************************** +Contributing to CodeIgniter +*************************** + +.. toctree:: + :glob: + :titlesonly: + + contributing/index + ************** General Topics ************** @@ -94,16 +104,6 @@ Helper Reference helpers/index -*************************** -Contributing to CodeIgniter -*************************** - -.. toctree:: - :glob: - :titlesonly: - - contributing/index - .. toctree:: :glob: :titlesonly: -- cgit v1.2.3-24-g4f1b From b079ae972d1bd9f2f854e07ea43f4d700b2e487c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 2 Oct 2015 16:50:04 +0300 Subject: Merge pull request #4148 from zhanghongyi/generate-pulldown [ci skip] Generate docs pulldown menu using sphinx toctree --- .../_themes/sphinx_rtd_theme/breadcrumbs.html | 23 +++--- .../source/_themes/sphinx_rtd_theme/layout.html | 2 + .../source/_themes/sphinx_rtd_theme/pulldown.html | 17 +++++ .../sphinx_rtd_theme/static/css/citheme.css | 70 +++++++++++++++++- .../_themes/sphinx_rtd_theme/static/js/theme.js | 85 +++++----------------- 5 files changed, 121 insertions(+), 76 deletions(-) create mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html index ff0938e5c..60343661a 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -2,18 +2,21 @@
diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html b/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html index 1203b2f34..20ede7d32 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/layout.html @@ -77,6 +77,8 @@ + {% include "pulldown.html" %} +
{# SIDE NAV, TOGGLES ON MOBILE #} diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html b/user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html new file mode 100644 index 000000000..7877346d8 --- /dev/null +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html @@ -0,0 +1,17 @@ + + diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index 10e7d04c6..b2e1dd494 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -4,4 +4,72 @@ padding: 0px !important; font-weight: inherit !important; background-color: #f1d40f !important; -} \ No newline at end of file +} + +#nav { + background-color: #494949; + margin: 0; + padding: 0; + display:none; +} + +#nav2 { + background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAMgAzAwERAAIRAQMRAf/EAFkAAQADAQAAAAAAAAAAAAAAAAABBQcIAQEAAAAAAAAAAAAAAAAAAAAAEAABAgYDAAAAAAAAAAAAAAAAAVERAtMEFJRVBxgRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AMRAAAAAAAA7a87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wN/wJGAYEjAMCRgGBIwDAkYBgSMAwJGAsoIwCCMAgjAIIwCCMAgjAIIwEgAAAAAAAAAAAAAAAAAAAAAAAH//2Q==) repeat-x scroll left top transparent; + margin: 0; + padding: 0 310px 0 0; + text-align: right; + display:none; +} + +#nav_inner { + background-color: transparent; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + font-size: 11px; + margin: 0; + padding: 8px 12px 0 20px; +} + +div#pulldown-menu { + -moz-column-count: 5; + -moz-column-gap: 20px; + -webkit-column-count: 5; + -webkit-column-gap: 20px; + column-count: 5; + column-gap: 20px; + -webkit-column-rule: 1px groove #B8B8B8; + -moz-column-rule: 1px groove #B8B8B8; + column-rule: 1px groove #B8B8B8; +} + +#pulldown-menu > ul { + padding-top: 10px; + padding-bottom: 10px; + -webkit-column-break-inside: avoid; /*Chrome, Safari*/ + display: table; /*Firefox*/ + break-inside: avoid; /*IE 10+ theoretically*/ +} + +#pulldown-menu ul li.toctree-l2 { + font-size:0.82em; + margin-left: 20px; + list-style-image: url(data:image/gif;base64,R0lGODlhCwAJALMJAO7u7uTk5PLy8unp6fb29t7e3vj4+Li4uIWFheTk5AAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAALAAkAAAQoMJ1JqTQ4Z3SI98jHCWSJkByArCyiHkMsIzEX3DeCc0Xv+4hEa5iIAAA7); +} + +#pulldown-menu ul li.toctree-l1 a { + color:#fff; + text-decoration: none; + font-size:12px; + font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; + font-weight: 700; +} + +#pulldown-menu ul li.toctree-l2 a { + text-decoration: none; + font-size:11px; + line-height:1.4em; + font-weight: 300; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + color: #aaa; +} + + diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 8aee6ca29..b77789d06 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -18,76 +18,31 @@ $(document).ready(function () { // START DOC MODIFICATION BY RUFNEX // v1.0 04.02.2015 // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de - // JLP - reformatted to make additions or corrections easier. Still hard-coded :(( - var ciNav = '\ -\ -
\ -'; - $('body').prepend(ciNav); - // - var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; - if ($.inArray($('h1').text(), a) > 0 || $('#search-results').length) - { - $('table.ciNav a').each(function () { - $(this).attr('href', $(this).attr("href").replace('../', '')); - }); - } - // $('#openToc').click(function () { $('#nav').slideToggle(); }); - $('.wy-breadcrumbs').append('
toc
'); $('#closeMe').toggle( - function () - { - setCookie('ciNav', true, 365); - $('#nav2').show(); - $('#topMenu').remove(); - $('body').css({background: 'none'}); - $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); - $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); - $('.wy-nav-side').toggle(); - }, - function () - { - setCookie('ciNav', false, 365); - $('#topMenu').remove(); - $('#nav').hide(); - $('#nav2').hide(); - $('body').css({background: '#edf0f2;'}); - $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); - $('.wy-nav-side').show(); - } + function () + { + setCookie('ciNav', true, 365); + $('#nav2').show(); + $('#topMenu').remove(); + $('body').css({background: 'none'}); + $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); + $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); + $('.wy-nav-side').toggle(); + }, + function () + { + setCookie('ciNav', false, 365); + $('#topMenu').remove(); + $('#nav').hide(); + $('#nav2').hide(); + $('body').css({background: '#edf0f2;'}); + $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); + $('.wy-nav-side').show(); + } ); if (getCookie('ciNav') == 'true') { -- cgit v1.2.3-24-g4f1b From 13b6fa3a1e978edbbaf04ed8ba5c1f9c9ae4bc5d Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Fri, 2 Oct 2015 06:47:30 -0700 Subject: Rearrange the TOC slightly, to support consistency between the side menu and the sphonx toctree-derived pulldown menu. Signed-off-by:Master Yoda --- user_guide_src/source/index.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index 8d8aa9438..a13ec983e 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -54,6 +54,16 @@ Tutorial tutorial/index +*************************** +Contributing to CodeIgniter +*************************** + +.. toctree:: + :glob: + :titlesonly: + + contributing/index + ************** General Topics ************** @@ -94,16 +104,6 @@ Helper Reference helpers/index -*************************** -Contributing to CodeIgniter -*************************** - -.. toctree:: - :glob: - :titlesonly: - - contributing/index - .. toctree:: :glob: :titlesonly: -- cgit v1.2.3-24-g4f1b From d4357dcc8ef213874d263dd9c55d39446bed2163 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 2 Oct 2015 16:59:58 +0300 Subject: [ci skip] Some consistency in the docs' theme CSS --- .../sphinx_rtd_theme/static/css/citheme.css | 72 +++++++++++----------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index b2e1dd494..192af2004 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -3,42 +3,42 @@ .highlighted { padding: 0px !important; font-weight: inherit !important; - background-color: #f1d40f !important; + background-color: #f1d40f !important; } -#nav { - background-color: #494949; - margin: 0; +#nav { + background-color: #494949; + margin: 0; padding: 0; - display:none; + display: none; } -#nav2 { - background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAMgAzAwERAAIRAQMRAf/EAFkAAQADAQAAAAAAAAAAAAAAAAABBQcIAQEAAAAAAAAAAAAAAAAAAAAAEAABAgYDAAAAAAAAAAAAAAAAAVERAtMEFJRVBxgRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AMRAAAAAAAA7a87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wN/wJGAYEjAMCRgGBIwDAkYBgSMAwJGAsoIwCCMAgjAIIwCCMAgjAIIwEgAAAAAAAAAAAAAAAAAAAAAAAH//2Q==) repeat-x scroll left top transparent; - margin: 0; - padding: 0 310px 0 0; +#nav2 { + background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAMgAzAwERAAIRAQMRAf/EAFkAAQADAQAAAAAAAAAAAAAAAAABBQcIAQEAAAAAAAAAAAAAAAAAAAAAEAABAgYDAAAAAAAAAAAAAAAAAVERAtMEFJRVBxgRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AMRAAAAAAAA7a87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wN/wJGAYEjAMCRgGBIwDAkYBgSMAwJGAsoIwCCMAgjAIIwCCMAgjAIIwEgAAAAAAAAAAAAAAAAAAAAAAAH//2Q==) repeat-x scroll left top transparent; + margin: 0; + padding: 0 310px 0 0; text-align: right; - display:none; + display: none; } -#nav_inner { - background-color: transparent; - font-family: Lucida Grande,Verdana,Geneva,sans-serif; - font-size: 11px; - margin: 0; +#nav_inner { + background-color: transparent; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + font-size: 11px; + margin: 0; padding: 8px 12px 0 20px; } -div#pulldown-menu { +div#pulldown-menu { -moz-column-count: 5; -moz-column-gap: 20px; -webkit-column-count: 5; -webkit-column-gap: 20px; column-count: 5; column-gap: 20px; - -webkit-column-rule: 1px groove #B8B8B8; - -moz-column-rule: 1px groove #B8B8B8; - column-rule: 1px groove #B8B8B8; + -webkit-column-rule: 1px groove #b8b8b8; + -moz-column-rule: 1px groove #b8b8b8; + column-rule: 1px groove #b8b8b8; } #pulldown-menu > ul { @@ -49,27 +49,25 @@ div#pulldown-menu { break-inside: avoid; /*IE 10+ theoretically*/ } -#pulldown-menu ul li.toctree-l2 { - font-size:0.82em; - margin-left: 20px; - list-style-image: url(data:image/gif;base64,R0lGODlhCwAJALMJAO7u7uTk5PLy8unp6fb29t7e3vj4+Li4uIWFheTk5AAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAALAAkAAAQoMJ1JqTQ4Z3SI98jHCWSJkByArCyiHkMsIzEX3DeCc0Xv+4hEa5iIAAA7); +#pulldown-menu ul li.toctree-l2 { + font-size: 0.82em; + margin-left: 20px; + list-style-image: url(data:image/gif;base64,R0lGODlhCwAJALMJAO7u7uTk5PLy8unp6fb29t7e3vj4+Li4uIWFheTk5AAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAALAAkAAAQoMJ1JqTQ4Z3SI98jHCWSJkByArCyiHkMsIzEX3DeCc0Xv+4hEa5iIAAA7); } -#pulldown-menu ul li.toctree-l1 a { - color:#fff; - text-decoration: none; - font-size:12px; +#pulldown-menu ul li.toctree-l1 a { + color: #ffffff; + text-decoration: none; + font-size: 12px; font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; font-weight: 700; } -#pulldown-menu ul li.toctree-l2 a { - text-decoration: none; - font-size:11px; - line-height:1.4em; - font-weight: 300; - font-family: Lucida Grande,Verdana,Geneva,sans-serif; - color: #aaa; -} - - +#pulldown-menu ul li.toctree-l2 a { + text-decoration: none; + font-size: 11px; + line-height: 1.4em; + font-weight: 300; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + color: #aaaaaa; +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 8d4ac663909df3c95d546d3b0b405566f0df0d05 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 2 Oct 2015 16:59:58 +0300 Subject: [ci skip] Some consistency in the docs' theme CSS --- .../sphinx_rtd_theme/static/css/citheme.css | 72 +++++++++++----------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index b2e1dd494..192af2004 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -3,42 +3,42 @@ .highlighted { padding: 0px !important; font-weight: inherit !important; - background-color: #f1d40f !important; + background-color: #f1d40f !important; } -#nav { - background-color: #494949; - margin: 0; +#nav { + background-color: #494949; + margin: 0; padding: 0; - display:none; + display: none; } -#nav2 { - background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAMgAzAwERAAIRAQMRAf/EAFkAAQADAQAAAAAAAAAAAAAAAAABBQcIAQEAAAAAAAAAAAAAAAAAAAAAEAABAgYDAAAAAAAAAAAAAAAAAVERAtMEFJRVBxgRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AMRAAAAAAAA7a87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wN/wJGAYEjAMCRgGBIwDAkYBgSMAwJGAsoIwCCMAgjAIIwCCMAgjAIIwEgAAAAAAAAAAAAAAAAAAAAAAAH//2Q==) repeat-x scroll left top transparent; - margin: 0; - padding: 0 310px 0 0; +#nav2 { + background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAMgAzAwERAAIRAQMRAf/EAFkAAQADAQAAAAAAAAAAAAAAAAABBQcIAQEAAAAAAAAAAAAAAAAAAAAAEAABAgYDAAAAAAAAAAAAAAAAAVERAtMEFJRVBxgRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AMRAAAAAAAA7a87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wHnbrLgV272uA87dZcCu3e1wN/wJGAYEjAMCRgGBIwDAkYBgSMAwJGAsoIwCCMAgjAIIwCCMAgjAIIwEgAAAAAAAAAAAAAAAAAAAAAAAH//2Q==) repeat-x scroll left top transparent; + margin: 0; + padding: 0 310px 0 0; text-align: right; - display:none; + display: none; } -#nav_inner { - background-color: transparent; - font-family: Lucida Grande,Verdana,Geneva,sans-serif; - font-size: 11px; - margin: 0; +#nav_inner { + background-color: transparent; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + font-size: 11px; + margin: 0; padding: 8px 12px 0 20px; } -div#pulldown-menu { +div#pulldown-menu { -moz-column-count: 5; -moz-column-gap: 20px; -webkit-column-count: 5; -webkit-column-gap: 20px; column-count: 5; column-gap: 20px; - -webkit-column-rule: 1px groove #B8B8B8; - -moz-column-rule: 1px groove #B8B8B8; - column-rule: 1px groove #B8B8B8; + -webkit-column-rule: 1px groove #b8b8b8; + -moz-column-rule: 1px groove #b8b8b8; + column-rule: 1px groove #b8b8b8; } #pulldown-menu > ul { @@ -49,27 +49,25 @@ div#pulldown-menu { break-inside: avoid; /*IE 10+ theoretically*/ } -#pulldown-menu ul li.toctree-l2 { - font-size:0.82em; - margin-left: 20px; - list-style-image: url(data:image/gif;base64,R0lGODlhCwAJALMJAO7u7uTk5PLy8unp6fb29t7e3vj4+Li4uIWFheTk5AAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAALAAkAAAQoMJ1JqTQ4Z3SI98jHCWSJkByArCyiHkMsIzEX3DeCc0Xv+4hEa5iIAAA7); +#pulldown-menu ul li.toctree-l2 { + font-size: 0.82em; + margin-left: 20px; + list-style-image: url(data:image/gif;base64,R0lGODlhCwAJALMJAO7u7uTk5PLy8unp6fb29t7e3vj4+Li4uIWFheTk5AAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAALAAkAAAQoMJ1JqTQ4Z3SI98jHCWSJkByArCyiHkMsIzEX3DeCc0Xv+4hEa5iIAAA7); } -#pulldown-menu ul li.toctree-l1 a { - color:#fff; - text-decoration: none; - font-size:12px; +#pulldown-menu ul li.toctree-l1 a { + color: #ffffff; + text-decoration: none; + font-size: 12px; font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; font-weight: 700; } -#pulldown-menu ul li.toctree-l2 a { - text-decoration: none; - font-size:11px; - line-height:1.4em; - font-weight: 300; - font-family: Lucida Grande,Verdana,Geneva,sans-serif; - color: #aaa; -} - - +#pulldown-menu ul li.toctree-l2 a { + text-decoration: none; + font-size: 11px; + line-height: 1.4em; + font-weight: 300; + font-family: Lucida Grande,Verdana,Geneva,sans-serif; + color: #aaaaaa; +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 48844d16102d92fd146d562bc322b5624e44f9dd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 5 Oct 2015 10:52:04 +0300 Subject: Close #4155 --- system/helpers/file_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index cd1c641ec..f6cb1629a 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -343,7 +343,7 @@ if ( ! function_exists('get_mime_by_extension')) if ( ! is_array($mimes)) { - $mimes =& get_mimes(); + $mimes = get_mimes(); if (empty($mimes)) { -- cgit v1.2.3-24-g4f1b From f0f47da9ae4227968ccc9ee6511bcab526498b4c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 5 Oct 2015 12:37:16 +0300 Subject: Some more intrusive XSS cleaning --- system/core/Security.php | 16 +++++++++++----- tests/codeigniter/core/Security_test.php | 9 +++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 27471d98e..ab85e2239 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -498,8 +498,8 @@ class CI_Security { .'(?(?:[\s\042\047/=]*' // non-attribute characters, excluding > (tag close) for obvious reasons .'[^\s\042\047>/=]+' // attribute characters // optional attribute-value - .'(?:\s*=\s*' // attribute-value separator - .'(?:\042[^\042]*\042|\047[^\047]*\047|[^\s\042\047=><`]*)' // single, double or non-quoted value + .'(?:\s*=' // attribute-value separator + .'(?:[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*))' // single, double or non-quoted value .')?' // end optional attribute-value group .')*)' // end optional attributes group .'[^>]*)(?\>)?#isS'; @@ -808,7 +808,7 @@ class CI_Security { .'([\s\042\047/=]*)' // non-attribute characters, excluding > (tag close) for obvious reasons .'(?[^\s\042\047>/=]+)' // attribute characters // optional attribute-value - .'(?:\s*=(?:[^\s\042\047=><`]+|\s*\042[^\042]+\042|\s*\047[^\047]+\047|\s*(?U:[^\s\042\047=><`]*)))' // attribute-value separator + .'(?:\s*=(?[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*)))' // attribute-value separator .'#i'; if ($count = preg_match_all($pattern, $matches['attributes'], $attributes, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) @@ -818,8 +818,14 @@ class CI_Security { // so we don't damage the string. for ($i = $count - 1; $i > -1; $i--) { - // Is it indeed an "evil" attribute? - if (preg_match('#^('.implode('|', $evil_attributes).')$#i', $attributes[$i]['name'][0])) + if ( + // Is it indeed an "evil" attribute? + preg_match('#^('.implode('|', $evil_attributes).')$#i', $attributes[$i]['name'][0]) + // Or an attribute not starting with a letter? Some parsers get confused by that + OR ! ctype_alpha($attributes[$i]['name'][0][0]) + // Does it have an equals sign, but no value and not quoted? Strip that too! + OR (trim($attributes[$i]['value'][0]) === '') + ) { $matches['attributes'] = substr_replace( $matches['attributes'], diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index b093393af..52967dc2f 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -146,7 +146,7 @@ class Security_test extends CI_TestCase { $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals( - ' src="x">', + ' src="x">', $this->security->xss_clean(' src="x">') ); @@ -209,9 +209,14 @@ class Security_test extends CI_TestCase { ); $this->assertEquals( - '', + '', $this->security->xss_clean('') ); + + $this->assertEquals( + '1">', + $this->security->xss_clean('') + ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From c094becbcaf95fa8700ef7fc73c0b2bf808801a9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Oct 2015 17:18:57 +0300 Subject: [ci skip] Fix broken links in user guide --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/general/controllers.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index bf912b29f..9648768c2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -32,7 +32,7 @@ Bug fixes for 3.0.2 - Fixed a bug (#4044) - :doc:`Cache Library ` 'redis' driver didn't catch ``RedisException`` that could be thrown during authentication. - Fixed a bug (#4120) - :doc:`Database ` method ``error()`` didn't return error info when called after ``query()`` with the 'mssql' driver. - Fixed a bug (#4116) - :doc:`Pagination Library ` set the wrong page number on the "data-ci-pagination-page" attribute in generated links. -- Fixed a bug where :doc:`Pagination Library` added the 'rel="start"' attribute to the first displayed link even if it's not actually linking the first page. +- Fixed a bug where :doc:`Pagination Library ` added the 'rel="start"' attribute to the first displayed link even if it's not actually linking the first page. - Fixed a bug (#4137) - :doc:`Error Handling ` breaks for the new ``Error`` exceptions under PHP 7. - Fixed a bug (#4126) - :doc:`Form Validation Library ` method ``reset_validation()`` discarded validation rules from config files. diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst index 7efb9349e..5a111d8dc 100644 --- a/user_guide_src/source/general/controllers.rst +++ b/user_guide_src/source/general/controllers.rst @@ -145,7 +145,7 @@ load your main index.php file without specifying any URI segments you'll see your "Hello World" message by default. For more information, please refer to the "Reserved Routes" section of the -:doc:`URI Routing ` documentation. +:doc:`URI Routing ` documentation. Remapping Method Calls ====================== -- cgit v1.2.3-24-g4f1b From 47adcef68871cea1e556ffb2c0b6f585497e2a27 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Oct 2015 17:21:06 +0300 Subject: [ci skip] Prepare 3.0.2 release --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 +++++- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index b69630cf8..60dcc0e5e 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.2-dev'); + define('CI_VERSION', '3.0.2'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9648768c2..e1614fdde 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,11 @@ Change Log Version 3.0.2 ============= -Release Date: Not Released +Release Date: October 8, 2015 + +- **Security** + + - Fixed a number of XSS attack vectors in :doc:`Security Library ` method ``xss_clean()`` (thanks to Frans Rosén from `Detectify `_). - General Changes diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index d77c1e63f..c054490c3 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.2-dev' +version = '3.0.2' # The full version, including alpha/beta/rc tags. -release = '3.0.2-dev' +release = '3.0.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 0026052c1..217ba654d 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.0.2-dev (Current version) `_ +- `CodeIgniter v3.0.2 (Current version) `_ - `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ - `CodeIgniter v2.2.3 `_ -- cgit v1.2.3-24-g4f1b From d8687a59572f1f1b6d855588577363f6e628242e Mon Sep 17 00:00:00 2001 From: Ahmad Anbar Date: Sat, 10 Oct 2015 22:51:54 +0300 Subject: Optimize csv_from_result speed. --- system/database/DB_utility.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 78398ea83..b51893e18 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -254,11 +254,12 @@ abstract class CI_DB_utility { // Next blast through the result array and build out the rows while ($row = $query->unbuffered_row('array')) { + $line = array(); foreach ($row as $item) { - $out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim; + $line[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure; } - $out = substr($out, 0, -strlen($delim)).$newline; + $out .= implode($delim, $line).$newline; } return $out; -- cgit v1.2.3-24-g4f1b From 406ce65e26c4fda1b840b7267b148228cc3ca2f2 Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Sun, 11 Oct 2015 15:58:45 -0700 Subject: disable pulldown menu on mobile devices Signed-off-by: Hongyi Zhang --- user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html | 2 +- .../source/_themes/sphinx_rtd_theme/static/css/citheme.css | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html index 60343661a..1694a1b09 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -15,7 +15,7 @@ {% endif %}
- classic layout + switch layout

diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index 192af2004..4c5c2f30b 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -70,4 +70,11 @@ div#pulldown-menu { font-weight: 300; font-family: Lucida Grande,Verdana,Geneva,sans-serif; color: #aaaaaa; +} + +/*disable switch layout on mobile devices*/ +@media (max-width: 768px) { + #closeMe { + display: none; + } } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 4bb2b95a1b1f580427680c3bef71888e98c25523 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Oct 2015 13:55:24 +0300 Subject: [ci skip] Add more info about security reporting to docs --- user_guide_src/source/contributing/index.rst | 20 ++++++++++++++++---- user_guide_src/source/general/security.rst | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index 0112ca065..5966070d1 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -29,12 +29,24 @@ own copy. This will require you to use the version control system called Git. Support ******* -Note that GitHub is not for general support questions! +Please note that GitHub is not for general support questions! If you are +having trouble using a feature of CodeIgniter, ask for help on our +`forums `_ instead. -If you are having trouble using a feature of CodeIgniter, ask for help on the forum. +If you are not sure whether you are using something correctly or if you +have found a bug, again - please ask on the forums first. -If you are wondering if you are using -something correctly or if you have found a bug, ask on the forum first. +******** +Security +******** + +Did you find a security issue in CodeIgniter? + +Please *don't* disclose it publicly, but e-mail us at security@codeigniter.com, +or report it via our page on `HackerOne `_. + +If you've found a critical vulnerability, we'd be happy to credit you in our +`ChangeLog <../changelog>`. **************************** Tips for a Good Issue Report diff --git a/user_guide_src/source/general/security.rst b/user_guide_src/source/general/security.rst index d4120d162..8afdaca31 100644 --- a/user_guide_src/source/general/security.rst +++ b/user_guide_src/source/general/security.rst @@ -5,6 +5,9 @@ Security This page describes some "best practices" regarding web security, and details CodeIgniter's internal security features. +.. note:: If you came here looking for a security contact, please refer to + our `Contribution Guide <../contributing/index>`. + URI Security ============ -- cgit v1.2.3-24-g4f1b From 6d6b3b2f89d517b4589cb52965f34b115036584a Mon Sep 17 00:00:00 2001 From: Ahmad Anbar Date: Sat, 10 Oct 2015 22:51:54 +0300 Subject: Optimize csv_from_result speed. --- system/database/DB_utility.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 78398ea83..b51893e18 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -254,11 +254,12 @@ abstract class CI_DB_utility { // Next blast through the result array and build out the rows while ($row = $query->unbuffered_row('array')) { + $line = array(); foreach ($row as $item) { - $out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim; + $line[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure; } - $out = substr($out, 0, -strlen($delim)).$newline; + $out .= implode($delim, $line).$newline; } return $out; -- cgit v1.2.3-24-g4f1b From 2d7092c5771f7015b60f0e5cc6c699b8f4f802ba Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Oct 2015 16:54:08 +0300 Subject: [ci skip] Add changelog entry for PR #4166 --- user_guide_src/source/changelog.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e1614fdde..5e167a08f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,18 @@ Change Log ########## +Version 3.0.3 +============= + +Release Date: Not Released + +- Database + + - Optimized :doc:`Database Utility ` method ``csv_from_result()`` for speed with larger result sets. + +Bug fixes for 3.0.3 +------------------- + Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From 2b5825ec66670b6ecb9528740cc1a51b59dbd3f2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Oct 2015 16:57:28 +0300 Subject: [ci skip] This is 3.0.3-dev --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_303.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_303.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 60dcc0e5e..8cea813a2 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.2'); + define('CI_VERSION', '3.0.3-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index c054490c3..d77c1e63f 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.2' +version = '3.0.2-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.2' +release = '3.0.2-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 217ba654d..5b167d2ab 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.0.2 (Current version) `_ +- `CodeIgniter v3.0.3-dev (Current version) `_ +- `CodeIgniter v3.0.2 `_ - `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ - `CodeIgniter v2.2.3 `_ diff --git a/user_guide_src/source/installation/upgrade_303.rst b/user_guide_src/source/installation/upgrade_303.rst new file mode 100644 index 000000000..a98eed0d4 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_303.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.2 to 3.0.3 +############################# + +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. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 76fe434b5..010d1633e 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.0.2 to 3.0.3 Upgrading from 3.0.1 to 3.0.2 Upgrading from 3.0.0 to 3.0.1 Upgrading from 2.2.x to 3.0.x -- cgit v1.2.3-24-g4f1b From 36a055e49b040e6f18be7bce5e010c2a90d2f44f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Oct 2015 17:13:17 +0300 Subject: [ci skip] Correct download link for 3.0.3-dev --- user_guide_src/source/installation/downloads.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 5b167d2ab..1249d14ec 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.0.3-dev (Current version) `_ +- `CodeIgniter v3.0.3-dev (Current version) `_ - `CodeIgniter v3.0.2 `_ - `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ -- cgit v1.2.3-24-g4f1b From a3643a5e92cfe09b48327141d2b52701ab172977 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 13 Oct 2015 13:46:22 +0300 Subject: [ci skip] Correct version number in user guide conf --- user_guide_src/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index d77c1e63f..46e033ec8 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.2-dev' +version = '3.0.3-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.2-dev' +release = '3.0.3-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3-24-g4f1b From 9d02ceafe0aa5ec755f1d8b011cf21f3841191cc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 13 Oct 2015 14:38:30 +0300 Subject: [ci skip] Fix #4170 --- system/database/drivers/sqlsrv/sqlsrv_driver.php | 4 +--- user_guide_src/source/changelog.rst | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 8d383b274..1df3a4258 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -275,9 +275,7 @@ class CI_DB_sqlsrv_driver extends CI_DB { */ public function insert_id() { - $query = $this->query('SELECT @@IDENTITY AS insert_id'); - $query = $query->row(); - return $query->insert_id; + return $this->query('SELECT SCOPE_IDENTITY() AS insert_id')->row()->insert_id; } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5e167a08f..e3dfac879 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,8 @@ Release Date: Not Released Bug fixes for 3.0.3 ------------------- +- Fixed a bug (#4170) - :doc:`Database ` method ``insert_id()`` could return an identity from the wrong scope with the 'sqlsrv' driver. + Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From 89c7123621f22533e1777796237a9b06bd190976 Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Fri, 16 Oct 2015 00:57:08 -0700 Subject: revert img alt changes, fix cookies, and improve pulldown menu in multiple screen size Signed-off-by: Hongyi Zhang --- .../_themes/sphinx_rtd_theme/breadcrumbs.html | 2 +- .../sphinx_rtd_theme/static/css/citheme.css | 18 ++++++++---- .../_themes/sphinx_rtd_theme/static/js/theme.js | 32 ++++++++++++++++++++-- 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html index 1694a1b09..60343661a 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -15,7 +15,7 @@ {% endif %}
- switch layout + classic layout

diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index 4c5c2f30b..a2a3b3e91 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -72,9 +72,17 @@ div#pulldown-menu { color: #aaaaaa; } -/*disable switch layout on mobile devices*/ -@media (max-width: 768px) { - #closeMe { - display: none; - } +/*hide pulldown menu on mobile devices*/ +@media (max-width: 768px) { /*tablet size defined by theme*/ + #closeMe { + display: none; + } + + #pulldown { + display: none; + } + + #openToc { + display: none; + } } \ No newline at end of file diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index b77789d06..52580a056 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -25,7 +25,7 @@ $(document).ready(function () { $('#closeMe').toggle( function () { - setCookie('ciNav', true, 365); + setCookie('ciNav', 'true', 365); $('#nav2').show(); $('#topMenu').remove(); $('body').css({background: 'none'}); @@ -35,7 +35,7 @@ $(document).ready(function () { }, function () { - setCookie('ciNav', false, 365); + setCookie('ciNav', 'false', 365); $('#topMenu').remove(); $('#nav').hide(); $('#nav2').hide(); @@ -50,14 +50,19 @@ $(document).ready(function () { //$('#nav').slideToggle(); } // END MODIFICATION --- + }); // Rufnex Cookie functions function setCookie(cname, cvalue, exdays) { + // expire the old cookie if existed to avoid multiple cookies with the same name + if (getCookie(cname) != false) { + document.cookie = cname + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; + } var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toGMTString(); - document.cookie = cname + "=" + cvalue + "; " + expires; + document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/"; } function getCookie(cname) { var name = cname + "="; @@ -74,6 +79,27 @@ function getCookie(cname) { } // End +// resize window +$(window).on('resize', function(){ + // show side nav on small screens when pulldown is enabled + if (getCookie('ciNav') == 'true' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme + $('.wy-nav-side').show(); + } + // changing css with jQuenry seems to override the default css media query + // change margin + else if (getCookie('ciNav') == 'false' && $(window).width() <= 768) { + $('.wy-nav-content-wrap').css({'margin-left': 0}); + } + // hide side nav on large screens when pulldown is enabled + else if (getCookie('ciNav') == 'true' && $(window).width() > 768) { + $('.wy-nav-side').hide(); + } + // change margin + else if (getCookie('ciNav') == 'false' && $(window).width() > 768) { + $('.wy-nav-content-wrap').css({'margin-left': '300px'}); + } +}); + window.SphinxRtdTheme = (function (jquery) { var stickyNav = (function () { var navBar, -- cgit v1.2.3-24-g4f1b From af042458194867ce9a9304eae2c261c14676b83a Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Fri, 16 Oct 2015 01:47:04 -0700 Subject: fix a typo in comment Signed-off-by: Hongyi Zhang --- user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 52580a056..bc996b710 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -85,7 +85,7 @@ $(window).on('resize', function(){ if (getCookie('ciNav') == 'true' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme $('.wy-nav-side').show(); } - // changing css with jQuenry seems to override the default css media query + // changing css with jquery seems to override the default css media query // change margin else if (getCookie('ciNav') == 'false' && $(window).width() <= 768) { $('.wy-nav-content-wrap').css({'margin-left': 0}); -- cgit v1.2.3-24-g4f1b From de8b82ca8c4e201ad21c07ca962f5480493143eb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 18 Oct 2015 20:58:38 +0300 Subject: Fix #4179 --- system/libraries/Session/drivers/Session_database_driver.php | 4 ++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+) diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 1d01c2923..72b39d12d 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -159,6 +159,10 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan if (($result = $this->_db->get()->row()) === NULL) { + // PHP7 will reuse the same SessionHandler object after + // ID regeneration, so we need to explicitly set this to + // FALSE instead of relying on the default ... + $this->_row_exists = FALSE; $this->_fingerprint = md5(''); return ''; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e3dfac879..950a4a626 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.0.3 ------------------- - Fixed a bug (#4170) - :doc:`Database ` method ``insert_id()`` could return an identity from the wrong scope with the 'sqlsrv' driver. +- Fixed a bug (#4179) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP7. Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From 97d5154c1b50e8c0e73b17355d20126dfaf043fa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Oct 2015 11:28:11 +0300 Subject: [ci skip] Fix docs about QB caching It doesn't support set() ... Related: #4175 --- user_guide_src/source/database/query_builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 9c3ff306f..5d9ae4592 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1018,7 +1018,7 @@ Here's a usage example:: .. note:: The following statements can be cached: select, from, join, - where, like, group_by, having, order_by, set + where, like, group_by, having, order_by *********************** -- cgit v1.2.3-24-g4f1b From 95f815745855a5ac365595eb44abbda11766cfe5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Oct 2015 13:16:19 +0300 Subject: Fix #4173 This reverts commit 7cc6cea2d421862726081a39e932dbceeefcc775 from PR #3968. At the time this seemed logical, but turns out it breaks the ability to create non-PRIMARY composite keys, so ... --- system/database/DB_forge.php | 8 +++++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index dde285598..f9cf76a14 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -239,7 +239,13 @@ abstract class CI_DB_forge { */ public function add_key($key, $primary = FALSE) { - if (is_array($key)) + // DO NOT change this! This condition is only applicable + // for PRIMARY keys because you can only have one such, + // and therefore all fields you add to it will be included + // in the same, composite PRIMARY KEY. + // + // It's not the same for regular indexes. + if ($primary === TRUE && is_array($key)) { foreach ($key as $one) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 950a4a626..72bd9acf9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.0.3 - Fixed a bug (#4170) - :doc:`Database ` method ``insert_id()`` could return an identity from the wrong scope with the 'sqlsrv' driver. - Fixed a bug (#4179) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP7. +- Fixed a bug (#4173) - :doc:`Database Forge ` method ``add_key()`` didn't allow creation of non-PRIMARY composite keys after the "bugfix" for #3968. Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From a7d4abaedc27497d570ae06ddc9cdde05930ec15 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Oct 2015 14:39:44 +0300 Subject: Fix #4171 and a number of other transaction bugs --- system/database/DB_driver.php | 115 ++++++++++++++++----- system/database/drivers/cubrid/cubrid_driver.php | 38 +++---- system/database/drivers/ibase/ibase_driver.php | 32 +++--- system/database/drivers/mssql/mssql_driver.php | 30 +----- system/database/drivers/mysql/mysql_driver.php | 37 ++----- system/database/drivers/mysqli/mysqli_driver.php | 30 +----- system/database/drivers/oci8/oci8_driver.php | 41 +------- system/database/drivers/odbc/odbc_driver.php | 34 ++---- system/database/drivers/pdo/pdo_driver.php | 30 +----- system/database/drivers/postgre/postgre_driver.php | 30 +----- system/database/drivers/sqlite/sqlite_driver.php | 39 ++----- system/database/drivers/sqlite3/sqlite3_driver.php | 30 +----- system/database/drivers/sqlsrv/sqlsrv_driver.php | 30 +----- user_guide_src/source/changelog.rst | 4 + .../source/database/db_driver_reference.rst | 6 +- 15 files changed, 170 insertions(+), 356 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index cc94edc16..0ea679432 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -668,7 +668,13 @@ abstract class CI_DB_driver { { do { + $trans_depth = $this->_trans_depth; $this->trans_complete(); + if ($trans_depth === $this->_trans_depth) + { + log_message('error', 'Database: Failure during an automated transaction commit/rollback!'); + break; + } } while ($this->_trans_depth !== 0); } @@ -813,24 +819,16 @@ abstract class CI_DB_driver { * Start Transaction * * @param bool $test_mode = FALSE - * @return void + * @return bool */ public function trans_start($test_mode = FALSE) { if ( ! $this->trans_enabled) { - return; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - $this->_trans_depth += 1; - return; + return FALSE; } - $this->trans_begin($test_mode); - $this->_trans_depth += 1; + return $this->trans_begin($test_mode); } // -------------------------------------------------------------------- @@ -847,17 +845,6 @@ abstract class CI_DB_driver { return FALSE; } - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 1) - { - $this->_trans_depth -= 1; - return TRUE; - } - else - { - $this->_trans_depth = 0; - } - // The query() function will set this flag to FALSE in the event that a query failed if ($this->_trans_status === FALSE OR $this->_trans_failure === TRUE) { @@ -875,8 +862,7 @@ abstract class CI_DB_driver { return FALSE; } - $this->trans_commit(); - return TRUE; + return $this->trans_commit(); } // -------------------------------------------------------------------- @@ -893,6 +879,87 @@ abstract class CI_DB_driver { // -------------------------------------------------------------------- + /** + * Begin Transaction + * + * @param bool $test_mode + * @return bool + */ + public function trans_begin($test_mode = FALSE) + { + if ( ! $this->trans_enabled) + { + return FALSE; + } + // When transactions are nested we only begin/commit/rollback the outermost ones + elseif ($this->_trans_depth > 0) + { + $this->_trans_depth++; + return TRUE; + } + + // Reset the transaction failure flag. + // If the $test_mode flag is set to TRUE transactions will be rolled back + // even if the queries produce a successful result. + $this->_trans_failure = ($test_mode === TRUE); + + if ($this->_trans_begin()) + { + $this->_trans_depth++; + return TRUE; + } + + return FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Commit Transaction + * + * @return bool + */ + public function trans_commit() + { + if ( ! $this->trans_enabled OR $this->_trans_depth === 0) + { + return FALSE; + } + // When transactions are nested we only begin/commit/rollback the outermost ones + elseif ($this->_trans_depth > 1 OR $this->_trans_commit()) + { + $this->_trans_depth--; + return TRUE; + } + + return FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Rollback Transaction + * + * @return bool + */ + public function trans_rollback() + { + if ( ! $this->trans_enabled OR $this->_trans_depth === 0) + { + return FALSE; + } + // When transactions are nested we only begin/commit/rollback the outermost ones + elseif ($this->_trans_depth > 1 OR $this->_trans_rollback()) + { + $this->_trans_depth--; + return TRUE; + } + + return FALSE; + } + + // -------------------------------------------------------------------- + /** * Compile Bindings * diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index f80b4db54..65f4adb3f 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -187,25 +187,17 @@ class CI_DB_cubrid_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if (($autocommit = cubrid_get_autocommit($this->conn_id)) === NULL) { - return TRUE; + return FALSE; } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - - if (cubrid_get_autocommit($this->conn_id)) + elseif ($autocommit === TRUE) { - cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_FALSE); + return cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_FALSE); } return TRUE; @@ -218,19 +210,16 @@ class CI_DB_cubrid_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if ( ! cubrid_commit($this->conn_id)) { - return TRUE; + return FALSE; } - cubrid_commit($this->conn_id); - if ($this->auto_commit && ! cubrid_get_autocommit($this->conn_id)) { - cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE); + return cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE); } return TRUE; @@ -243,16 +232,13 @@ class CI_DB_cubrid_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if ( ! cubrid_rollback($this->conn_id)) { - return TRUE; + return FALSE; } - cubrid_rollback($this->conn_id); - if ($this->auto_commit && ! cubrid_get_autocommit($this->conn_id)) { cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE); diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index 529c320cd..82550d51b 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -134,24 +134,16 @@ class CI_DB_ibase_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if (($trans_handle = ibase_trans($this->conn_id)) === FALSE) { - return TRUE; + return FALSE; } - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - - $this->_ibase_trans = ibase_trans($this->conn_id); - + $this->_ibase_trans = $trans_handle; return TRUE; } @@ -162,15 +154,15 @@ class CI_DB_ibase_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans->depth > 0) + if (ibase_commit($this->_ibase_trans)) { + $this->_ibase_trans = NULL; return TRUE; } - return ibase_commit($this->_ibase_trans); + return FALSE; } // -------------------------------------------------------------------- @@ -180,15 +172,15 @@ class CI_DB_ibase_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if (ibase_rollback($this->_ibase_trans)) { + $this->_ibase_trans = NULL; return TRUE; } - return ibase_rollback($this->_ibase_trans); + return FALSE; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 05e5418c3..883973ae1 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -182,22 +182,10 @@ class CI_DB_mssql_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - return $this->simple_query('BEGIN TRAN'); } @@ -208,14 +196,8 @@ class CI_DB_mssql_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return $this->simple_query('COMMIT TRAN'); } @@ -226,14 +208,8 @@ class CI_DB_mssql_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return $this->simple_query('ROLLBACK TRAN'); } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index df0f24920..9c630d0d6 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -272,25 +272,12 @@ class CI_DB_mysql_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - $this->simple_query('SET AUTOCOMMIT=0'); - $this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK - return TRUE; + return $this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK } // -------------------------------------------------------------------- @@ -300,17 +287,15 @@ class CI_DB_mysql_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if ($this->simple_query('COMMIT')) { + $this->simple_query('SET AUTOCOMMIT=1'); return TRUE; } - $this->simple_query('COMMIT'); - $this->simple_query('SET AUTOCOMMIT=1'); - return TRUE; + return FALSE; } // -------------------------------------------------------------------- @@ -320,17 +305,15 @@ class CI_DB_mysql_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if ($this->simple_query('ROLLBACK')) { + $this->simple_query('SET AUTOCOMMIT=1'); return TRUE; } - $this->simple_query('ROLLBACK'); - $this->simple_query('SET AUTOCOMMIT=1'); - return TRUE; + return FALSE; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index dd3cc77c6..827470078 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -291,22 +291,10 @@ class CI_DB_mysqli_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - $this->conn_id->autocommit(FALSE); return is_php('5.5') ? $this->conn_id->begin_transaction() @@ -320,14 +308,8 @@ class CI_DB_mysqli_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - if ($this->conn_id->commit()) { $this->conn_id->autocommit(TRUE); @@ -344,14 +326,8 @@ class CI_DB_mysqli_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - if ($this->conn_id->rollback()) { $this->conn_id->autocommit(TRUE); diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index f2e40da9b..916ddeb90 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -378,27 +378,10 @@ class CI_DB_oci8_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - $this->commit_mode = is_php('5.3.2') ? OCI_NO_AUTO_COMMIT : OCI_DEFAULT; return TRUE; } @@ -410,20 +393,10 @@ class CI_DB_oci8_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - $this->commit_mode = OCI_COMMIT_ON_SUCCESS; + return oci_commit($this->conn_id); } @@ -434,14 +407,8 @@ class CI_DB_oci8_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - $this->commit_mode = OCI_COMMIT_ON_SUCCESS; return oci_rollback($this->conn_id); } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index f5d77a147..409284b44 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -143,22 +143,10 @@ class CI_DB_odbc_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - return odbc_autocommit($this->conn_id, FALSE); } @@ -169,17 +157,15 @@ class CI_DB_odbc_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if (odbc_commit($this->conn_id)) { + odbc_autocommit($this->conn_id, TRUE); return TRUE; } - $ret = odbc_commit($this->conn_id); - odbc_autocommit($this->conn_id, TRUE); - return $ret; + return FALSE; } // -------------------------------------------------------------------- @@ -189,17 +175,15 @@ class CI_DB_odbc_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) + if (odbc_rollback($this->conn_id)) { + odbc_autocommit($this->conn_id, TRUE); return TRUE; } - $ret = odbc_rollback($this->conn_id); - odbc_autocommit($this->conn_id, TRUE); - return $ret; + return FALSE; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index cc77e9568..8c5a5e7e3 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -186,22 +186,10 @@ class CI_DB_pdo_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - return $this->conn_id->beginTransaction(); } @@ -212,14 +200,8 @@ class CI_DB_pdo_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return $this->conn_id->commit(); } @@ -230,14 +212,8 @@ class CI_DB_pdo_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return $this->conn_id->rollBack(); } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 7be07c3bf..b1df326f7 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -247,22 +247,10 @@ class CI_DB_postgre_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - return (bool) pg_query($this->conn_id, 'BEGIN'); } @@ -273,14 +261,8 @@ class CI_DB_postgre_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return (bool) pg_query($this->conn_id, 'COMMIT'); } @@ -291,14 +273,8 @@ class CI_DB_postgre_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return (bool) pg_query($this->conn_id, 'ROLLBACK'); } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 9d9caa0b4..e000a8e50 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -122,24 +122,11 @@ class CI_DB_sqlite_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - - $this->simple_query('BEGIN TRANSACTION'); - return TRUE; + return $this->simple_query('BEGIN TRANSACTION'); } // -------------------------------------------------------------------- @@ -149,16 +136,9 @@ class CI_DB_sqlite_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('COMMIT'); - return TRUE; + return $this->simple_query('COMMIT'); } // -------------------------------------------------------------------- @@ -168,16 +148,9 @@ class CI_DB_sqlite_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('ROLLBACK'); - return TRUE; + return $this->simple_query('ROLLBACK'); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index 31e37de91..73e453785 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -134,22 +134,10 @@ class CI_DB_sqlite3_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - return $this->conn_id->exec('BEGIN TRANSACTION'); } @@ -160,14 +148,8 @@ class CI_DB_sqlite3_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return $this->conn_id->exec('END TRANSACTION'); } @@ -178,14 +160,8 @@ class CI_DB_sqlite3_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return $this->conn_id->exec('ROLLBACK'); } diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 1df3a4258..414669a4b 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -197,22 +197,10 @@ class CI_DB_sqlsrv_driver extends CI_DB { /** * Begin Transaction * - * @param bool $test_mode * @return bool */ - public function trans_begin($test_mode = FALSE) + protected function _trans_begin() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE); - return sqlsrv_begin_transaction($this->conn_id); } @@ -223,14 +211,8 @@ class CI_DB_sqlsrv_driver extends CI_DB { * * @return bool */ - public function trans_commit() + protected function _trans_commit() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return sqlsrv_commit($this->conn_id); } @@ -241,14 +223,8 @@ class CI_DB_sqlsrv_driver extends CI_DB { * * @return bool */ - public function trans_rollback() + protected function _trans_rollback() { - // When transactions are nested we only begin/commit/rollback the outermost ones - if ( ! $this->trans_enabled OR $this->_trans_depth > 0) - { - return TRUE; - } - return sqlsrv_rollback($this->conn_id); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 72bd9acf9..b1caf9b56 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - Database - Optimized :doc:`Database Utility ` method ``csv_from_result()`` for speed with larger result sets. + - Added proper return values to :doc:`Database Transactions ` method ``trans_start()``. Bug fixes for 3.0.3 ------------------- @@ -17,6 +18,9 @@ Bug fixes for 3.0.3 - Fixed a bug (#4170) - :doc:`Database ` method ``insert_id()`` could return an identity from the wrong scope with the 'sqlsrv' driver. - Fixed a bug (#4179) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP7. - Fixed a bug (#4173) - :doc:`Database Forge ` method ``add_key()`` didn't allow creation of non-PRIMARY composite keys after the "bugfix" for #3968. +- Fixed a bug (#4171) - :doc:`Database Transactions ` didn't work with nesting in methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()``. +- Fixed a bug where :doc:`Database Transaction ` methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()`` ignored failures. +- Fixed a bug where all :doc:`Database Transaction ` methods returned TRUE while transactions are actually disabled. Version 3.0.2 ============= diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index ea692515c..8fc26c01b 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -140,13 +140,15 @@ This article is intended to be a reference for them. .. php:method:: trans_start([$test_mode = FALSE]) :param bool $test_mode: Test mode flag - :rtype: void + :returns: TRUE on success, FALSE on failure + :rtype: bool Start a transaction. .. php:method:: trans_complete() - :rtype: void + :returns: TRUE on success, FALSE on failure + :rtype: bool Complete Transaction. -- cgit v1.2.3-24-g4f1b From 99c8ff3d03a95b1e8f589ecfc9de925d5fecedac Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Mon, 19 Oct 2015 12:54:17 -0700 Subject: rename cookie values to make codes clear Signed-off-by: Hongyi Zhang --- .../source/_themes/sphinx_rtd_theme/static/js/theme.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index bc996b710..081d77bdf 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -25,7 +25,7 @@ $(document).ready(function () { $('#closeMe').toggle( function () { - setCookie('ciNav', 'true', 365); + setCookie('ciNav', 'yes', 365); $('#nav2').show(); $('#topMenu').remove(); $('body').css({background: 'none'}); @@ -35,7 +35,7 @@ $(document).ready(function () { }, function () { - setCookie('ciNav', 'false', 365); + setCookie('ciNav', 'no', 365); $('#topMenu').remove(); $('#nav').hide(); $('#nav2').hide(); @@ -44,7 +44,7 @@ $(document).ready(function () { $('.wy-nav-side').show(); } ); - if (getCookie('ciNav') == 'true') + if (getCookie('ciNav') == 'yes') { $('#closeMe').trigger('click'); //$('#nav').slideToggle(); @@ -56,7 +56,7 @@ $(document).ready(function () { // Rufnex Cookie functions function setCookie(cname, cvalue, exdays) { // expire the old cookie if existed to avoid multiple cookies with the same name - if (getCookie(cname) != false) { + if (getCookie(cname)) { document.cookie = cname + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; } var d = new Date(); @@ -75,27 +75,27 @@ function getCookie(cname) { return c.substring(name.length, c.length); } } - return false; + return ''; } // End // resize window $(window).on('resize', function(){ // show side nav on small screens when pulldown is enabled - if (getCookie('ciNav') == 'true' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme + if (getCookie('ciNav') == 'yes' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme $('.wy-nav-side').show(); } // changing css with jquery seems to override the default css media query // change margin - else if (getCookie('ciNav') == 'false' && $(window).width() <= 768) { + else if (getCookie('ciNav') == 'no' && $(window).width() <= 768) { $('.wy-nav-content-wrap').css({'margin-left': 0}); } // hide side nav on large screens when pulldown is enabled - else if (getCookie('ciNav') == 'true' && $(window).width() > 768) { + else if (getCookie('ciNav') == 'yes' && $(window).width() > 768) { $('.wy-nav-side').hide(); } // change margin - else if (getCookie('ciNav') == 'false' && $(window).width() > 768) { + else if (getCookie('ciNav') == 'no' && $(window).width() > 768) { $('.wy-nav-content-wrap').css({'margin-left': '300px'}); } }); -- cgit v1.2.3-24-g4f1b From 29b90f7ea402b9d8227fff86e32ab13de056b6c1 Mon Sep 17 00:00:00 2001 From: "Instructor, Computer Systems Technology" Date: Wed, 21 Oct 2015 06:10:32 -0700 Subject: Merge pull request #4167 from zhanghongyi/fix-pulldown disable pulldown menu on mobile devices --- .../sphinx_rtd_theme/static/css/citheme.css | 15 +++++++++ .../_themes/sphinx_rtd_theme/static/js/theme.js | 36 +++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css index 192af2004..a2a3b3e91 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css @@ -70,4 +70,19 @@ div#pulldown-menu { font-weight: 300; font-family: Lucida Grande,Verdana,Geneva,sans-serif; color: #aaaaaa; +} + +/*hide pulldown menu on mobile devices*/ +@media (max-width: 768px) { /*tablet size defined by theme*/ + #closeMe { + display: none; + } + + #pulldown { + display: none; + } + + #openToc { + display: none; + } } \ No newline at end of file diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index b77789d06..081d77bdf 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -25,7 +25,7 @@ $(document).ready(function () { $('#closeMe').toggle( function () { - setCookie('ciNav', true, 365); + setCookie('ciNav', 'yes', 365); $('#nav2').show(); $('#topMenu').remove(); $('body').css({background: 'none'}); @@ -35,7 +35,7 @@ $(document).ready(function () { }, function () { - setCookie('ciNav', false, 365); + setCookie('ciNav', 'no', 365); $('#topMenu').remove(); $('#nav').hide(); $('#nav2').hide(); @@ -44,20 +44,25 @@ $(document).ready(function () { $('.wy-nav-side').show(); } ); - if (getCookie('ciNav') == 'true') + if (getCookie('ciNav') == 'yes') { $('#closeMe').trigger('click'); //$('#nav').slideToggle(); } // END MODIFICATION --- + }); // Rufnex Cookie functions function setCookie(cname, cvalue, exdays) { + // expire the old cookie if existed to avoid multiple cookies with the same name + if (getCookie(cname)) { + document.cookie = cname + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; + } var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toGMTString(); - document.cookie = cname + "=" + cvalue + "; " + expires; + document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/"; } function getCookie(cname) { var name = cname + "="; @@ -70,10 +75,31 @@ function getCookie(cname) { return c.substring(name.length, c.length); } } - return false; + return ''; } // End +// resize window +$(window).on('resize', function(){ + // show side nav on small screens when pulldown is enabled + if (getCookie('ciNav') == 'yes' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme + $('.wy-nav-side').show(); + } + // changing css with jquery seems to override the default css media query + // change margin + else if (getCookie('ciNav') == 'no' && $(window).width() <= 768) { + $('.wy-nav-content-wrap').css({'margin-left': 0}); + } + // hide side nav on large screens when pulldown is enabled + else if (getCookie('ciNav') == 'yes' && $(window).width() > 768) { + $('.wy-nav-side').hide(); + } + // change margin + else if (getCookie('ciNav') == 'no' && $(window).width() > 768) { + $('.wy-nav-content-wrap').css({'margin-left': '300px'}); + } +}); + window.SphinxRtdTheme = (function (jquery) { var stickyNav = (function () { var navBar, -- cgit v1.2.3-24-g4f1b From b2d2535cc0326acea4722f7be9819cf58fd155da Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 23 Oct 2015 14:11:47 +0300 Subject: [ci skip] Link HackerOne page in the readme --- readme.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.rst b/readme.rst index 640dd241b..2e35d7223 100644 --- a/readme.rst +++ b/readme.rst @@ -59,7 +59,8 @@ Resources - `Community Wiki `_ - `Community IRC `_ -Report security issues to our `Security Panel `_, thank you. +Report security issues to our `Security Panel `_ +or via our `page on HackerOne `_, thank you. *************** Acknowledgement -- cgit v1.2.3-24-g4f1b From 175b17c4b74d03a7578440d92a3ac9d80924ef78 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 23 Oct 2015 14:11:47 +0300 Subject: [ci skip] Link HackerOne page in the readme --- readme.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.rst b/readme.rst index 640dd241b..2e35d7223 100644 --- a/readme.rst +++ b/readme.rst @@ -59,7 +59,8 @@ Resources - `Community Wiki `_ - `Community IRC `_ -Report security issues to our `Security Panel `_, thank you. +Report security issues to our `Security Panel `_ +or via our `page on HackerOne `_, thank you. *************** Acknowledgement -- cgit v1.2.3-24-g4f1b From d2ea460f138fd1f9a527c9b0ece7cce369fd430b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Oct 2015 11:47:35 +0200 Subject: Fix #3201 --- system/core/Common.php | 7 ++++++- tests/codeigniter/core/Common_test.php | 5 +++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index ad3ca9f93..3ab98cf6d 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -752,7 +752,12 @@ if ( ! function_exists('html_escape')) if (is_array($var)) { - return array_map('html_escape', $var, array_fill(0, count($var), $double_encode)); + foreach (array_keys($var) as $key) + { + $var[$key] = html_escape($var[$key], $double_encode); + } + + return $var; } return htmlspecialchars($var, ENT_QUOTES, config_item('charset'), $double_encode); diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php index 999b49cb3..81a185eaf 100644 --- a/tests/codeigniter/core/Common_test.php +++ b/tests/codeigniter/core/Common_test.php @@ -47,6 +47,11 @@ class Common_test extends CI_TestCase { html_escape('Here is a string containing "quoted" text.'), 'Here is a string containing "quoted" text.' ); + + $this->assertEquals( + html_escape(array('associative' => 'and', array('multi' => 'dimentional'))), + array('associative' => 'and', array('multi' => 'dimentional')) + ); } } \ No newline at end of file diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b1caf9b56..8aaf0bfc4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -21,6 +21,7 @@ Bug fixes for 3.0.3 - Fixed a bug (#4171) - :doc:`Database Transactions ` didn't work with nesting in methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()``. - Fixed a bug where :doc:`Database Transaction ` methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()`` ignored failures. - Fixed a bug where all :doc:`Database Transaction ` methods returned TRUE while transactions are actually disabled. +- Fixed a bug (#3201) - :doc:`Common function ` :php:func:`html_escape()` modified keys of its array inputs. Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From 09a76b8f31e75bf2f7312b976731f985e12973f0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Oct 2015 11:50:08 +0200 Subject: [ci skip] Fix changelog entry from latest commit #3201 is actually another issue, the bug fixed by a62aa820bdd3e642f44428b27f2c6cde1baf4adc was just reported in the comments there. --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8aaf0bfc4..60cf4cf02 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -21,7 +21,7 @@ Bug fixes for 3.0.3 - Fixed a bug (#4171) - :doc:`Database Transactions ` didn't work with nesting in methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()``. - Fixed a bug where :doc:`Database Transaction ` methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()`` ignored failures. - Fixed a bug where all :doc:`Database Transaction ` methods returned TRUE while transactions are actually disabled. -- Fixed a bug (#3201) - :doc:`Common function ` :php:func:`html_escape()` modified keys of its array inputs. +- Fixed a bug where :doc:`common function ` :php:func:`html_escape()` modified keys of its array inputs. Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From 3368cebeb6682013c44be7a03d3b3dac0f5c8973 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Oct 2015 12:25:15 +0200 Subject: Fix #4192 --- system/libraries/Email.php | 13 ++++++++----- user_guide_src/source/changelog.rst | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index acf3629c3..ebff7567a 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1563,11 +1563,10 @@ class CI_Email { if ($this->charset === 'UTF-8') { - if (MB_ENABLED === TRUE) - { - return mb_encode_mimeheader($str, $this->charset, 'Q', $this->crlf); - } - elseif (ICONV_ENABLED === TRUE) + // Note: We used to have mb_encode_mimeheader() as the first choice + // here, but it turned out to be buggy and unreliable. DO NOT + // re-add it! -- Narf + if (ICONV_ENABLED === TRUE) { $output = @iconv_mime_encode('', $str, array( @@ -1590,6 +1589,10 @@ class CI_Email { $chars = iconv_strlen($str, 'UTF-8'); } + elseif (MB_ENABLED === TRUE) + { + $chars = mb_strlen($str, 'UTF-8'); + } } // We might already have this set for UTF-8 diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 60cf4cf02..f9f451d98 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.0.3 - Fixed a bug where :doc:`Database Transaction ` methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()`` ignored failures. - Fixed a bug where all :doc:`Database Transaction ` methods returned TRUE while transactions are actually disabled. - Fixed a bug where :doc:`common function ` :php:func:`html_escape()` modified keys of its array inputs. +- Fixed a bug (#4192) - :doc:`Email Library ` wouldn't always have proper Quoted-printable encoding due to a bug in PHP's own ``mb_mime_encodeheader()`` function. Version 3.0.2 ============= -- cgit v1.2.3-24-g4f1b From 71b1b3f5b2dcc0f4b652e9494e9853b82541ac8c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 27 Oct 2015 12:30:18 +0200 Subject: Harden xss_clean() --- system/core/Security.php | 66 +++++++++++++++++++------------- tests/codeigniter/core/Security_test.php | 35 +++++++++-------- 2 files changed, 59 insertions(+), 42 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index ab85e2239..36dea4cf2 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -803,43 +803,55 @@ class CI_Security { // For other tags, see if their attributes are "evil" and strip those elseif (isset($matches['attributes'])) { - // We'll need to catch all attributes separately first - $pattern = '#' - .'([\s\042\047/=]*)' // non-attribute characters, excluding > (tag close) for obvious reasons + // We'll store the already fitlered attributes here + $attributes = array(); + + // Attribute-catching pattern + $attributes_pattern = '#' .'(?[^\s\042\047>/=]+)' // attribute characters // optional attribute-value .'(?:\s*=(?[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*)))' // attribute-value separator .'#i'; - if ($count = preg_match_all($pattern, $matches['attributes'], $attributes, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) + // Blacklist pattern for evil attribute names + $is_evil_pattern = '#^('.implode('|', $evil_attributes).')$#i'; + + // Each iteration filters a single attribute + do { - // Since we'll be using substr_replace() below, we - // need to handle the attributes in reverse order, - // so we don't damage the string. - for ($i = $count - 1; $i > -1; $i--) + // Strip any non-alpha characters that may preceed an attribute. + // Browsers often parse these incorrectly and that has been a + // of numerous XSS issues we've had. + $matches['attributes'] = preg_replace('#^[^a-z]+#i', '', $matches['attributes']); + + if ( ! preg_match($attributes_pattern, $matches['attributes'], $attribute, PREG_OFFSET_CAPTURE)) { - if ( - // Is it indeed an "evil" attribute? - preg_match('#^('.implode('|', $evil_attributes).')$#i', $attributes[$i]['name'][0]) - // Or an attribute not starting with a letter? Some parsers get confused by that - OR ! ctype_alpha($attributes[$i]['name'][0][0]) - // Does it have an equals sign, but no value and not quoted? Strip that too! - OR (trim($attributes[$i]['value'][0]) === '') - ) - { - $matches['attributes'] = substr_replace( - $matches['attributes'], - ' [removed]', - $attributes[$i][0][1], - strlen($attributes[$i][0][0]) - ); - } + // No (valid) attribute found? Discard everything else inside the tag + break; } - // Note: This will strip some non-space characters and/or - // reduce multiple spaces between attributes. - return '<'.$matches['slash'].$matches['tagName'].' '.trim($matches['attributes']).'>'; + if ( + // Is it indeed an "evil" attribute? + preg_match($is_evil_pattern, $attribute['name'][0]) + // Or does it have an equals sign, but no value and not quoted? Strip that too! + OR (trim($attribute['value'][0]) === '') + ) + { + $attributes[] = 'xss=removed'; + } + else + { + $attributes[] = $attribute[0][0]; + } + + $matches['attributes'] = substr($matches['attributes'], $attribute[0][1] + strlen($attribute[0][0])); } + while ($matches['attributes'] !== ''); + + $attributes = empty($attributes) + ? '' + : ' '.implode(' ', $attributes); + return '<'.$matches['slash'].$matches['tagName'].$attributes.'>'; } return $matches[0]; diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 52967dc2f..2ef822863 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -115,7 +115,7 @@ class Security_test extends CI_TestCase { public function test_xss_clean_entity_double_encoded() { $input = 'Clickhere'; - $this->assertEquals('Clickhere', $this->security->xss_clean($input)); + $this->assertEquals('Clickhere', $this->security->xss_clean($input)); } // -------------------------------------------------------------------- @@ -134,7 +134,7 @@ class Security_test extends CI_TestCase { public function test_xss_clean_js_img_removal() { $input = 'Clickhere'; - $this->assertEquals('', $this->security->xss_clean($input)); + $this->assertEquals('', $this->security->xss_clean($input)); } // -------------------------------------------------------------------- @@ -146,7 +146,7 @@ class Security_test extends CI_TestCase { $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals( - ' src="x">', + ' src="x">', $this->security->xss_clean(' src="x">') ); @@ -160,21 +160,21 @@ class Security_test extends CI_TestCase { public function test_xss_clean_sanitize_naughty_html_attributes() { - $this->assertEquals('', $this->security->xss_clean('')); - $this->assertEquals('', $this->security->xss_clean('')); - $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals('onOutsideOfTag=test', $this->security->xss_clean('onOutsideOfTag=test')); $this->assertEquals('onNoTagAtAll = true', $this->security->xss_clean('onNoTagAtAll = true')); - $this->assertEquals('', $this->security->xss_clean('')); - $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); + $this->assertEquals('', $this->security->xss_clean('')); $this->assertEquals( - '\' [removed]>', + '\' xss=removed>', $this->security->xss_clean('\' onAfterGreaterThan="quotes">') ); $this->assertEquals( - '\' [removed]>', + '\' xss=removed>', $this->security->xss_clean('\' onAfterGreaterThan=noQuotes>') ); @@ -194,7 +194,7 @@ class Security_test extends CI_TestCase { ); $this->assertEquals( - '', + '', $this->security->xss_clean('') ); @@ -204,19 +204,24 @@ class Security_test extends CI_TestCase { ); $this->assertEquals( - '', + '', $this->security->xss_clean('') ); $this->assertEquals( - '', + '', $this->security->xss_clean('') ); $this->assertEquals( - '1">', + '1">', $this->security->xss_clean('') ); + + $this->assertEquals( + '', + $this->security->xss_clean('') + ); } // -------------------------------------------------------------------- @@ -228,7 +233,7 @@ class Security_test extends CI_TestCase { public function test_naughty_html_plus_evil_attributes() { $this->assertEquals( - '<svg', + '<svg', $this->security->xss_clean(' src="x" onerror="location=/javascript/.source+/:alert/.source+/(1)/.source">') ); } -- cgit v1.2.3-24-g4f1b From 0a6b0661305f20ac1fbd219d43f59193bea90d1d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 26 Oct 2015 15:31:38 +0200 Subject: Prevent Host header injections --- application/config/config.php | 14 +++++++--- system/core/Config.php | 6 ++--- tests/codeigniter/core/Config_test.php | 47 ++++++++++++---------------------- 3 files changed, 29 insertions(+), 38 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index 479d591a4..4f8f81406 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -11,10 +11,16 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | | http://example.com/ | -| If this is not set then CodeIgniter will try guess the protocol, domain -| and path to your installation. However, you should always configure this -| explicitly and never rely on auto-guessing, especially in production -| environments. +| WARNING: You MUST set this value! +| +| If it is not set, then CodeIgniter will try guess the protocol and path +| your installation, but due to security concerns the hostname will be set +| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise. +| The auto-detection mechanism exists only for convenience during +| development and MUST NOT be used in production! +| +| If you need to allow multiple domains, remember that this file is still +| a PHP script and you can easily do that on your own. | */ $config['base_url'] = ''; diff --git a/system/core/Config.php b/system/core/Config.php index feea7c85a..0264776f9 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -88,11 +88,9 @@ class CI_Config { // Set the base_url automatically if none was provided if (empty($this->config['base_url'])) { - // The regular expression is only a basic validation for a valid "Host" header. - // It's not exhaustive, only checks for valid characters. - if (isset($_SERVER['HTTP_HOST']) && preg_match('/^((\[[0-9a-f:]+\])|(\d{1,3}(\.\d{1,3}){3})|[a-z0-9\-\.]+)(:\d+)?$/i', $_SERVER['HTTP_HOST'])) + if (isset($_SERVER['SERVER_ADDR'])) { - $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'] + $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['SERVER_ADDR'] .substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); } else diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php index f125fc6e9..26a5f32f5 100644 --- a/tests/codeigniter/core/Config_test.php +++ b/tests/codeigniter/core/Config_test.php @@ -79,46 +79,33 @@ class Config_test extends CI_TestCase { $old_script_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : NULL; $old_script_filename = $_SERVER['SCRIPT_FILENAME']; $old_https = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : NULL; + $old_server_addr = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : NULL; - // Setup server vars for detection - $host = 'test.com'; - $path = '/'; - $script = 'base_test.php'; - $_SERVER['HTTP_HOST'] = $host; - $_SERVER['SCRIPT_NAME'] = $path.$script; - $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/'.$script; - - // Rerun constructor + // The 'Host' header is user input and must not be trusted + $_SERVER['HTTP_HOST'] = 'test.com'; $this->config = new $cls; + $this->assertEquals('http://localhost/', $this->config->base_url()); - // Test plain detected (root) - $this->assertEquals('http://'.$host.$path, $this->config->base_url()); - - // Rerun constructor - $path = '/path/'; - $_SERVER['SCRIPT_NAME'] = $path.$script; - $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/'.$path.$script; + // However, we may fallback to the server's IP address + $_SERVER['SERVER_ADDR'] = '127.0.0.1'; + $_SERVER['SCRIPT_NAME'] = '/base_test.php'; + $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/base_test.php'; $this->config = new $cls; + $this->assertEquals('http://127.0.0.1/', $this->config->base_url()); - // Test plain detected (subfolder) - $this->assertEquals('http://'.$host.$path, $this->config->base_url()); - - // Rerun constructor + // Making sure that HTTPS and URI path are also detected $_SERVER['HTTPS'] = 'on'; + $_SERVER['SCRIPT_NAME'] = '/path/base_test.php'; + $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/path/base_test.php'; $this->config = new $cls; - - // Test secure detected - $this->assertEquals('https://'.$host.$path, $this->config->base_url()); + $this->assertEquals('https://127.0.0.1/path/', $this->config->base_url()); // Restore server vars - if ($old_host === NULL) unset($_SERVER['HTTP_HOST']); - else $_SERVER['HTTP_HOST'] = $old_host; - if ($old_script_name === NULL) unset($_SERVER['SCRIPT_NAME']); - else $_SERVER['SCRIPT_NAME'] = $old_script_name; - if ($old_https === NULL) unset($_SERVER['HTTPS']); - else $_SERVER['HTTPS'] = $old_https; - + $_SERVER['HTTP_HOST'] = $old_host; + $_SERVER['SCRIPT_NAME'] = $old_script_name; $_SERVER['SCRIPT_FILENAME'] = $old_script_filename; + $_SERVER['HTTPS'] = $old_https; + $_SERVER['SERVER_ADDR'] = $old_server_addr; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From f8deea583f0cb68a83a44d361c0db3c86f387f95 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 23 Oct 2015 13:49:21 +0300 Subject: Use proper randomness when generating CAPTCHAs --- system/helpers/captcha_helper.php | 89 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 201987ac8..85bcfb5a0 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -125,9 +125,94 @@ if ( ! function_exists('create_captcha')) if (empty($word)) { $word = ''; - for ($i = 0, $mt_rand_max = strlen($pool) - 1; $i < $word_length; $i++) + $pool_length = strlen($pool); + $rand_max = $pool_length - 1; + + // PHP7 or a suitable polyfill + if (function_exists('random_int')) + { + try + { + for ($i = 0; $i < $word_length; $i++) + { + $word .= $pool[random_int(0, $rand_max)]; + } + } + catch (Exception $e) + { + // This means fallback to the next possible + // alternative to random_int() + $word = ''; + } + } + } + + if (empty($word)) + { + // Nobody will have a larger character pool than + // 256 characters, but let's handle it just in case ... + // + // No, I do not care that the fallback to mt_rand() can + // handle it; if you trigger this, you're very obviously + // trying to break it. -- Narf + if ($pool_length > 256) + { + return FALSE; + } + + // We'll try using the operating system's PRNG first, + // which we can access through CI_Security::get_random_bytes() + $security = get_instance()->security; + + // To avoid numerous get_random_bytes() calls, we'll + // just try fetching as much bytes as we need at once. + if (($bytes = $security->get_random_bytes($pool_length)) !== FALSE) + { + $byte_index = $word_index = 0; + while ($word_index < $word_length) + { + if (($rand_index = unpack('C', $bytes[$byte_index++])) > $rand_max) + { + // Was this the last byte we have? + // If so, try to fetch more. + if ($byte_index === $pool_length) + { + // No failures should be possible if + // the first get_random_bytes() call + // didn't return FALSE, but still ... + for ($i = 0; $i < 5; $i++) + { + if (($bytes = $security->get_random_bytes($pool_length)) === FALSE) + { + continue; + } + + $byte_index = 0; + break; + } + + if ($bytes === FALSE) + { + // Sadly, this means fallback to mt_rand() + $word = ''; + break; + } + } + + continue; + } + + $word .= $pool[$rand_index]; + $word_index++; + } + } + } + + if (empty($word)) + { + for ($i = 0; $i < $word_length; $i++) { - $word .= $pool[mt_rand(0, $mt_rand_max)]; + $word .= $pool[mt_rand(0, $rand_max)]; } } elseif ( ! is_string($word)) -- cgit v1.2.3-24-g4f1b From 0abc55a22535586929fb146a81d1cee68dbccd10 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 31 Oct 2015 19:30:41 +0200 Subject: [ci skip] Update changelog, version & upgrade instructions --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 8 +++- user_guide_src/source/conf.py | 4 +- user_guide_src/source/installation/upgrade_300.rst | 45 +++++++++++++++++++++- user_guide_src/source/installation/upgrade_303.rst | 43 ++++++++++++++++++++- 5 files changed, 96 insertions(+), 6 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 8cea813a2..5080dc6d1 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.3-dev'); + define('CI_VERSION', '3.0.3'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f9f451d98..d67ae4e8c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,13 @@ Change Log Version 3.0.3 ============= -Release Date: Not Released +Release Date: October 31, 2015 + +- **Security** + + - Fixed an XSS attack vector in :doc:`Security Library ` method ``xss_clean()``. + - Changed :doc:`Config Library ` method ``base_url()`` to fallback to ``$_SERVER['SERVER_ADDR']`` when ``$config['base_url']`` is empty in order to avoid *Host* header injections. + - Changed :doc:`CAPTCHA Helper ` to use the operating system's PRNG when possible. - Database diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 46e033ec8..031f95e2d 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.3-dev' +version = '3.0.3' # The full version, including alpha/beta/rc tags. -release = '3.0.3-dev' +release = '3.0.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 4b3b408a7..a29f400f8 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -464,8 +464,51 @@ files and error messages format: Therefore you're encouraged to update its usage sooner rather than later. +************************************************************ +Step 19: Make sure your 'base_url' config value is not empty +************************************************************ + +When ``$config['base_url']`` is not set, CodeIgniter tries to automatically +detect what your website's base URL is. This is done purely for convenience +when you are starting development of a new application. + +Auto-detection is never reliable and also has security implications, which +is why you should **always** have it manually configured! + +One of the changes in CodeIgniter 3.0.3 is how this auto-detection works, +and more specifically it now falls back to the server's IP address instead +of the hostname requested by the client. Therefore, if you've ever relied +on auto-detection, it will change how your website works now. + +In case you need to allow e.g. multiple domains, or both http:// and +https:// prefixes to be dynamically used depending on the request, +remember that *application/config/config.php* is still a PHP script, in +which you can create this logic with a few lines of code. For example:: + + $allowed_domains = array('domain1.tld', 'domain2.tld'); + $default_domain = 'domain1.tld'; + + if (in_array($_SERVER['HTTP_HOST'], $allowed_domains, TRUE)) + { + $domain = $_SERVER['HTTP_HOST']; + } + else + { + $domain = $default_domain; + } + + if ( ! empty($_SERVER['HTTPS'])) + { + $config['base_url'] = 'https://'.$domain; + } + else + { + $config['base_url'] = 'http://'.$domain; + } + + **************************************************************** -Step 19: Remove usage of (previously) deprecated functionalities +Step 20: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a diff --git a/user_guide_src/source/installation/upgrade_303.rst b/user_guide_src/source/installation/upgrade_303.rst index a98eed0d4..d13a0fe46 100644 --- a/user_guide_src/source/installation/upgrade_303.rst +++ b/user_guide_src/source/installation/upgrade_303.rst @@ -11,4 +11,45 @@ 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. \ No newline at end of file + please make copies of them first. + +Step 2: Make sure your 'base_url' config value is not empty +=========================================================== + +When ``$config['base_url']`` is not set, CodeIgniter tries to automatically +detect what your website's base URL is. This is done purely for convenience +when you are starting development of a new application. + +Auto-detection is never reliable and also has security implications, which +is why you should **always** have it manually configured! + +One of the changes in CodeIgniter 3.0.3 is how this auto-detection works, +and more specifically it now falls back to the server's IP address instead +of the hostname requested by the client. Therefore, if you've ever relied +on auto-detection, it will change how your website works now. + +In case you need to allow e.g. multiple domains, or both http:// and +https:// prefixes to be dynamically used depending on the request, +remember that *application/config/config.php* is still a PHP script, in +which you can create this logic with a few lines of code. For example:: + + $allowed_domains = array('domain1.tld', 'domain2.tld'); + $default_domain = 'domain1.tld'; + + if (in_array($_SERVER['HTTP_HOST'], $allowed_domains, TRUE)) + { + $domain = $_SERVER['HTTP_HOST']; + } + else + { + $domain = $default_domain; + } + + if ( ! empty($_SERVER['HTTPS'])) + { + $config['base_url'] = 'https://'.$domain; + } + else + { + $config['base_url'] = 'http://'.$domain; + } -- cgit v1.2.3-24-g4f1b From 2cef9ba1fbd67ae423333f824a89ef0c77667224 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 31 Oct 2015 19:33:53 +0200 Subject: [ci skip] Update download link --- user_guide_src/source/installation/downloads.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 1249d14ec..0f21453b4 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.0.3-dev (Current version) `_ +- `CodeIgniter v3.0.3 (Current version) `_ - `CodeIgniter v3.0.2 `_ - `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ -- cgit v1.2.3-24-g4f1b From ab3c383fb3535e55253271f210870cd9361d94c9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Nov 2015 15:40:55 +0200 Subject: [ci skip] Start of 3.0.4 development --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_304.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_304.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 5080dc6d1..79a23c4ca 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.3'); + define('CI_VERSION', '3.0.4-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 031f95e2d..a1ebb5205 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2015, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.0.3' +version = '3.0.4-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.3' +release = '3.0.4-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 0f21453b4..00c98ab23 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.0.3 (Current version) `_ +- `CodeIgniter v3.0.4-dev (Current version) `_ +- `CodeIgniter v3.0.3 `_ - `CodeIgniter v3.0.2 `_ - `CodeIgniter v3.0.1 `_ - `CodeIgniter v3.0.0 `_ diff --git a/user_guide_src/source/installation/upgrade_304.rst b/user_guide_src/source/installation/upgrade_304.rst new file mode 100644 index 000000000..4d5bd2bb0 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_304.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.3 to 3.0.4 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 010d1633e..dd777346d 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.0.3 to 3.0.4 Upgrading from 3.0.2 to 3.0.3 Upgrading from 3.0.1 to 3.0.2 Upgrading from 3.0.0 to 3.0.1 -- cgit v1.2.3-24-g4f1b From 6afbb3a9f186f912d5105aea704bb58c55931762 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Nov 2015 15:50:31 +0200 Subject: [ci skip] Add 3.0.4 to changelog as well --- user_guide_src/source/changelog.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d67ae4e8c..20d85a9ab 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,11 @@ Change Log ########## +Version 3.0.4 +============= + +Release Date: Not Released + Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 939f1a27f3e70170326f6acbc50c0e1c96e52fd3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Nov 2015 15:52:16 +0200 Subject: Fix #4212 --- system/database/DB_query_builder.php | 2 +- user_guide_src/source/changelog.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index cf1100d27..7a3d2f594 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1379,7 +1379,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->from($table); } - $result = ($this->qb_distinct === TRUE) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_orderby)) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 20d85a9ab..f632f72dd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,11 @@ Version 3.0.4 Release Date: Not Released +Bug fixes for 3.0.4 +------------------- + +- Fixed a bug (#4212) - :doc:`Query Builder ` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used. + Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From a9f7e8cfb16b53394a5f77393e4ab3e93ef9001e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Nov 2015 15:50:31 +0200 Subject: [ci skip] Add 3.0.4 to changelog as well --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f28fd8930..77ccd7ce7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.0 Release Date: Not Released +Version 3.0.4 +============= + +Release Date: Not Released Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 0139e6a4a99cbe9b0cc06f394fa12d5691193b72 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Nov 2015 22:42:17 +0200 Subject: [ci skip] Fix a false default-fallback bug in set_checkbox(), set_radio() Relevant: #4210 --- system/helpers/form_helper.php | 41 +++++++++++++++++++++++++++++-------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index fd807769a..37dafd913 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -769,12 +769,11 @@ if ( ! function_exists('set_checkbox')) { return $CI->form_validation->set_checkbox($field, $value, $default); } - elseif (($input = $CI->input->post($field, FALSE)) === NULL) - { - return ($default === TRUE) ? ' checked="checked"' : ''; - } + // Form inputs are always strings ... $value = (string) $value; + $input = $CI->input->post($field, FALSE); + if (is_array($input)) { // Note: in_array('', array(0)) returns TRUE, do not use it @@ -789,7 +788,13 @@ if ( ! function_exists('set_checkbox')) return ''; } - return ($input === $value) ? ' checked="checked"' : ''; + // Unchecked checkbox and radio inputs are not even submitted by browsers ... + if ($CI->input->method() === 'post') + { + return ($input === 'value') ? ' checked="checked"' : ''; + } + + return ($default === TRUE) ? ' checked="checked"' : ''; } } @@ -816,12 +821,32 @@ if ( ! function_exists('set_radio')) { return $CI->form_validation->set_radio($field, $value, $default); } - elseif (($input = $CI->input->post($field, FALSE)) === NULL) + + // Form inputs are always strings ... + $value = (string) $value; + $input = $CI->input->post($field, FALSE); + + if (is_array($input)) + { + // Note: in_array('', array(0)) returns TRUE, do not use it + foreach ($input as &$v) + { + if ($value === $v) + { + return ' checked="checked"'; + } + } + + return ''; + } + + // Unchecked checkbox and radio inputs are not even submitted by browsers ... + if ($CI->input->method() === 'post') { - return ($default === TRUE) ? ' checked="checked"' : ''; + return ($input === 'value') ? ' checked="checked"' : ''; } - return ($input === (string) $value) ? ' checked="checked"' : ''; + return ($default === TRUE) ? ' checked="checked"' : ''; } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f632f72dd..2b0f51bee 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Bug fixes for 3.0.4 ------------------- - Fixed a bug (#4212) - :doc:`Query Builder ` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used. +- Fixed a bug where :doc:`Form Helper ` functions `set_checkbox()`, `set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 845ed89709f84d56edeeb91e877f585a5798006d Mon Sep 17 00:00:00 2001 From: Nate Silva Date: Thu, 5 Nov 2015 13:43:53 -0800 Subject: Build base_url correctly if SERVER_ADDR is IPv6 --- system/core/Config.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/system/core/Config.php b/system/core/Config.php index 0264776f9..dfef8dbe4 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -90,7 +90,15 @@ class CI_Config { { if (isset($_SERVER['SERVER_ADDR'])) { - $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['SERVER_ADDR'] + if ((bool) filter_var($_SERVER['SERVER_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $server_addr = '[' . $_SERVER['SERVER_ADDR'] . ']'; + } + else + { + $server_addr = $_SERVER['SERVER_ADDR']; + } + $base_url = (is_https() ? 'https' : 'http').'://'.$server_addr .substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); } else -- cgit v1.2.3-24-g4f1b From 76d5f881ecd0c70759cbebc9c5c622ef7d716aa8 Mon Sep 17 00:00:00 2001 From: Rafael Schwemmer Date: Thu, 5 Nov 2015 22:49:17 +0100 Subject: Added MIME types for JPEG2000 Added all MIME types and file extensions to support JPEG2000 images as allowed file type. --- application/config/mimes.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/config/mimes.php b/application/config/mimes.php index 8eff4d2d5..a9b82008f 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -78,6 +78,14 @@ return array( 'jpeg' => array('image/jpeg', 'image/pjpeg'), 'jpg' => array('image/jpeg', 'image/pjpeg'), 'jpe' => array('image/jpeg', 'image/pjpeg'), + 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 'png' => array('image/png', 'image/x-png'), 'tiff' => 'image/tiff', 'tif' => 'image/tiff', -- cgit v1.2.3-24-g4f1b From 871811e81af949c52604eb1df8394c0071dba10c Mon Sep 17 00:00:00 2001 From: Rafael Schwemmer Date: Fri, 6 Nov 2015 10:22:00 +0100 Subject: Fixed white-space for JPEG2000 MIME types Replaced spaces by tabs to be consistent with rest of the code --- application/config/mimes.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index a9b82008f..5e43773a8 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -78,14 +78,14 @@ return array( 'jpeg' => array('image/jpeg', 'image/pjpeg'), 'jpg' => array('image/jpeg', 'image/pjpeg'), 'jpe' => array('image/jpeg', 'image/pjpeg'), - 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), - 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 'png' => array('image/png', 'image/x-png'), 'tiff' => 'image/tiff', 'tif' => 'image/tiff', -- cgit v1.2.3-24-g4f1b From ac66cab946334f76dac699dd67d25225e9b3548c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 6 Nov 2015 16:04:33 +0200 Subject: Merge pull request #4218 from schwemmer/develop [ci skip] Added MIME types for JPEG2000 --- application/config/mimes.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/config/mimes.php b/application/config/mimes.php index 1f591ba6b..aa3b1836a 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -77,6 +77,14 @@ return array( 'jpeg' => array('image/jpeg', 'image/pjpeg'), 'jpg' => array('image/jpeg', 'image/pjpeg'), 'jpe' => array('image/jpeg', 'image/pjpeg'), + 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), 'png' => array('image/png', 'image/x-png'), 'tiff' => 'image/tiff', 'tif' => 'image/tiff', -- cgit v1.2.3-24-g4f1b From 4ccf88dc97d009e3421b79c351e426d31fc11b41 Mon Sep 17 00:00:00 2001 From: Nate Silva Date: Fri, 6 Nov 2015 07:06:28 -0800 Subject: Simpler way to detect an IPv6 address (strpos) --- system/core/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Config.php b/system/core/Config.php index dfef8dbe4..87ed32aca 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -90,7 +90,7 @@ class CI_Config { { if (isset($_SERVER['SERVER_ADDR'])) { - if ((bool) filter_var($_SERVER['SERVER_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE) { $server_addr = '[' . $_SERVER['SERVER_ADDR'] . ']'; } -- cgit v1.2.3-24-g4f1b From e735b1dfe14d1d6d955d142a30e8c83ba900fe2b Mon Sep 17 00:00:00 2001 From: Nate Silva Date: Fri, 6 Nov 2015 07:07:11 -0800 Subject: Tweak to match CI coding style --- system/core/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Config.php b/system/core/Config.php index 87ed32aca..1d2a0d155 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -92,7 +92,7 @@ class CI_Config { { if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE) { - $server_addr = '[' . $_SERVER['SERVER_ADDR'] . ']'; + $server_addr = '['.$_SERVER['SERVER_ADDR'].']'; } else { -- cgit v1.2.3-24-g4f1b From ae480daecb0f7aeed017c5cc5a67cc39b90be570 Mon Sep 17 00:00:00 2001 From: Nate Silva Date: Fri, 6 Nov 2015 07:10:44 -0800 Subject: Minor formatting: add empty line after else close --- system/core/Config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/core/Config.php b/system/core/Config.php index 1d2a0d155..c507f342c 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -98,6 +98,7 @@ class CI_Config { { $server_addr = $_SERVER['SERVER_ADDR']; } + $base_url = (is_https() ? 'https' : 'http').'://'.$server_addr .substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); } -- cgit v1.2.3-24-g4f1b From dd11297837f50ea2fd37f891cb8b4408f84f53e0 Mon Sep 17 00:00:00 2001 From: Steffen Stollfuß Date: Sun, 8 Nov 2015 20:52:25 +0100 Subject: CI_DB_driver->simple_query() discard return of CI_DB_driver->initialize() when db_debug = FALSE #4223 --- system/database/DB_driver.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 0ea679432..6797df0f8 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -774,7 +774,10 @@ abstract class CI_DB_driver { { if ( ! $this->conn_id) { - $this->initialize(); + if( !$this->initialize() ) + { + return FALSE; + } } return $this->_execute($sql); -- cgit v1.2.3-24-g4f1b From 20edad807645a42df7f4b0baa6e6a2eb29bd2b0c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Nov 2015 10:56:30 +0200 Subject: Merge pull request #4217 from natesilva/fix-ipv6-base_url Build base_url correctly if SERVER_ADDR is IPv6 --- system/core/Config.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/core/Config.php b/system/core/Config.php index 0264776f9..c507f342c 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -90,7 +90,16 @@ class CI_Config { { if (isset($_SERVER['SERVER_ADDR'])) { - $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['SERVER_ADDR'] + if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE) + { + $server_addr = '['.$_SERVER['SERVER_ADDR'].']'; + } + else + { + $server_addr = $_SERVER['SERVER_ADDR']; + } + + $base_url = (is_https() ? 'https' : 'http').'://'.$server_addr .substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); } else -- cgit v1.2.3-24-g4f1b From 4cda80715966ddb28815b69b6e67ec79b10d3d31 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Nov 2015 11:00:32 +0200 Subject: [ci skip] Add changelog entry for PR #4217 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2b0f51bee..cb955e833 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,6 +12,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4212) - :doc:`Query Builder ` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used. - Fixed a bug where :doc:`Form Helper ` functions `set_checkbox()`, `set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". +- Fixed a bug (#4217) - :doc:`Config Library ` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 06381b6307aa23f5e0fbe6669df0695d712ce69a Mon Sep 17 00:00:00 2001 From: Steffen Stollfuß Date: Mon, 9 Nov 2015 10:15:29 +0100 Subject: Fixed PHP code style * fixed PHP code style --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 6797df0f8..88b41fa5e 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -774,7 +774,7 @@ abstract class CI_DB_driver { { if ( ! $this->conn_id) { - if( !$this->initialize() ) + if( ! $this->initialize()) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 2fe1a2389aa13c3acde7fb42ab35e79504e89f75 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Nov 2015 11:24:19 +0200 Subject: [ci skip] Fix an infinite loop in captcha helper --- system/helpers/captcha_helper.php | 3 ++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 85bcfb5a0..03c1dd852 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -171,7 +171,8 @@ if ( ! function_exists('create_captcha')) $byte_index = $word_index = 0; while ($word_index < $word_length) { - if (($rand_index = unpack('C', $bytes[$byte_index++])) > $rand_max) + list(, $rand_index) = unpack('C', $bytes[$byte_index++]); + if ($rand_index > $rand_max) { // Was this the last byte we have? // If so, try to fetch more. diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cb955e833..cdde4fa94 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4212) - :doc:`Query Builder ` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used. - Fixed a bug where :doc:`Form Helper ` functions `set_checkbox()`, `set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". - Fixed a bug (#4217) - :doc:`Config Library ` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``. +- Fixed a bug where :doc:`CAPTCHA Helper ` entered an infinite loop while generating a random string. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From b880069aa8521291ebedc57d5c229bc6f72e0426 Mon Sep 17 00:00:00 2001 From: Hongyi Zhang Date: Mon, 9 Nov 2015 02:24:27 -0800 Subject: modify and add test cases for Loader class to test more exceptions Signed-off-by: Hongyi Zhang --- tests/codeigniter/core/Loader_test.php | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index 889ab92e4..db5088d80 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -48,11 +48,9 @@ class Loader_test extends CI_TestCase { // Test a string given to params $this->assertInstanceOf('CI_Loader', $this->load->library($lib, ' ')); - // Create library w/o class - $lib = 'bad_test_lib'; - $this->ci_vfs_create($lib, '', $this->ci_base_root, 'libraries'); + // test non existent lib + $lib = 'non_existent_test_lib'; - // Test non-existent class $this->setExpectedException( 'RuntimeException', 'CI Error: Unable to load the requested class: '.ucfirst($lib) @@ -62,6 +60,19 @@ class Loader_test extends CI_TestCase { // -------------------------------------------------------------------- + public function test_bad_library() + { + $lib = 'bad_test_lib'; + $this->ci_vfs_create(ucfirst($lib), '', $this->ci_app_root, 'libraries'); + $this->setExpectedException( + 'RuntimeException', + 'CI Error: Non-existent class: '.ucfirst($lib) + ); + $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); + } + + // -------------------------------------------------------------------- + public function test_library_extension() { // Create library and extension in VFS @@ -131,6 +142,16 @@ class Loader_test extends CI_TestCase { // Test is_loaded $this->assertEquals($obj, $this->load->is_loaded(ucfirst($lib))); + + // Test to load another class with the same object name + $lib = 'another_test_lib'; + $class = ucfirst($lib); + $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, 'libraries'); + $this->setExpectedException( + 'RuntimeException', + "CI Error: Resource '".$obj."' already exists and is not a ".$class." instance." + ); + $this->load->library($lib, NULL, $obj); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From cebb13b988e0e4d352d90170e064d1affbcf1697 Mon Sep 17 00:00:00 2001 From: Steffen Stollfuß Date: Mon, 9 Nov 2015 12:26:04 +0100 Subject: Fixed PHP code style part 2 * added missing space character --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 88b41fa5e..25e70ec3f 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -774,7 +774,7 @@ abstract class CI_DB_driver { { if ( ! $this->conn_id) { - if( ! $this->initialize()) + if ( ! $this->initialize()) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 39105007580edc46bffe8f628e6bef91a9f4dd04 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Nov 2015 14:05:02 +0200 Subject: Merge pull request #4223 from j0inty/develop CI_DB_driver->simple_query() to check initialize() return value --- system/database/DB_driver.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 0ea679432..25e70ec3f 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -774,7 +774,10 @@ abstract class CI_DB_driver { { if ( ! $this->conn_id) { - $this->initialize(); + if ( ! $this->initialize()) + { + return FALSE; + } } return $this->_execute($sql); -- cgit v1.2.3-24-g4f1b From 3462f570526178d6dba6d6e0135bd783dcd3299f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Nov 2015 14:07:51 +0200 Subject: [ci skip] Add changelog entry for PR #4223 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cdde4fa94..efb09f24f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Bug fixes for 3.0.4 - Fixed a bug where :doc:`Form Helper ` functions `set_checkbox()`, `set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". - Fixed a bug (#4217) - :doc:`Config Library ` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``. - Fixed a bug where :doc:`CAPTCHA Helper ` entered an infinite loop while generating a random string. +- Fixed a bug (#4223) - :doc:`Database ` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From fe4c76e77bc9640872d34a874780031cf90dd2bd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Nov 2015 12:55:07 +0200 Subject: Merge pull request #4225 from zhanghongyi/loader-test Improve Loader test cases for libraries --- tests/codeigniter/core/Loader_test.php | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index 889ab92e4..db5088d80 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -48,11 +48,9 @@ class Loader_test extends CI_TestCase { // Test a string given to params $this->assertInstanceOf('CI_Loader', $this->load->library($lib, ' ')); - // Create library w/o class - $lib = 'bad_test_lib'; - $this->ci_vfs_create($lib, '', $this->ci_base_root, 'libraries'); + // test non existent lib + $lib = 'non_existent_test_lib'; - // Test non-existent class $this->setExpectedException( 'RuntimeException', 'CI Error: Unable to load the requested class: '.ucfirst($lib) @@ -62,6 +60,19 @@ class Loader_test extends CI_TestCase { // -------------------------------------------------------------------- + public function test_bad_library() + { + $lib = 'bad_test_lib'; + $this->ci_vfs_create(ucfirst($lib), '', $this->ci_app_root, 'libraries'); + $this->setExpectedException( + 'RuntimeException', + 'CI Error: Non-existent class: '.ucfirst($lib) + ); + $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); + } + + // -------------------------------------------------------------------- + public function test_library_extension() { // Create library and extension in VFS @@ -131,6 +142,16 @@ class Loader_test extends CI_TestCase { // Test is_loaded $this->assertEquals($obj, $this->load->is_loaded(ucfirst($lib))); + + // Test to load another class with the same object name + $lib = 'another_test_lib'; + $class = ucfirst($lib); + $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, 'libraries'); + $this->setExpectedException( + 'RuntimeException', + "CI Error: Resource '".$obj."' already exists and is not a ".$class." instance." + ); + $this->load->library($lib, NULL, $obj); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 8f75f7fdd14acef06f591ce03163ef5937c3b612 Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Wed, 11 Nov 2015 10:20:42 -0500 Subject: [ci skip] Make it clear that PHP <5.5 usage is discouraged PHP 5.4 reached end of life Signed-off-by: Claudio Galdiolo --- contributing.md | 2 +- readme.rst | 2 +- user_guide_src/source/contributing/index.rst | 2 +- user_guide_src/source/general/requirements.rst | 2 +- user_guide_src/source/general/styleguide.rst | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contributing.md b/contributing.md index 5a25698bf..f4d6705ed 100644 --- a/contributing.md +++ b/contributing.md @@ -29,7 +29,7 @@ If you change anything that requires a change to documentation then you will nee ### Compatibility -CodeIgniter recommends PHP 5.4 or newer to be used, but it should be +CodeIgniter recommends PHP 5.5 or newer to be used, but it should be compatible with PHP 5.2.4 so all code supplied must stick to this requirement. If PHP 5.3 (and above) functions or features are used then there must be a fallback for PHP 5.2.4. diff --git a/readme.rst b/readme.rst index 2e35d7223..64ace3a39 100644 --- a/readme.rst +++ b/readme.rst @@ -29,7 +29,7 @@ guide change log `_ version 5.4 or newer is recommended. +`PHP `_ version 5.5 or newer is recommended. It should work on 5.2.4 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 7704a59c5..b21246b4f 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -345,7 +345,7 @@ inability for CodeIgniter to send proper headers. Compatibility ============= -CodeIgniter recommends PHP 5.4 or newer to be used, but it should be +CodeIgniter recommends PHP 5.5 or newer to be used, but it should be compatible with PHP 5.2.4. Your code must either be compatible with this requirement, provide a suitable fallback, or be an optional feature that dies quietly without affecting a user's application. -- cgit v1.2.3-24-g4f1b From 01fb0d44167196ab0cb5bc0a3f1385204f932992 Mon Sep 17 00:00:00 2001 From: Craig Johnson Date: Thu, 12 Nov 2015 23:44:17 +0530 Subject: Grammar correction in database configuration guide "it" changed to "in" on line 10. "in" seems like the correct word to be used there. Small change. --- user_guide_src/source/database/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 8026be63a..e231a7d6a 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -7,7 +7,7 @@ connection values (username, password, database name, etc.). The config file is located at application/config/database.php. You can also set database connection values for specific :doc:`environments <../libraries/config>` by placing **database.php** -it the respective environment config folder. +in the respective environment config folder. The config settings are stored in a multi-dimensional array with this prototype:: -- cgit v1.2.3-24-g4f1b From 874096c1f652f25b7f3e89e8c6b45b13c8a5e0e8 Mon Sep 17 00:00:00 2001 From: sskaje Date: Sat, 14 Nov 2015 11:55:36 +0800 Subject: add unix socket support to redis session driver --- .../Session/drivers/Session_redis_driver.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index b098cc441..f74067978 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -85,10 +85,24 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { log_message('error', 'Session: No Redis save path configured.'); } + elseif (strpos($this->_config['save_path'], 'unix://') === 0 && preg_match('#(?:unix://)?([^:?]+)(\?.+)?#', $this->_config['save_path'], $matches)) + { + isset($matches[2]) OR $matches[2] = ''; // Just to avoid undefined index notices below + $this->_config['save_path'] = array( + 'type' => 'unix', + 'path' => $matches[1], + 'password' => preg_match('#auth=([^\s&]+)#', $matches[2], $match) ? $match[1] : NULL, + 'database' => preg_match('#database=(\d+)#', $matches[2], $match) ? (int) $match[1] : NULL, + 'timeout' => preg_match('#timeout=(\d+\.\d+)#', $matches[2], $match) ? (float) $match[1] : NULL + ); + + preg_match('#prefix=([^\s&]+)#', $matches[3], $match) && $this->_key_prefix = $match[1]; + } elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(\?.+)?#', $this->_config['save_path'], $matches)) { isset($matches[3]) OR $matches[3] = ''; // Just to avoid undefined index notices below $this->_config['save_path'] = array( + 'type' => 'tcp', 'host' => $matches[1], 'port' => empty($matches[2]) ? NULL : $matches[2], 'password' => preg_match('#auth=([^\s&]+)#', $matches[3], $match) ? $match[1] : NULL, @@ -128,7 +142,11 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle } $redis = new Redis(); - if ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) + if ($this->_config['save_path']['type'] == 'unix' && !$redis->connect($this->_config['save_path']['path'])) + { + log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); + } + else if ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) { log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); } -- cgit v1.2.3-24-g4f1b From 58d6854ad29b97061a1eb2fbd96ac57c29a13a3a Mon Sep 17 00:00:00 2001 From: Suhindra Date: Sat, 14 Nov 2015 15:04:00 +0700 Subject: Added and Updated MIME types for Flash Video Update 'f4v' entry and add 'flv' to support Flash Video as allowed file type. --- application/config/mimes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index aa3b1836a..957dc05d8 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -137,7 +137,8 @@ return array( '3gp' => array('video/3gp', 'video/3gpp'), 'mp4' => 'video/mp4', 'm4a' => 'audio/x-m4a', - 'f4v' => 'video/mp4', + 'f4v' => array('video/mp4', 'video/x-f4v'), + 'flv' => 'video/x-flv', 'webm' => 'video/webm', 'aac' => 'audio/x-acc', 'm4u' => 'application/vnd.mpegurl', -- cgit v1.2.3-24-g4f1b From 9703a0bbac81477365da7012a6a47d71c547cf96 Mon Sep 17 00:00:00 2001 From: kemeng Date: Mon, 16 Nov 2015 18:35:43 +0800 Subject: fixed a typo in unix socket parameter; change coding style to match CI; fix an elseif --- .../libraries/Session/drivers/Session_redis_driver.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index f74067978..fe82ca917 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -85,7 +85,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { log_message('error', 'Session: No Redis save path configured.'); } - elseif (strpos($this->_config['save_path'], 'unix://') === 0 && preg_match('#(?:unix://)?([^:?]+)(\?.+)?#', $this->_config['save_path'], $matches)) + elseif (preg_match('#^unix://([^\?]+)(\?.+)?$#', $this->_config['save_path'], $matches)) { isset($matches[2]) OR $matches[2] = ''; // Just to avoid undefined index notices below $this->_config['save_path'] = array( @@ -96,7 +96,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle 'timeout' => preg_match('#timeout=(\d+\.\d+)#', $matches[2], $match) ? (float) $match[1] : NULL ); - preg_match('#prefix=([^\s&]+)#', $matches[3], $match) && $this->_key_prefix = $match[1]; + preg_match('#prefix=([^\s&]+)#', $matches[2], $match) && $this->_key_prefix = $match[1]; } elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(\?.+)?#', $this->_config['save_path'], $matches)) { @@ -142,15 +142,19 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle } $redis = new Redis(); - if ($this->_config['save_path']['type'] == 'unix' && !$redis->connect($this->_config['save_path']['path'])) + if ($this->_config['save_path']['type'] == 'unix') { - log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); + if (! $redis->connect($this->_config['save_path']['path'])) + { + log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); + } } - else if ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) + elseif (! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) { log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); } - elseif (isset($this->_config['save_path']['password']) && ! $redis->auth($this->_config['save_path']['password'])) + + if (isset($this->_config['save_path']['password']) && ! $redis->auth($this->_config['save_path']['password'])) { log_message('error', 'Session: Unable to authenticate to Redis instance.'); } -- cgit v1.2.3-24-g4f1b From 47c37de5ec5f673b9db13a3c0f4d899fd651d703 Mon Sep 17 00:00:00 2001 From: kemeng Date: Mon, 16 Nov 2015 18:52:37 +0800 Subject: Spaces around ! . Changelog entry in 3.1.0. --- system/libraries/Session/drivers/Session_redis_driver.php | 4 ++-- user_guide_src/source/changelog.rst | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index fe82ca917..44ffddc4b 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -144,12 +144,12 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle $redis = new Redis(); if ($this->_config['save_path']['type'] == 'unix') { - if (! $redis->connect($this->_config['save_path']['path'])) + if ( ! $redis->connect($this->_config['save_path']['path'])) { log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); } } - elseif (! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) + elseif ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) { log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 77ccd7ce7..6c11bf3d7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,11 @@ Version 3.1.0 Release Date: Not Released +- Session + + - Add unix socket support to redis session driver. + + Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From b06b5c46ef59534cb3d0eb7e9b95c0c5720ee5e5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 16 Nov 2015 13:37:58 +0200 Subject: Fix #4244 --- system/libraries/Email.php | 31 ++++++++++++++++++++++++++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index ebff7567a..034586ac9 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1469,6 +1469,20 @@ class CI_Email { */ protected function _prep_quoted_printable($str) { + // ASCII code numbers for "safe" characters that can always be + // used literally, without encoding, as described in RFC 2049. + // http://www.ietf.org/rfc/rfc2049.txt + static $ascii_safe_chars = array( + // ' ( ) + , - . / : = ? + 39, 40, 41, 43, 44, 45, 46, 47, 58, 61, 63, + // numbers + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + // upper-case letters + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + // lower-case letters + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122 + ); + // We are intentionally wrapping so mail servers will encode characters // properly and MUAs will behave, so {unwrap} must go! $str = str_replace(array('{unwrap}', '{/unwrap}'), '', $str); @@ -1516,14 +1530,25 @@ class CI_Email { $ascii = ord($char); // Convert spaces and tabs but only if it's the end of the line - if ($i === ($length - 1) && ($ascii === 32 OR $ascii === 9)) + if ($ascii === 32 OR $ascii === 9) { - $char = $escape.sprintf('%02s', dechex($ascii)); + if ($i === ($length - 1)) + { + $char = $escape.sprintf('%02s', dechex($ascii)); + } } - elseif ($ascii === 61) // encode = signs + // DO NOT move this below the $ascii_safe_chars line! + // + // = (equals) signs are allowed by RFC2049, but must be encoded + // as they are the encoding delimiter! + elseif ($ascii === 61) { $char = $escape.strtoupper(sprintf('%02s', dechex($ascii))); // =3D } + elseif ( ! in_array($ascii, $ascii_safe_chars, TRUE)) + { + $char = $escape.strtoupper(sprintf('%02s', dechex($ascii))); + } // If we're at the character limit, add the line to the output, // reset our temp variable, and keep on chuggin' diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index efb09f24f..1d111b161 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4217) - :doc:`Config Library ` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``. - Fixed a bug where :doc:`CAPTCHA Helper ` entered an infinite loop while generating a random string. - Fixed a bug (#4223) - :doc:`Database ` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly. +- Fixed a bug (#4244) - :doc:`Email Library ` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From e9e4ab00991343ba94f9542c1a6f18a42b559257 Mon Sep 17 00:00:00 2001 From: kemeng Date: Mon, 16 Nov 2015 20:03:24 +0800 Subject: do not try to auth/select db on redis connect failure --- .../Session/drivers/Session_redis_driver.php | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 44ffddc4b..8f9bcce24 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -141,31 +141,37 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return FALSE; } + $connected = TRUE; $redis = new Redis(); if ($this->_config['save_path']['type'] == 'unix') { if ( ! $redis->connect($this->_config['save_path']['path'])) { log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); + $connected = FALSE; } } elseif ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) { log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); + $connected = FALSE; } - if (isset($this->_config['save_path']['password']) && ! $redis->auth($this->_config['save_path']['password'])) + if ($connected) { - log_message('error', 'Session: Unable to authenticate to Redis instance.'); - } - elseif (isset($this->_config['save_path']['database']) && ! $redis->select($this->_config['save_path']['database'])) - { - log_message('error', 'Session: Unable to select Redis database with index '.$this->_config['save_path']['database']); - } - else - { - $this->_redis = $redis; - return TRUE; + if (isset($this->_config['save_path']['password']) && ! $redis->auth($this->_config['save_path']['password'])) + { + log_message('error', 'Session: Unable to authenticate to Redis instance.'); + } + elseif (isset($this->_config['save_path']['database']) && ! $redis->select($this->_config['save_path']['database'])) + { + log_message('error', 'Session: Unable to select Redis database with index '.$this->_config['save_path']['database']); + } + else + { + $this->_redis = $redis; + return TRUE; + } } return FALSE; -- cgit v1.2.3-24-g4f1b From 9e2c7b9dd7e87a94c5a3696bc326cbbec5da7bb8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 16 Nov 2015 15:44:24 +0200 Subject: [ci skip] Fix #4245 --- system/database/DB_forge.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index f9cf76a14..d2302b2f2 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -781,7 +781,7 @@ abstract class CI_DB_forge { case 'SET': $attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']); $field['length'] = is_array($attributes['CONSTRAINT']) - ? "('".implode("','", $attributes['CONSTRAINT'])."')" + ? "(".implode(",", $attributes['CONSTRAINT']).")" : '('.$attributes['CONSTRAINT'].')'; break; default: diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1d111b161..b0c4055b5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.0.4 - Fixed a bug where :doc:`CAPTCHA Helper ` entered an infinite loop while generating a random string. - Fixed a bug (#4223) - :doc:`Database ` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly. - Fixed a bug (#4244) - :doc:`Email Library ` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding. +- Fixed a bug (#4245) - :doc:`Database Forge ` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 0f6e5bc4d356680bae470f05ccb9e115dd57422e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 16 Nov 2015 16:17:07 +0200 Subject: [ci skip] Polish changes from PR #4240 --- .../Session/drivers/Session_redis_driver.php | 71 ++++++++++------------ user_guide_src/source/changelog.rst | 4 +- 2 files changed, 35 insertions(+), 40 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 8f9bcce24..4fa6c28b3 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -85,41 +85,39 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { log_message('error', 'Session: No Redis save path configured.'); } - elseif (preg_match('#^unix://([^\?]+)(\?.+)?$#', $this->_config['save_path'], $matches)) + elseif (preg_match('#^unix://([^\?]+)(?\?.+)?$#', $this->_config['save_path'], $matches)) { - isset($matches[2]) OR $matches[2] = ''; // Just to avoid undefined index notices below - $this->_config['save_path'] = array( - 'type' => 'unix', - 'path' => $matches[1], - 'password' => preg_match('#auth=([^\s&]+)#', $matches[2], $match) ? $match[1] : NULL, - 'database' => preg_match('#database=(\d+)#', $matches[2], $match) ? (int) $match[1] : NULL, - 'timeout' => preg_match('#timeout=(\d+\.\d+)#', $matches[2], $match) ? (float) $match[1] : NULL - ); - - preg_match('#prefix=([^\s&]+)#', $matches[2], $match) && $this->_key_prefix = $match[1]; + $save_path = array('path' => $matches[1]); } - elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(\?.+)?#', $this->_config['save_path'], $matches)) + elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(?\?.+)?#', $this->_config['save_path'], $matches)) { - isset($matches[3]) OR $matches[3] = ''; // Just to avoid undefined index notices below - $this->_config['save_path'] = array( - 'type' => 'tcp', + $save_path = array( 'host' => $matches[1], - 'port' => empty($matches[2]) ? NULL : $matches[2], - 'password' => preg_match('#auth=([^\s&]+)#', $matches[3], $match) ? $match[1] : NULL, - 'database' => preg_match('#database=(\d+)#', $matches[3], $match) ? (int) $match[1] : NULL, - 'timeout' => preg_match('#timeout=(\d+\.\d+)#', $matches[3], $match) ? (float) $match[1] : NULL + 'port' => empty($matches[2]) ? NULL : $matches[2] ); - - preg_match('#prefix=([^\s&]+)#', $matches[3], $match) && $this->_key_prefix = $match[1]; } else { log_message('error', 'Session: Invalid Redis save path format: '.$this->_config['save_path']); } - if ($this->_config['match_ip'] === TRUE) + if (isset($save_path)) { - $this->_key_prefix .= $_SERVER['REMOTE_ADDR'].':'; + if (isset($matches['options'])) + { + $save_path['password'] = preg_match('#auth=([^\s&]+)#', $matches['options'], $match) ? $match[1] : NULL; + $save_path['database'] = preg_match('#database=(\d+)#', $matches['options'], $match) ? (int) $match[1] : NULL; + $save_path['timeout'] = preg_match('#timeout=(\d+\.\d+)#', $matches['options'], $match) ? (float) $match[1] : NULL; + + preg_match('#prefix=([^\s&]+)#', $matches['options'], $match) && $this->_key_prefix = $match[1]; + } + + $this->_config['save_path'] = $save_path; + + if ($this->_config['match_ip'] === TRUE) + { + $this->_key_prefix .= $_SERVER['REMOTE_ADDR'].':'; + } } } @@ -141,23 +139,16 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return FALSE; } - $connected = TRUE; $redis = new Redis(); - if ($this->_config['save_path']['type'] == 'unix') - { - if ( ! $redis->connect($this->_config['save_path']['path'])) - { - log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); - $connected = FALSE; - } - } - elseif ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout'])) - { - log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); - $connected = FALSE; - } + $connected = isset($this->_config['save_path']['path']) + ? $redis->connect($this->_config['save_path']['path']) + : $redis->connect( + $this->_config['save_path']['host'], + $this->_config['save_path']['port'], + $this->_config['save_path']['timeout'] + ); - if ($connected) + if ($connected) { if (isset($this->_config['save_path']['password']) && ! $redis->auth($this->_config['save_path']['password'])) { @@ -173,6 +164,10 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return TRUE; } } + else + { + log_message('error', 'Session: Unable to connect to Redis with the configured settings.'); + } return FALSE; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6c11bf3d7..986525437 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,9 +7,9 @@ Version 3.1.0 Release Date: Not Released -- Session +- Libraries - - Add unix socket support to redis session driver. + - Added UNIX socket connection support to :doc:`Session Library ` 'redis' driver. Version 3.0.4 -- cgit v1.2.3-24-g4f1b From b3847796666c8466dcfafaddbda1f13b4acf605e Mon Sep 17 00:00:00 2001 From: Craig Johnson Date: Thu, 12 Nov 2015 23:44:17 +0530 Subject: Grammar correction in database configuration guide "it" changed to "in" on line 10. "in" seems like the correct word to be used there. Small change. --- user_guide_src/source/database/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 8026be63a..e231a7d6a 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -7,7 +7,7 @@ connection values (username, password, database name, etc.). The config file is located at application/config/database.php. You can also set database connection values for specific :doc:`environments <../libraries/config>` by placing **database.php** -it the respective environment config folder. +in the respective environment config folder. The config settings are stored in a multi-dimensional array with this prototype:: -- cgit v1.2.3-24-g4f1b From 6a7a16073aefbc0bff0fb850d97ea11c57d693c1 Mon Sep 17 00:00:00 2001 From: dimitribalazs Date: Wed, 18 Nov 2015 11:50:22 +0100 Subject: Added alt attribute functionality … MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It hasn't been possible to set the alt attribute on the image. Added img_alt key on the $defaults array and integrated the $img_alt variable into the img string. --- system/helpers/captcha_helper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 85bcfb5a0..3cf581bba 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -79,7 +79,8 @@ if ( ! function_exists('create_captcha')) 'border' => array(153,102,102), 'text' => array(204,153,153), 'grid' => array(255,182,182) - ) + ), + 'img_alt' => 'captcha' ); foreach ($defaults as $key => $val) @@ -330,7 +331,7 @@ if ( ! function_exists('create_captcha')) return FALSE; } - $img = ' '; + $img = ''.$img_alt.''; ImageDestroy($im); return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename); -- cgit v1.2.3-24-g4f1b From 01d53bd69aef482a42d5bbc94fd3496e79a97f23 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Nov 2015 13:09:22 +0200 Subject: [ci skip] Update routing docs Close #4258 --- user_guide_src/source/general/routing.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index b2c9873ab..515368099 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -113,18 +113,19 @@ A typical RegEx route might look something like this:: In the above example, a URI similar to products/shirts/123 would instead call the "shirts" controller class and the "id_123" method. -With regular expressions, you can also catch a segment containing a -forward slash ('/'), which would usually represent the delimiter between -multiple segments. - +With regular expressions, you can also catch multiple segments at once. For example, if a user accesses a password protected area of your web application and you wish to be able to redirect them back to the same page after they log in, you may find this example useful:: $route['login/(.+)'] = 'auth/login/$1'; +.. note:: In the above example, if the ``$1`` placeholder contains a + slash, it will still be split into multiple parameters when + passed to ``Auth::login()``. + For those of you who don't know regular expressions and want to learn -more about them, `regular-expressions.info ` +more about them, `regular-expressions.info `_ might be a good starting point. .. note:: You can also mix and match wildcards with regular expressions. -- cgit v1.2.3-24-g4f1b From 422fd592428d6048e9a75868fa3e75527506dbb7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 24 Nov 2015 11:36:29 +0200 Subject: [ci skip] Remove some redundant code from DB_forge --- system/database/DB_forge.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index d2302b2f2..1546e40c0 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -780,10 +780,6 @@ abstract class CI_DB_forge { case 'ENUM': case 'SET': $attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']); - $field['length'] = is_array($attributes['CONSTRAINT']) - ? "(".implode(",", $attributes['CONSTRAINT']).")" - : '('.$attributes['CONSTRAINT'].')'; - break; default: $field['length'] = is_array($attributes['CONSTRAINT']) ? '('.implode(',', $attributes['CONSTRAINT']).')' -- cgit v1.2.3-24-g4f1b From 5afa348b48a93f24957377dc12f86ae64665b944 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 24 Nov 2015 11:48:39 +0200 Subject: Use PHP7's random_bytes() when possible Close #4260 --- system/core/Security.php | 16 ++++++++++++++++ system/libraries/Encryption.php | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/system/core/Security.php b/system/core/Security.php index 36dea4cf2..e79bf8aff 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -593,6 +593,22 @@ class CI_Security { return FALSE; } + if (function_exists('random_bytes')) + { + try + { + // The cast is required to avoid TypeError + return random_bytes((int) $length); + } + catch (Exception $e) + { + // If random_bytes() can't do the job, we can't either ... + // There's no point in using fallbacks. + log_message('error', $e->getMessage()); + return FALSE; + } + } + // Unfortunately, none of the following PRNGs is guaranteed to exist ... if (defined('MCRYPT_DEV_URANDOM') && ($output = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)) !== FALSE) { diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index f3e039881..151ce8dec 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -337,6 +337,11 @@ class CI_Encryption { */ public function create_key($length) { + if (function_exists('random_bytes')) + { + return random_bytes((int) $length); + } + return ($this->_driver === 'mcrypt') ? mcrypt_create_iv($length, MCRYPT_DEV_URANDOM) : openssl_random_pseudo_bytes($length); -- cgit v1.2.3-24-g4f1b From 7e983df144c7edca97bf4ce3b5e64f4487972262 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 24 Nov 2015 11:50:59 +0200 Subject: [ci skip] Add changelog entries for 5afa348b48a93f24957377dc12f86ae64665b944 Related: #4260 --- user_guide_src/source/changelog.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b0c4055b5..5b7f225a5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,11 @@ Version 3.0.4 Release Date: Not Released +- General Changes + + - Updated :doc:`Security Library ` method ``get_random_bytes()`` to use PHP7's ``random_bytes()`` function when possible. + - Updated :doc:`Encryption Library ` method ``create_key()`` to use PHP7's ``random_bytes()`` function when possible. + Bug fixes for 3.0.4 ------------------- -- cgit v1.2.3-24-g4f1b From fd70fa5ff7cec722a69f3e720a962aea3dec03fe Mon Sep 17 00:00:00 2001 From: Sébastien Adam Date: Wed, 25 Nov 2015 18:25:17 +0100 Subject: HTML Helper - meta(): now can generate HTML meta charset & Open Graph property --- system/helpers/html_helper.php | 9 +++++---- user_guide_src/source/helpers/html_helper.rst | 12 ++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 28fbe00be..4e25f8c9b 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -338,7 +338,7 @@ if ( ! function_exists('link_tag')) if ( ! function_exists('meta')) { /** - * Generates meta tags from an array of key/values + * Generates meta tags from an array of key/values, compatible with html5 and open graph * * @param array * @param string @@ -359,13 +359,14 @@ if ( ! function_exists('meta')) // Turn single array into multidimensional $name = array($name); } - + $allowed_type = array('charset', 'http-equiv', 'name', 'property'); $str = ''; foreach ($name as $meta) { - $type = (isset($meta['type']) && $meta['type'] !== 'name') ? 'http-equiv' : 'name'; + $meta['type'] = (isset($meta['type']) && ($meta['type'] == 'equiv')) ? 'http-equiv' : $meta['type']; // backward compatibility + $type = (isset($meta['type']) && in_array($meta['type'], $allowed_type))? $meta['type'] : 'name'; $name = isset($meta['name']) ? $meta['name'] : ''; - $content = isset($meta['content']) ? $meta['content'] : ''; + $content = (isset($meta['content']) && $type != 'charset') ? $meta['content'] : ''; $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; $str .= ''.$newline; diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 2c748bea0..1445b3bf0 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -285,9 +285,9 @@ The following functions are available: echo meta('description', 'My Great site'); // Generates: - echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); - // Note the third parameter. Can be "equiv" or "name" - // Generates: + echo meta('refresh', '30', 'http-equiv'); + // Note the third parameter. Can be "charset", "http-equiv", "name" or "property" + // Generates: echo meta(array('name' => 'robots', 'content' => 'no-cache')); // Generates: @@ -310,8 +310,8 @@ The following functions are available: 'content' => 'no-cache' ), array( - 'name' => 'Content-type', - 'content' => 'text/html; charset=utf-8', 'type' => 'equiv' + 'name' => 'UTF-8', + 'type' => 'charset' ) ); @@ -321,7 +321,7 @@ The following functions are available: // // // - // + // .. php:function:: doctype([$type = 'xhtml1-strict']) -- cgit v1.2.3-24-g4f1b From dfcc5318d378ae66dd21806c6ac2dad67d73dc26 Mon Sep 17 00:00:00 2001 From: Sébastien Adam Date: Wed, 25 Nov 2015 18:30:34 +0100 Subject: HTML Helper - doctype(): now default type is HTML 5 --- system/helpers/html_helper.php | 2 +- user_guide_src/source/helpers/html_helper.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 4e25f8c9b..b4c605a01 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -229,7 +229,7 @@ if ( ! function_exists('doctype')) * @param string type The doctype to be generated * @return string */ - function doctype($type = 'xhtml1-strict') + function doctype($type = 'html5') { static $doctypes; diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 1445b3bf0..bfd4afbe2 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -324,18 +324,18 @@ The following functions are available: // -.. 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(); // + echo doctype(); // echo doctype('html4-trans'); // -- cgit v1.2.3-24-g4f1b From 49077f1a80c1c644c3e15864a1dab285e7fb8de5 Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Wed, 25 Nov 2015 15:34:16 -0500 Subject: Fix file name With case-sensitive filesystem, visiting example.com/index.php/form/ returns a '404 Page Not Found' error --- user_guide_src/source/libraries/form_validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index c288cc8c0..dd3ffbbaf 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -116,7 +116,7 @@ this code and save it to your application/views/ folder:: The Controller ============== -Using a text editor, create a controller called form.php. In it, place +Using a text editor, create a controller called Form.php. In it, place this code and save it to your application/controllers/ folder:: Date: Wed, 25 Nov 2015 22:41:40 +0200 Subject: Merge pull request #4271 from galdiolo/patch-12 [ci skip] Fix file name in documentation --- user_guide_src/source/libraries/form_validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index c288cc8c0..dd3ffbbaf 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -116,7 +116,7 @@ this code and save it to your application/views/ folder:: The Controller ============== -Using a text editor, create a controller called form.php. In it, place +Using a text editor, create a controller called Form.php. In it, place this code and save it to your application/controllers/ folder:: Date: Thu, 26 Nov 2015 22:58:46 +0700 Subject: fix another file name according PR #4271 Fix another file name in documentation according PR #4271 --- user_guide_src/source/libraries/form_validation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index dd3ffbbaf..9189d082e 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -175,7 +175,7 @@ The form (myform.php) is a standard web form with a couple exceptions: This function will return any error messages sent back by the validator. If there are no messages it returns an empty string. -The controller (form.php) has one method: ``index()``. This method +The controller (Form.php) has one method: ``index()``. This method initializes the validation class and loads the form helper and URL helper used by your view files. It also runs the validation routine. Based on whether the validation was successful it either presents the @@ -205,7 +205,7 @@ The above method takes **three** parameters as input: .. note:: If you would like the field name to be stored in a language file, please see :ref:`translating-field-names`. -Here is an example. In your controller (form.php), add this code just +Here is an example. In your controller (Form.php), add this code just below the validation initialization method:: $this->form_validation->set_rules('username', 'Username', 'required'); -- cgit v1.2.3-24-g4f1b From 5734cb3cc59ca938112e981b9ebd27ba5bb69173 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 26 Nov 2015 18:25:40 +0200 Subject: Merge pull request #4273 from suhindra/develop [ci skip] Fix another file name in the docsaccording Similarly to PR #4271 --- user_guide_src/source/libraries/form_validation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index dd3ffbbaf..9189d082e 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -175,7 +175,7 @@ The form (myform.php) is a standard web form with a couple exceptions: This function will return any error messages sent back by the validator. If there are no messages it returns an empty string. -The controller (form.php) has one method: ``index()``. This method +The controller (Form.php) has one method: ``index()``. This method initializes the validation class and loads the form helper and URL helper used by your view files. It also runs the validation routine. Based on whether the validation was successful it either presents the @@ -205,7 +205,7 @@ The above method takes **three** parameters as input: .. note:: If you would like the field name to be stored in a language file, please see :ref:`translating-field-names`. -Here is an example. In your controller (form.php), add this code just +Here is an example. In your controller (Form.php), add this code just below the validation initialization method:: $this->form_validation->set_rules('username', 'Username', 'required'); -- cgit v1.2.3-24-g4f1b From 6ab09773d96ce6ac672a3d852256126d10aa25d8 Mon Sep 17 00:00:00 2001 From: Sébastien Adam Date: Tue, 1 Dec 2015 20:02:07 +0100 Subject: Modified as asked after pull request: * comment of meta fuction adapted * alignments in meta fuction adapted * using '===' comparator in meta function * changing back the example of the meta function help * changing back the default value of the doctype function Also changing test unit to reflect the modification of the meta function (original tests not modified). --- system/helpers/html_helper.php | 14 +++++++------- tests/codeigniter/helpers/html_helper_test.php | 6 +++++- user_guide_src/source/helpers/html_helper.rst | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index b4c605a01..36680053a 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -229,7 +229,7 @@ if ( ! function_exists('doctype')) * @param string type The doctype to be generated * @return string */ - function doctype($type = 'html5') + function doctype($type = 'xhtml1-strict') { static $doctypes; @@ -363,13 +363,13 @@ if ( ! function_exists('meta')) $str = ''; foreach ($name as $meta) { - $meta['type'] = (isset($meta['type']) && ($meta['type'] == 'equiv')) ? 'http-equiv' : $meta['type']; // backward compatibility - $type = (isset($meta['type']) && in_array($meta['type'], $allowed_type))? $meta['type'] : 'name'; - $name = isset($meta['name']) ? $meta['name'] : ''; - $content = (isset($meta['content']) && $type != 'charset') ? $meta['content'] : ''; - $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; + $meta['type'] = isset($meta['type']) ? (($meta['type'] === 'equiv') ? 'http-equiv' : $meta['type']) : ''; // backward compatibility + $type = in_array($meta['type'], $allowed_type) ? $meta['type'] : 'name'; + $name = isset($meta['name']) ? $meta['name'] : ''; + $content = isset($meta['content']) ? $meta['content'] : ''; + $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; - $str .= ''.$newline; + $str .= ''.$newline; } return $str; diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php index d66ad895c..0b9655bf5 100644 --- a/tests/codeigniter/helpers/html_helper_test.php +++ b/tests/codeigniter/helpers/html_helper_test.php @@ -87,6 +87,10 @@ EOH; $this->assertEquals($expect, meta(array('name' => 'foo'))); + $expect = "\n"; + + $this->assertEquals($expect, meta(array('name' => 'foo', 'type' => 'charset'))); + } -} \ No newline at end of file +} diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index bfd4afbe2..fffb2cab4 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -285,9 +285,9 @@ The following functions are available: echo meta('description', 'My Great site'); // Generates: - echo meta('refresh', '30', 'http-equiv'); + echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); // Note the third parameter. Can be "charset", "http-equiv", "name" or "property" - // Generates: + // Generates: echo meta(array('name' => 'robots', 'content' => 'no-cache')); // Generates: -- cgit v1.2.3-24-g4f1b From 7cf4cda4d56ca8c7dc51b38442d83d3b593d96f8 Mon Sep 17 00:00:00 2001 From: Sébastien Adam Date: Tue, 1 Dec 2015 20:24:32 +0100 Subject: Forgot change in the comment on the meta function --- system/helpers/html_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 36680053a..9ed21a168 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -338,7 +338,7 @@ if ( ! function_exists('link_tag')) if ( ! function_exists('meta')) { /** - * Generates meta tags from an array of key/values, compatible with html5 and open graph + * Generates meta tags from an array of key/values * * @param array * @param string -- cgit v1.2.3-24-g4f1b From a18c6097a38f7b3eac789b5c217a97d7ac0b7085 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 3 Dec 2015 17:53:14 +0200 Subject: Fix #4283 --- system/helpers/string_helper.php | 3 ++- user_guide_src/source/changelog.rst | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 637835160..3138a04b3 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -270,7 +270,7 @@ if ( ! function_exists('alternator')) * @param string (as many parameters as needed) * @return string */ - function alternator($args) + function alternator() { static $i; @@ -279,6 +279,7 @@ if ( ! function_exists('alternator')) $i = 0; return ''; } + $args = func_get_args(); return $args[($i++ % count($args))]; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b7f225a5..a7807aa03 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,12 +16,13 @@ Bug fixes for 3.0.4 ------------------- - Fixed a bug (#4212) - :doc:`Query Builder ` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used. -- Fixed a bug where :doc:`Form Helper ` functions `set_checkbox()`, `set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". +- Fixed a bug where :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". - Fixed a bug (#4217) - :doc:`Config Library ` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``. - Fixed a bug where :doc:`CAPTCHA Helper ` entered an infinite loop while generating a random string. - Fixed a bug (#4223) - :doc:`Database ` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly. - Fixed a bug (#4244) - :doc:`Email Library ` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding. - Fixed a bug (#4245) - :doc:`Database Forge ` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values. +- Fixed a bug (#4283) - :doc:`String Helper ` function :php:func:`alternator()` couldn't be called without arguments. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 3f273628540c20ffa1ea8b88da315314a5046983 Mon Sep 17 00:00:00 2001 From: b-kaxa Date: Mon, 7 Dec 2015 02:23:10 +0900 Subject: fix phpdoc --- system/core/Router.php | 1 + system/core/URI.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Router.php b/system/core/Router.php index a84be1f1d..0a6975881 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -118,6 +118,7 @@ class CI_Router { * * Runs the route mapping function. * + * @param array $routing * @return void */ public function __construct($routing = NULL) diff --git a/system/core/URI.php b/system/core/URI.php index 5b658f679..5179b401f 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -294,7 +294,7 @@ class CI_URI { * * Do some final cleaning of the URI and return it, currently only used in self::_parse_request_uri() * - * @param string $url + * @param string $uri * @return string */ protected function _remove_relative_directory($uri) -- cgit v1.2.3-24-g4f1b From 5ced82ab986f6a53ca95f5498a63ac503ea8f580 Mon Sep 17 00:00:00 2001 From: "Halmai, Csongor" Date: Mon, 7 Dec 2015 13:20:39 +1100 Subject: Detecting if database connection was not successful --- system/core/Loader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/core/Loader.php b/system/core/Loader.php index 18e4c5287..7593ae5d6 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -361,6 +361,10 @@ class CI_Loader { // Load the DB class $CI->db =& DB($params, $query_builder); + if (!$CI->db->conn_id) + { + return FALSE; + } return $this; } -- cgit v1.2.3-24-g4f1b From 887eb91ff2799036a6d899ee3dbadd8a6a51ff54 Mon Sep 17 00:00:00 2001 From: b-kaxa Date: Mon, 7 Dec 2015 19:03:20 +0900 Subject: replace spaces with tabs --- system/core/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Router.php b/system/core/Router.php index 0a6975881..ce41aa958 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -118,7 +118,7 @@ class CI_Router { * * Runs the route mapping function. * - * @param array $routing + * @param array $routing * @return void */ public function __construct($routing = NULL) -- cgit v1.2.3-24-g4f1b From f0f93f50d2a85373988a225504115d4805446189 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Dec 2015 12:12:44 +0200 Subject: Merge pull request #4291 from b-kaxa/fix-phpdoc [ci skip] phpdoc adjustments in CI_Router and CI_URI --- system/core/Router.php | 1 + system/core/URI.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Router.php b/system/core/Router.php index a84be1f1d..ce41aa958 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -118,6 +118,7 @@ class CI_Router { * * Runs the route mapping function. * + * @param array $routing * @return void */ public function __construct($routing = NULL) diff --git a/system/core/URI.php b/system/core/URI.php index 5b658f679..5179b401f 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -294,7 +294,7 @@ class CI_URI { * * Do some final cleaning of the URI and return it, currently only used in self::_parse_request_uri() * - * @param string $url + * @param string $uri * @return string */ protected function _remove_relative_directory($uri) -- cgit v1.2.3-24-g4f1b From 0f56007d95a8713f0c4276e37604e221f4efbe66 Mon Sep 17 00:00:00 2001 From: "Halmai, Csongor" Date: Tue, 8 Dec 2015 11:32:35 +1100 Subject: rolling back previous solution; throwing exception if database connection was not successful. --- system/core/Loader.php | 4 ---- system/database/DB_driver.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 7593ae5d6..18e4c5287 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -361,10 +361,6 @@ class CI_Loader { // Load the DB class $CI->db =& DB($params, $query_builder); - if (!$CI->db->conn_id) - { - return FALSE; - } return $this; } diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 25e70ec3f..fb9955b7c 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -436,7 +436,7 @@ abstract class CI_DB_driver { $this->display_error('db_unable_to_connect'); } - return FALSE; + throw new RuntimeException('Database connection failure.'); } } -- cgit v1.2.3-24-g4f1b From ac0e0bf62d483d1b7db86fe760447ca0dd83baf2 Mon Sep 17 00:00:00 2001 From: "Halmai, Csongor" Date: Tue, 8 Dec 2015 11:40:24 +1100 Subject: documentation for the new RuntimeException --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 986525437..5a41fa18b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,10 @@ Release Date: Not Released - Added UNIX socket connection support to :doc:`Session Library ` 'redis' driver. +- Database + + - CI_DB_driver::initialize() throws a "Database connection failure." RuntimeException if couldn't connect to the database. + Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From b1cde1fdd77aec1278dd2b4d6ae071e814a58c2a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Dec 2015 13:10:41 +0200 Subject: Type-hint csv_from_result(), xml_from_result() DB utilities Close #4299 --- system/database/DB_utility.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index b51893e18..fcc56f24e 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -235,13 +235,8 @@ abstract class CI_DB_utility { * @param string $enclosure Enclosure (default: ") * @return string */ - public function csv_from_result($query, $delim = ',', $newline = "\n", $enclosure = '"') + public function csv_from_result(CI_DB_result $query, $delim = ',', $newline = "\n", $enclosure = '"') { - if ( ! is_object($query) OR ! method_exists($query, 'list_fields')) - { - show_error('You must submit a valid result object'); - } - $out = ''; // First generate the headings from the table column names foreach ($query->list_fields() as $name) @@ -274,13 +269,8 @@ abstract class CI_DB_utility { * @param array $params Any preferences * @return string */ - public function xml_from_result($query, $params = array()) + public function xml_from_result(CI_DB_result $query, $params = array()) { - if ( ! is_object($query) OR ! method_exists($query, 'list_fields')) - { - show_error('You must submit a valid result object'); - } - // Set our default values foreach (array('root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t") as $key => $val) { -- cgit v1.2.3-24-g4f1b From 2410c30c457e108c1f57978df610e82abab0361e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Dec 2015 13:25:19 +0200 Subject: Remove CI_DB_driver::load_rdriver() --- system/database/DB.php | 5 ++++- system/database/DB_driver.php | 27 +++------------------------ 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/system/database/DB.php b/system/database/DB.php index 23de414b5..355d26fb5 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -192,10 +192,13 @@ function &DB($params = '', $query_builder_override = NULL) // Load the DB driver $driver_file = BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php'; - file_exists($driver_file) OR show_error('Invalid DB driver'); require_once($driver_file); + // Load the result classes as well + require_once(BASEPATH.'database/DB_result.php'); + require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_result.php'); + // Instantiate the DB adapter $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; $DB = new $driver($params); diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 25e70ec3f..bc016efbf 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -622,7 +622,6 @@ abstract class CI_DB_driver { // cached query if it exists if ($this->cache_on === TRUE && $return_object === TRUE && $this->_cache_init()) { - $this->load_rdriver(); if (FALSE !== ($cache = $this->CACHE->read($sql))) { return $cache; @@ -710,9 +709,9 @@ abstract class CI_DB_driver { return TRUE; } - // Load and instantiate the result driver - $driver = $this->load_rdriver(); - $RES = new $driver($this); + // Instantiate the driver-specific result class + $driver = 'CI_DB_'.$this->dbdriver.'_result'; + $RES = new $driver($this); // Is query caching enabled? If so, we'll serialize the // result object and save it to a cache file. @@ -741,26 +740,6 @@ abstract class CI_DB_driver { // -------------------------------------------------------------------- - /** - * Load the result drivers - * - * @return string the name of the result class - */ - public function load_rdriver() - { - $driver = 'CI_DB_'.$this->dbdriver.'_result'; - - if ( ! class_exists($driver, FALSE)) - { - require_once(BASEPATH.'database/DB_result.php'); - require_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result.php'); - } - - return $driver; - } - - // -------------------------------------------------------------------- - /** * Simple Query * This is a simplified version of the query() function. Internally -- cgit v1.2.3-24-g4f1b From 62a106e277e53a99346314cc10480e549225b08c Mon Sep 17 00:00:00 2001 From: Phil Scherer Date: Tue, 8 Dec 2015 18:06:11 -0500 Subject: Fix mismatched brackets in documentation Sphinx generates incomplete/incorrect HTML output because there are mismatched brackets in the documentation. Signed-off-by: Phil Scherer --- user_guide_src/source/database/db_driver_reference.rst | 2 +- user_guide_src/source/helpers/cookie_helper.rst | 6 +++--- user_guide_src/source/helpers/form_helper.rst | 4 ++-- user_guide_src/source/libraries/sessions.rst | 2 +- user_guide_src/source/libraries/trackback.rst | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 8fc26c01b..1e436ede1 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -83,7 +83,7 @@ This article is intended to be a reference for them. Database version number. - .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]]) + .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]) :param string $sql: The SQL statement to execute :param array $binds: An array of binding data diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst index da26151cb..c9d2f419c 100644 --- a/user_guide_src/source/helpers/cookie_helper.rst +++ b/user_guide_src/source/helpers/cookie_helper.rst @@ -25,7 +25,7 @@ Available Functions The following functions are available: -.. 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 = FALSE[, $httponly = FALSE]]]]]]]) :param mixed $name: Cookie name *or* associative array of all of the parameters available to this function :param string $value: Cookie value @@ -42,7 +42,7 @@ The following functions are available: a description of its use, as this function is an alias for ``CI_Input::set_cookie()``. -.. php:function:: get_cookie($index[, $xss_clean = NULL]]) +.. php:function:: get_cookie($index[, $xss_clean = NULL]) :param string $index: Cookie name :param bool $xss_clean: Whether to apply XSS filtering to the returned value @@ -56,7 +56,7 @@ The following functions are available: the ``$config['cookie_prefix']`` that you might've set in your *application/config/config.php* file. -.. php:function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]]]) +.. php:function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]]) :param string $name: Cookie name :param string $domain: Cookie domain (usually: .yourdomain.com) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index d3ee3ffb6..a67dbc0bf 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -108,7 +108,7 @@ The following functions are available: -.. php:function:: form_open_multipart([$action = ''[, $attributes = array()[, $hidden = array()]]) +.. php:function:: form_open_multipart([$action = ''[, $attributes = array()[, $hidden = array()]]]) :param string $action: Form action/target URI string :param array $attributes: HTML attributes @@ -187,7 +187,7 @@ The following functions are available: */ -.. php:function:: form_input([$data = ''[, $value = ''[, $extra = '']]) +.. php:function:: form_input([$data = ''[, $value = ''[, $extra = '']]]) :param array $data: Field attributes data :param string $value: Field value diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 9c9761bbf..881705c92 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -842,7 +842,7 @@ Class Reference .. note:: This method is DEPRECATED. Use ``userdata()`` with no parameters instead. - .. php:method:: &get_userdata() + .. php:method:: get_userdata() :returns: A reference to ``$_SESSION`` :rtype: array diff --git a/user_guide_src/source/libraries/trackback.rst b/user_guide_src/source/libraries/trackback.rst index 4e0cb5541..bceb515f2 100644 --- a/user_guide_src/source/libraries/trackback.rst +++ b/user_guide_src/source/libraries/trackback.rst @@ -239,7 +239,7 @@ Class Reference This method simply validates the incoming TB data, returning TRUE on success and FALSE on failure. If the data is valid it is set to the ``$this->data`` array so that it can be inserted into a database. - .. php:method:: send_error([$message = 'Incomplete information') + .. php:method:: send_error([$message = 'Incomplete information']) :param string $message: Error message :rtype: void -- cgit v1.2.3-24-g4f1b From 367dad5bab86f72a843010f07590aa9c3ecc5780 Mon Sep 17 00:00:00 2001 From: Phil Scherer Date: Wed, 9 Dec 2015 13:34:38 -0500 Subject: Remove accidentally included change --- user_guide_src/source/libraries/sessions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 881705c92..9c9761bbf 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -842,7 +842,7 @@ Class Reference .. note:: This method is DEPRECATED. Use ``userdata()`` with no parameters instead. - .. php:method:: get_userdata() + .. php:method:: &get_userdata() :returns: A reference to ``$_SESSION`` :rtype: array -- cgit v1.2.3-24-g4f1b From 3e75ff6050fd86816601a11effc2932ecd81ebf7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Dec 2015 13:28:19 +0200 Subject: Merge pull request #4304 from scherepn/fix-doc-build-errors [ci skip] Fix mismatched brackets in documentation --- user_guide_src/source/database/db_driver_reference.rst | 2 +- user_guide_src/source/helpers/cookie_helper.rst | 6 +++--- user_guide_src/source/helpers/form_helper.rst | 4 ++-- user_guide_src/source/libraries/trackback.rst | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 8fc26c01b..1e436ede1 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -83,7 +83,7 @@ This article is intended to be a reference for them. Database version number. - .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]]) + .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]) :param string $sql: The SQL statement to execute :param array $binds: An array of binding data diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst index da26151cb..c9d2f419c 100644 --- a/user_guide_src/source/helpers/cookie_helper.rst +++ b/user_guide_src/source/helpers/cookie_helper.rst @@ -25,7 +25,7 @@ Available Functions The following functions are available: -.. 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 = FALSE[, $httponly = FALSE]]]]]]]) :param mixed $name: Cookie name *or* associative array of all of the parameters available to this function :param string $value: Cookie value @@ -42,7 +42,7 @@ The following functions are available: a description of its use, as this function is an alias for ``CI_Input::set_cookie()``. -.. php:function:: get_cookie($index[, $xss_clean = NULL]]) +.. php:function:: get_cookie($index[, $xss_clean = NULL]) :param string $index: Cookie name :param bool $xss_clean: Whether to apply XSS filtering to the returned value @@ -56,7 +56,7 @@ The following functions are available: the ``$config['cookie_prefix']`` that you might've set in your *application/config/config.php* file. -.. php:function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]]]) +.. php:function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]]) :param string $name: Cookie name :param string $domain: Cookie domain (usually: .yourdomain.com) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index d3ee3ffb6..a67dbc0bf 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -108,7 +108,7 @@ The following functions are available: -.. php:function:: form_open_multipart([$action = ''[, $attributes = array()[, $hidden = array()]]) +.. php:function:: form_open_multipart([$action = ''[, $attributes = array()[, $hidden = array()]]]) :param string $action: Form action/target URI string :param array $attributes: HTML attributes @@ -187,7 +187,7 @@ The following functions are available: */ -.. php:function:: form_input([$data = ''[, $value = ''[, $extra = '']]) +.. php:function:: form_input([$data = ''[, $value = ''[, $extra = '']]]) :param array $data: Field attributes data :param string $value: Field value diff --git a/user_guide_src/source/libraries/trackback.rst b/user_guide_src/source/libraries/trackback.rst index 4e0cb5541..bceb515f2 100644 --- a/user_guide_src/source/libraries/trackback.rst +++ b/user_guide_src/source/libraries/trackback.rst @@ -239,7 +239,7 @@ Class Reference This method simply validates the incoming TB data, returning TRUE on success and FALSE on failure. If the data is valid it is set to the ``$this->data`` array so that it can be inserted into a database. - .. php:method:: send_error([$message = 'Incomplete information') + .. php:method:: send_error([$message = 'Incomplete information']) :param string $message: Error message :rtype: void -- cgit v1.2.3-24-g4f1b From 71a65c359e6aee6f3f7a7f785dea1af4df064701 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Dec 2015 17:21:51 +0200 Subject: Fix #4306 --- system/database/drivers/mssql/mssql_driver.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 883973ae1..b9e310a3a 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -267,7 +267,7 @@ class CI_DB_mssql_driver extends CI_DB { */ protected function _version() { - return 'SELECT @@VERSION AS ver'; + return "SELECT SERVERPROPERTY('ProductVersion') AS ver"; } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a7807aa03..7188e1037 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4244) - :doc:`Email Library ` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding. - Fixed a bug (#4245) - :doc:`Database Forge ` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values. - Fixed a bug (#4283) - :doc:`String Helper ` function :php:func:`alternator()` couldn't be called without arguments. +- Fixed a bug (#4306) - :doc:`Database ` method ``version()`` didn't work properly with the 'mssql' driver. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 8df6efd402180a6361b4dd619f5535d6c2bed334 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Dec 2015 17:55:55 +0200 Subject: Fix #4039 --- system/libraries/Session/drivers/Session_files_driver.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 45da91c46..173b43710 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -183,6 +183,12 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle return ''; } } + // We shouldn't need this, but apparently we do ... + // See https://github.com/bcit-ci/CodeIgniter/issues/4039 + elseif ($this->_file_handler === FALSE) + { + return FALSE; + } else { rewind($this->_file_handle); -- cgit v1.2.3-24-g4f1b From e705f8e71a80e7740fe6d87f9e01afebc40cd375 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Dec 2015 17:58:55 +0200 Subject: [ci skip] Add changelog entry for issue #4039 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7188e1037..f4e51588a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -24,6 +24,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4245) - :doc:`Database Forge ` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values. - Fixed a bug (#4283) - :doc:`String Helper ` function :php:func:`alternator()` couldn't be called without arguments. - Fixed a bug (#4306) - :doc:`Database ` method ``version()`` didn't work properly with the 'mssql' driver. +- Fixed a bug (#4039) - :doc:`Session Library ` could generate multiple (redundant) warnings in case of a read failure with the 'files' driver, due to a bug in PHP. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From af849696d43f5c3b68962af1ae5096151a6d9f1a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Dec 2015 14:07:39 +0200 Subject: [ci skip] Proper error handling for Sessions on PHP 5 This was actually a PHP bug, see https://wiki.php.net/rfc/session.user.return-value Also related: #4039 --- system/libraries/Session/Session_driver.php | 23 +++++++++ .../Session/drivers/Session_database_driver.php | 49 +++++++++++------- .../Session/drivers/Session_files_driver.php | 59 +++++++++++++--------- .../Session/drivers/Session_memcached_driver.php | 45 +++++++++-------- .../Session/drivers/Session_redis_driver.php | 35 +++++++------ user_guide_src/source/changelog.rst | 1 + 6 files changed, 134 insertions(+), 78 deletions(-) diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 47376da5b..64b4bb511 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -74,6 +74,18 @@ abstract class CI_Session_driver implements SessionHandlerInterface { */ protected $_session_id; + /** + * Success and failure return values + * + * Necessary due to a bug in all PHP 5 versions where return values + * from userspace handlers are not handled properly. PHP 7 fixes the + * bug, so we need to return different values depending on the version. + * + * @see https://wiki.php.net/rfc/session.user.return-value + * @var mixed + */ + protected $_success, $_failure; + // ------------------------------------------------------------------------ /** @@ -85,6 +97,17 @@ abstract class CI_Session_driver implements SessionHandlerInterface { public function __construct(&$params) { $this->_config =& $params; + + if (is_php('7')) + { + $this->_success = TRUE; + $this->_failure = FALSE; + } + else + { + $this->_success = 0; + $this->_failure = -1; + } } // ------------------------------------------------------------------------ diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 72b39d12d..40a358fb8 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -125,9 +125,12 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan */ public function open($save_path, $name) { - return empty($this->_db->conn_id) - ? (bool) $this->_db->db_connect() - : TRUE; + if (empty($this->_db->conn_id) && ! $this->_db->db_connect()) + { + return $this->_failure; + } + + return $this->_success; } // ------------------------------------------------------------------------ @@ -201,7 +204,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { - return FALSE; + return $this->_failure; } $this->_row_exists = FALSE; @@ -209,7 +212,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan } elseif ($this->_lock === FALSE) { - return FALSE; + return $this->_failure; } if ($this->_row_exists === FALSE) @@ -224,10 +227,11 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan if ($this->_db->insert($this->_config['save_path'], $insert_data)) { $this->_fingerprint = md5($session_data); - return $this->_row_exists = TRUE; + $this->_row_exists = TRUE; + return $this->_success; } - return FALSE; + return $this->_failure; } $this->_db->where('id', $session_id); @@ -247,10 +251,10 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan if ($this->_db->update($this->_config['save_path'], $update_data)) { $this->_fingerprint = md5($session_data); - return TRUE; + return $this->_success; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -264,9 +268,9 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan */ public function close() { - return ($this->_lock) - ? $this->_release_lock() - : TRUE; + return ($this->_lock && ! $this->_release_lock()) + ? $this->_failure + : $this->_success; } // ------------------------------------------------------------------------ @@ -289,12 +293,19 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan $this->_db->where('ip_address', $_SERVER['REMOTE_ADDR']); } - return $this->_db->delete($this->_config['save_path']) - ? ($this->close() && $this->_cookie_destroy()) - : FALSE; + if ( ! $this->_db->delete($this->_config['save_path'])) + { + return $this->_failure; + } + } + + if ($this->close()) + { + $this->_cookie_destroy(); + return $this->_success; } - return ($this->close() && $this->_cookie_destroy()); + return $this->_failure; } // ------------------------------------------------------------------------ @@ -309,7 +320,9 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan */ public function gc($maxlifetime) { - return $this->_db->delete($this->_config['save_path'], 'timestamp < '.(time() - $maxlifetime)); + return ($this->_db->delete($this->_config['save_path'], 'timestamp < '.(time() - $maxlifetime))) + ? $this->_success + : $this->_failure; } // ------------------------------------------------------------------------ @@ -390,4 +403,4 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return parent::_release_lock(); } -} +} \ No newline at end of file diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 173b43710..f0f055f87 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -129,7 +129,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle .$name // we'll use the session cookie name as a prefix to avoid collisions .($this->_config['match_ip'] ? md5($_SERVER['REMOTE_ADDR']) : ''); - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ @@ -156,13 +156,13 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle if (($this->_file_handle = fopen($this->_file_path.$session_id, 'w+b')) === FALSE) { log_message('error', "Session: File '".$this->_file_path.$session_id."' doesn't exist and cannot be created."); - return FALSE; + return $this->_failure; } } elseif (($this->_file_handle = fopen($this->_file_path.$session_id, 'r+b')) === FALSE) { log_message('error', "Session: Unable to open file '".$this->_file_path.$session_id."'."); - return FALSE; + return $this->_failure; } if (flock($this->_file_handle, LOCK_EX) === FALSE) @@ -170,7 +170,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle log_message('error', "Session: Unable to obtain lock for file '".$this->_file_path.$session_id."'."); fclose($this->_file_handle); $this->_file_handle = NULL; - return FALSE; + return $this->_failure; } // Needed by write() to detect session_regenerate_id() calls @@ -187,7 +187,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle // See https://github.com/bcit-ci/CodeIgniter/issues/4039 elseif ($this->_file_handler === FALSE) { - return FALSE; + return $this->_failure; } else { @@ -226,18 +226,18 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle // and we need to close the old handle and open a new one if ($session_id !== $this->_session_id && ( ! $this->close() OR $this->read($session_id) === FALSE)) { - return FALSE; + return $this->_failure; } if ( ! is_resource($this->_file_handle)) { - return FALSE; + return $this->_failure; } elseif ($this->_fingerprint === md5($session_data)) { - return ($this->_file_new) - ? TRUE - : touch($this->_file_path.$session_id); + return ( ! $this->_file_new && ! touch($this->_file_path.$session_id)) + ? $this->_failure + : $this->_success; } if ( ! $this->_file_new) @@ -260,12 +260,12 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle { $this->_fingerprint = md5(substr($session_data, 0, $written)); log_message('error', 'Session: Unable to write data.'); - return FALSE; + return $this->_failure; } } $this->_fingerprint = md5($session_data); - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ @@ -285,10 +285,9 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle fclose($this->_file_handle); $this->_file_handle = $this->_file_new = $this->_session_id = NULL; - return TRUE; } - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ @@ -305,19 +304,31 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle { if ($this->close()) { - return file_exists($this->_file_path.$session_id) - ? (unlink($this->_file_path.$session_id) && $this->_cookie_destroy()) - : TRUE; + if (file_exists($this->_file_path.$session_id)) + { + $this->_cookie_destroy(); + return unlink($this->_file_path.$session_id) + ? $this->_success + : $this->_failure; + } + + return $this->_success; } elseif ($this->_file_path !== NULL) { clearstatcache(); - return file_exists($this->_file_path.$session_id) - ? (unlink($this->_file_path.$session_id) && $this->_cookie_destroy()) - : TRUE; + if (file_exists($this->_file_path.$session_id)) + { + $this->_cookie_destroy(); + return unlink($this->_file_path.$session_id) + ? $this->_success + : $this->_failure; + } + + return $this->_success; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -335,7 +346,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle if ( ! is_dir($this->_config['save_path']) OR ($directory = opendir($this->_config['save_path'])) === FALSE) { log_message('debug', "Session: Garbage collector couldn't list files under directory '".$this->_config['save_path']."'."); - return FALSE; + return $this->_failure; } $ts = time() - $maxlifetime; @@ -362,7 +373,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle closedir($directory); - return TRUE; + return $this->_success; } -} +} \ No newline at end of file diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 97b860588..760239dfb 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -117,7 +117,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { $this->_memcached = NULL; log_message('error', 'Session: Invalid Memcached save path format: '.$this->_config['save_path']); - return FALSE; + return $this->_failure; } foreach ($matches as $match) @@ -142,10 +142,10 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if (empty($server_list)) { log_message('error', 'Session: Memcached server pool is empty.'); - return FALSE; + return $this->_failure; } - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ @@ -170,7 +170,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return $session_data; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -188,14 +188,14 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if ( ! isset($this->_memcached)) { - return FALSE; + return $this->_failure; } // Was the ID regenerated? elseif ($session_id !== $this->_session_id) { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { - return FALSE; + return $this->_failure; } $this->_fingerprint = md5(''); @@ -210,16 +210,18 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if ($this->_memcached->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) { $this->_fingerprint = $fingerprint; - return TRUE; + return $this->_success; } - return FALSE; + return $this->_failure; } - return $this->_memcached->touch($this->_key_prefix.$session_id, $this->_config['expiration']); + return $this->_memcached->touch($this->_key_prefix.$session_id, $this->_config['expiration']) + ? $this->_success + : $this->_failure; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -238,14 +240,14 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa isset($this->_lock_key) && $this->_memcached->delete($this->_lock_key); if ( ! $this->_memcached->quit()) { - return FALSE; + return $this->_failure; } $this->_memcached = NULL; - return TRUE; + return $this->_success; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -263,10 +265,11 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if (isset($this->_memcached, $this->_lock_key)) { $this->_memcached->delete($this->_key_prefix.$session_id); - return $this->_cookie_destroy(); + $this->_cookie_destroy(); + return $this->_success; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -282,7 +285,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa public function gc($maxlifetime) { // Not necessary, Memcached takes care of that. - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ @@ -299,7 +302,9 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if (isset($this->_lock_key)) { - return $this->_memcached->replace($this->_lock_key, time(), 300); + return ($this->_memcached->replace($this->_lock_key, time(), 300)) + ? $this->_success + : $this->_failure; } // 30 attempts to obtain a lock, in case another request already has it @@ -316,7 +321,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if ( ! $this->_memcached->set($lock_key, time(), 300)) { log_message('error', 'Session: Error while trying to obtain lock for '.$this->_key_prefix.$session_id); - return FALSE; + return $this->_failure; } $this->_lock_key = $lock_key; @@ -327,11 +332,11 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if ($attempt === 30) { log_message('error', 'Session: Unable to obtain lock for '.$this->_key_prefix.$session_id.' after 30 attempts, aborting.'); - return FALSE; + return $this->_failure; } $this->_lock = TRUE; - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index b098cc441..e8915306f 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -124,7 +124,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { if (empty($this->_config['save_path'])) { - return FALSE; + return $this->_failure; } $redis = new Redis(); @@ -143,10 +143,10 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle else { $this->_redis = $redis; - return TRUE; + return $this->_success; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -171,7 +171,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $session_data; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -189,14 +189,14 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { if ( ! isset($this->_redis)) { - return FALSE; + return $this->_failure; } // Was the ID regenerated? elseif ($session_id !== $this->_session_id) { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { - return FALSE; + return $this->_failure; } $this->_fingerprint = md5(''); @@ -211,16 +211,18 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) { $this->_fingerprint = $fingerprint; - return TRUE; + return $this->_success; } - return FALSE; + return $this->_failure; } - return $this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration']); + return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) + ? $this->_success + : $this->_failure; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -242,7 +244,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle isset($this->_lock_key) && $this->_redis->delete($this->_lock_key); if ( ! $this->_redis->close()) { - return FALSE; + return $this->_failure; } } } @@ -252,10 +254,10 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle } $this->_redis = NULL; - return TRUE; + return $this->_success; } - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ @@ -277,10 +279,11 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle log_message('debug', 'Session: Redis::delete() expected to return 1, got '.var_export($result, TRUE).' instead.'); } - return $this->_cookie_destroy(); + $this->_cookie_destroy(); + return $this->_success; } - return FALSE; + return $this->_failure; } // ------------------------------------------------------------------------ @@ -296,7 +299,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle public function gc($maxlifetime) { // Not necessary, Redis takes care of that. - return TRUE; + return $this->_success; } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f4e51588a..caa4455d8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4283) - :doc:`String Helper ` function :php:func:`alternator()` couldn't be called without arguments. - Fixed a bug (#4306) - :doc:`Database ` method ``version()`` didn't work properly with the 'mssql' driver. - Fixed a bug (#4039) - :doc:`Session Library ` could generate multiple (redundant) warnings in case of a read failure with the 'files' driver, due to a bug in PHP. +- Fixed a bug where :doc:`Session Library ` didn't have proper error handling on PHP 5 (due to a PHP bug). Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 97ecf2fcce8e3133e286e16de1b49612235a8dcf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Dec 2015 17:26:28 +0200 Subject: Complete the proposed changes from PR #4300 --- system/database/DB_driver.php | 19 +++---------------- user_guide_src/source/changelog.rst | 2 +- .../source/database/db_driver_reference.rst | 1 + 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index f3aeb7f81..418de27c8 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -381,6 +381,7 @@ abstract class CI_DB_driver { * Initialize Database Settings * * @return bool + * @throws RuntimeException In case of failure */ public function initialize() { @@ -429,14 +430,7 @@ abstract class CI_DB_driver { // We still don't have a connection? if ( ! $this->conn_id) { - log_message('error', 'Unable to connect to the database'); - - if ($this->db_debug) - { - $this->display_error('db_unable_to_connect'); - } - - throw new RuntimeException('Database connection failure.'); + throw new RuntimeException('Unable to connect to the database.'); } } @@ -751,14 +745,7 @@ abstract class CI_DB_driver { */ public function simple_query($sql) { - if ( ! $this->conn_id) - { - if ( ! $this->initialize()) - { - return FALSE; - } - } - + empty($this->conn_id) && $this->initialize(); return $this->_execute($sql); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5a41fa18b..1ea34eee6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,7 +13,7 @@ Release Date: Not Released - Database - - CI_DB_driver::initialize() throws a "Database connection failure." RuntimeException if couldn't connect to the database. + - Failure to initialize a database connection will now throw a ``RuntimeException``. Version 3.0.4 diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1e436ede1..f0a438883 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -19,6 +19,7 @@ This article is intended to be a reference for them. :returns: TRUE on success, FALSE on failure :rtype: bool + :throws: RuntimeException In case of failure Initialize database settings, establish a connection to the database. -- cgit v1.2.3-24-g4f1b From ce8fa5acfe0e7f9d8b974fa470201a9404667b3d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 12:57:09 +0200 Subject: Fix #4312 --- system/libraries/Form_validation.php | 9 +++------ user_guide_src/source/changelog.rst | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index a158225ee..c2212585d 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -415,12 +415,9 @@ class CI_Form_validation { */ public function run($group = '') { - // Do we even have any data to process? Mm? - $validation_array = empty($this->validation_data) ? $_POST : $this->validation_data; - if (count($validation_array) === 0) - { - return FALSE; - } + $validation_array = empty($this->validation_data) + ? $_POST + : $this->validation_data; // Does the _field_data array containing the validation rules exist? // If not, we look to see if they were assigned via a config file diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index caa4455d8..ab08c2f6e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4306) - :doc:`Database ` method ``version()`` didn't work properly with the 'mssql' driver. - Fixed a bug (#4039) - :doc:`Session Library ` could generate multiple (redundant) warnings in case of a read failure with the 'files' driver, due to a bug in PHP. - Fixed a bug where :doc:`Session Library ` didn't have proper error handling on PHP 5 (due to a PHP bug). +- Fixed a bug (#4312) - :doc:`Form Validation Library ` didn't provide error feedback for failed validation on empty requests. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 27ba5e6957c9e245478285191b5a88df4bcdc5bb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 13:05:33 +0200 Subject: Close #4313 --- system/database/DB_driver.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 25e70ec3f..bfe9dd4b0 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -504,6 +504,18 @@ abstract class CI_DB_driver { // -------------------------------------------------------------------- + /** + * Last error + * + * @return array + */ + public function error() + { + return array('code' => NULL, 'message' => NULL); + } + + // -------------------------------------------------------------------- + /** * Set client character set * -- cgit v1.2.3-24-g4f1b From bc05b84995d5425d6bdc28c43174e70b720840ce Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 16:22:33 +0200 Subject: Fix version() for Oracle DB drivers --- system/database/drivers/oci8/oci8_driver.php | 8 ++++++-- .../drivers/pdo/subdrivers/pdo_oci_driver.php | 23 ++++++++++++++++++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 916ddeb90..206924d06 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -252,12 +252,16 @@ class CI_DB_oci8_driver extends CI_DB { return $this->data_cache['version']; } - if ( ! $this->conn_id OR ($version = oci_server_version($this->conn_id)) === FALSE) + if ( ! $this->conn_id OR ($version_string = oci_server_version($this->conn_id)) === FALSE) { return FALSE; } + elseif (preg_match('#Release\s(\d+(?:\.\d+)+)#', $version_string, $match)) + { + return $this->data_cache['version'] = $match[1]; + } - return $this->data_cache['version'] = $version; + return FALSE; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index d17e311f7..4791ab157 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -129,6 +129,29 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { // -------------------------------------------------------------------- + /** + * Database version number + * + * @return string + */ + public function version() + { + if (isset($this->data_cache['version'])) + { + return $this->data_cache['version']; + } + + $version_string = parent::version(); + if (preg_match('#Release\s(?\d+(?:\.\d+)+)#', $version_string, $match)) + { + return $this->data_cache['version'] = $match[1]; + } + + return FALSE; + } + + // -------------------------------------------------------------------- + /** * Show table query * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ab08c2f6e..3b832b3a9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4039) - :doc:`Session Library ` could generate multiple (redundant) warnings in case of a read failure with the 'files' driver, due to a bug in PHP. - Fixed a bug where :doc:`Session Library ` didn't have proper error handling on PHP 5 (due to a PHP bug). - Fixed a bug (#4312) - :doc:`Form Validation Library ` didn't provide error feedback for failed validation on empty requests. +- Fixed a bug where :doc:`Database ` method `version()` returned banner text instead of only the version number with the 'oci8' and 'pdo/oci' drivers. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 85bc9fc53e4c3e46b2f4e1b1eac7e2828d4869e6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 17:56:14 +0200 Subject: Change DB charset handling Close #4311 --- system/database/DB_driver.php | 32 +-------------- system/database/drivers/mssql/mssql_driver.php | 14 +------ system/database/drivers/mysql/mysql_driver.php | 31 ++++++++------- system/database/drivers/mysqli/mysqli_driver.php | 20 ++++------ system/database/drivers/postgre/postgre_driver.php | 20 ++++------ user_guide_src/source/changelog.rst | 5 ++- .../source/database/db_driver_reference.rst | 11 +----- user_guide_src/source/installation/upgrade_310.rst | 45 ++++++++++++++++++++++ 8 files changed, 81 insertions(+), 97 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 885a814be..af6b9f399 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -380,7 +380,7 @@ abstract class CI_DB_driver { /** * Initialize Database Settings * - * @return bool + * @return void * @throws RuntimeException In case of failure */ public function initialize() @@ -393,7 +393,7 @@ abstract class CI_DB_driver { */ if ($this->conn_id) { - return TRUE; + return; } // ---------------------------------------------------------------- @@ -433,9 +433,6 @@ abstract class CI_DB_driver { throw new RuntimeException('Unable to connect to the database.'); } } - - // Now we set the character set and that's all - return $this->db_set_charset($this->char_set); } // -------------------------------------------------------------------- @@ -510,31 +507,6 @@ abstract class CI_DB_driver { // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string - * @return bool - */ - public function db_set_charset($charset) - { - if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset)) - { - log_message('error', 'Unable to set database connection charset: '.$charset); - - if ($this->db_debug) - { - $this->display_error('db_unable_to_set_charset', $charset); - } - - return FALSE; - } - - return TRUE; - } - - // -------------------------------------------------------------------- - /** * The name of the platform in use (mysql, mssql, etc...) * diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index b9e310a3a..bf18babeb 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -108,6 +108,7 @@ class CI_DB_mssql_driver extends CI_DB { */ public function db_connect($persistent = FALSE) { + ini_set('mssql.charset', $this->char_set); $this->conn_id = ($persistent) ? mssql_pconnect($this->hostname, $this->username, $this->password) : mssql_connect($this->hostname, $this->username, $this->password); @@ -247,19 +248,6 @@ class CI_DB_mssql_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ - protected function _db_set_charset($charset) - { - return (ini_set('mssql.charset', $charset) !== FALSE); - } - - // -------------------------------------------------------------------- - /** * Version number query string * diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 9c630d0d6..76f50368f 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -147,12 +147,24 @@ class CI_DB_mysql_driver extends CI_DB { : FALSE; } - if ($this->stricton && is_resource($this->conn_id)) + if (is_resource($this->conn_id)) { - $this->simple_query('SET SESSION sql_mode="STRICT_ALL_TABLES"'); + if ( ! mysql_set_charset($this->char_set, $this->conn_id)) + { + log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}')."); + $this->close(); + return ($this->db->debug) ? $this->display_error('db_unable_to_set_charset', $charset) : FALSE; + } + + if ($this->stricton) + { + $this->simple_query('SET SESSION sql_mode="STRICT_ALL_TABLES"'); + } + + return $this->conn_id; } - return $this->conn_id; + return FALSE; } // -------------------------------------------------------------------- @@ -199,19 +211,6 @@ class CI_DB_mysql_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ - protected function _db_set_charset($charset) - { - return mysql_set_charset($charset, $this->conn_id); - } - - // -------------------------------------------------------------------- - /** * Database version number * diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 827470078..f9a20ea2f 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -173,6 +173,13 @@ class CI_DB_mysqli_driver extends CI_DB { return ($this->db->db_debug) ? $this->db->display_error($message, '', TRUE) : FALSE; } + if ( ! $mysqli->set_charset($this->char_set)) + { + log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}')."); + $mysqli->close(); + return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $charset) : FALSE; + } + return $mysqli; } @@ -223,19 +230,6 @@ class CI_DB_mysqli_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ - protected function _db_set_charset($charset) - { - return $this->conn_id->set_charset($charset); - } - - // -------------------------------------------------------------------- - /** * Database version number * diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index b1df326f7..e4db12d69 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -163,6 +163,13 @@ class CI_DB_postgre_driver extends CI_DB { return FALSE; } + if (pg_set_client_encoding($this->conn_id, $charset) !== 0) + { + log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}')."); + pg_close($this->conn_id); + return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $charset) : FALSE; + } + empty($this->schema) OR $this->simple_query('SET search_path TO '.$this->schema.',public'); } @@ -189,19 +196,6 @@ class CI_DB_postgre_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ - protected function _db_set_charset($charset) - { - return (pg_set_client_encoding($this->conn_id, $charset) === 0); - } - - // -------------------------------------------------------------------- - /** * Database version number * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6d7474765..3c0dc8a72 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,8 +13,9 @@ Release Date: Not Released - Database - - Failure to initialize a database connection will now throw a ``RuntimeException``. - + - 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. Version 3.0.4 ============= diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index f0a438883..75d1538bd 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -17,8 +17,7 @@ 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 @@ -62,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/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index 7060ebc4c..37772cd4f 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -12,3 +12,48 @@ 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. -- cgit v1.2.3-24-g4f1b From 2dc9a352b7cb55255b54b5bab6ba2fc83fc86dbe Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 17:57:23 +0200 Subject: Remove PHP 7 from allowed_failures in Travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index adc60d759..5a7eb11b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,6 @@ matrix: allow_failures: - php: 5.2 - php: hhvm - - php: 7 exclude: - php: hhvm env: DB=pgsql -- cgit v1.2.3-24-g4f1b From 377a18a22307692c318235a7420c29d056c1a5c4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 17:57:23 +0200 Subject: Remove PHP 7 from allowed_failures in Travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index adc60d759..5a7eb11b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,6 @@ matrix: allow_failures: - php: 5.2 - php: hhvm - - php: 7 exclude: - php: hhvm env: DB=pgsql -- cgit v1.2.3-24-g4f1b From d3c8134b1342dc403df2faf3e63e4bdcdfbd4b92 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 18:01:25 +0200 Subject: Adjust test case for changes from 85bc9fc53e4c3e46b2f4e1b1eac7e2828d4869e6 --- tests/codeigniter/database/DB_driver_test.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/codeigniter/database/DB_driver_test.php b/tests/codeigniter/database/DB_driver_test.php index 26416d3fc..13e9abf84 100644 --- a/tests/codeigniter/database/DB_driver_test.php +++ b/tests/codeigniter/database/DB_driver_test.php @@ -7,8 +7,6 @@ class DB_driver_test extends CI_TestCase { $config = Mock_Database_DB::config(DB_DRIVER); sscanf(DB_DRIVER, '%[^/]/', $driver_name); $driver = $this->{$driver_name}($config[DB_DRIVER]); - - $this->assertTrue($driver->initialize()); } protected function pdo($config) -- cgit v1.2.3-24-g4f1b From f437fd20a78b9f28405d1ebba5f7ed53b1a33545 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 18:06:49 +0200 Subject: Fix erroneous variables from 85bc9fc53e4c3e46b2f4e1b1eac7e2828d4869e6 --- system/database/drivers/mysql/mysql_driver.php | 2 +- system/database/drivers/mysqli/mysqli_driver.php | 2 +- system/database/drivers/postgre/postgre_driver.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 76f50368f..3fafe3fd8 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -153,7 +153,7 @@ class CI_DB_mysql_driver extends CI_DB { { log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}')."); $this->close(); - return ($this->db->debug) ? $this->display_error('db_unable_to_set_charset', $charset) : FALSE; + return ($this->db->debug) ? $this->display_error('db_unable_to_set_charset', $this->char_set) : FALSE; } if ($this->stricton) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index f9a20ea2f..847544780 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -177,7 +177,7 @@ class CI_DB_mysqli_driver extends CI_DB { { log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}')."); $mysqli->close(); - return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $charset) : FALSE; + return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $this->char_set) : FALSE; } return $mysqli; diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index e4db12d69..2d4e5a5d5 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -163,11 +163,11 @@ class CI_DB_postgre_driver extends CI_DB { return FALSE; } - if (pg_set_client_encoding($this->conn_id, $charset) !== 0) + if (pg_set_client_encoding($this->conn_id, $this->char_set) !== 0) { log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}')."); pg_close($this->conn_id); - return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $charset) : FALSE; + return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $this->char_set) : FALSE; } empty($this->schema) OR $this->simple_query('SET search_path TO '.$this->schema.',public'); -- cgit v1.2.3-24-g4f1b From 2d6d9ab0bfeb546d8c9d7924af7ccc095f798e41 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 15 Dec 2015 12:32:50 +0200 Subject: Really fix #4039 A typo from 8df6efd402180a6361b4dd619f5535d6c2bed334 --- system/libraries/Session/drivers/Session_files_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index f0f055f87..1a943d5c9 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -185,7 +185,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle } // We shouldn't need this, but apparently we do ... // See https://github.com/bcit-ci/CodeIgniter/issues/4039 - elseif ($this->_file_handler === FALSE) + elseif ($this->_file_handle === FALSE) { return $this->_failure; } -- cgit v1.2.3-24-g4f1b From bb71dbadb7441a97a09e1e6d90fbddc884af67d1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 15 Dec 2015 13:00:52 +0200 Subject: Fix logical errors from af849696d43f5c3b68962af1ae5096151a6d9f1a --- system/libraries/Session/drivers/Session_database_driver.php | 2 +- system/libraries/Session/drivers/Session_files_driver.php | 4 ++-- system/libraries/Session/drivers/Session_redis_driver.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 40a358fb8..f2adacb6b 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -299,7 +299,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan } } - if ($this->close()) + if ($this->close() === $this->_success) { $this->_cookie_destroy(); return $this->_success; diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 1a943d5c9..c540996a7 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -224,7 +224,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle { // If the two IDs don't match, we have a session_regenerate_id() call // and we need to close the old handle and open a new one - if ($session_id !== $this->_session_id && ( ! $this->close() OR $this->read($session_id) === FALSE)) + if ($session_id !== $this->_session_id && ($this->close() === $this->_failure OR $this->read($session_id) === $this->_failure)) { return $this->_failure; } @@ -302,7 +302,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle */ public function destroy($session_id) { - if ($this->close()) + if ($this->close() === $this->_success) { if (file_exists($this->_file_path.$session_id)) { diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index e8915306f..b60ef6b34 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -242,7 +242,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->ping() === '+PONG') { isset($this->_lock_key) && $this->_redis->delete($this->_lock_key); - if ( ! $this->_redis->close()) + if ($this->_redis->close() === $this->_failure) { return $this->_failure; } -- cgit v1.2.3-24-g4f1b From 3933a3f8a96346d45d98d2c15a41b14ec1f970b2 Mon Sep 17 00:00:00 2001 From: Suhindra Date: Thu, 17 Dec 2015 09:04:05 +0700 Subject: added Vivaldi browser added new browser Vivaldi --- application/config/user_agents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 1129dbacd..721ec08d3 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -87,7 +87,8 @@ $browsers = array( 'amaya' => 'Amaya', 'IBrowse' => 'IBrowse', 'Maxthon' => 'Maxthon', - 'Ubuntu' => 'Ubuntu Web Browser' + 'Ubuntu' => 'Ubuntu Web Browser', + 'Vivaldi' => 'Vivaldi' ); $mobiles = array( -- cgit v1.2.3-24-g4f1b From db68d401f67496ba5e495dd36adabe6d85187b44 Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 21 Dec 2015 11:33:57 -0500 Subject: Refactoring the `CI_Log` line formatting - Extracting the `CI_Log` line formatting into a protected function `_format_log_line()` so as to make it easy to change the log line format via extending the class and overriding the method. --- system/core/Log.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/system/core/Log.php b/system/core/Log.php index e8cb401f5..cf2793a56 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -204,7 +204,7 @@ class CI_Log { $date = date($this->_date_fmt); } - $message .= $level.' - '.$date.' --> '.$msg."\n"; + $message .= $this->_format_log_line($level, $date, $msg); flock($fp, LOCK_EX); @@ -227,4 +227,20 @@ class CI_Log { return is_int($result); } + /** + * Format the log line. + * + * This is for extensibility of log formatting. + * If you want to change the log format, + * extend the CI_Log class and override this method. + * + * @param $level + * @param $date + * @param $msg + * + * @return string formatted log line with a new line character '\n' at the end. + */ + protected function _format_log_line($level, $date, $msg){ + return $level.' - '.$date.' --> '.$msg."\n"; + } } -- cgit v1.2.3-24-g4f1b From 3ac1fd1af92a1d45f9624fff99f5e0692c59d7c6 Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 21 Dec 2015 12:27:40 -0500 Subject: fixing my blatant mistakes in styling the code --- system/core/Log.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/core/Log.php b/system/core/Log.php index cf2793a56..0e1f7e2ac 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -234,13 +234,13 @@ class CI_Log { * If you want to change the log format, * extend the CI_Log class and override this method. * - * @param $level - * @param $date - * @param $msg - * - * @return string formatted log line with a new line character '\n' at the end. + * @param string the error level: 'error', 'debug' or 'info' + * @param string formatted date string + * @param string the log message + * @return string formatted log line with a new line character '\n' at the end. */ - protected function _format_log_line($level, $date, $msg){ + protected function _format_log_line($level, $date, $msg) + { return $level.' - '.$date.' --> '.$msg."\n"; } } -- cgit v1.2.3-24-g4f1b From f3b711fd9f7d8e096bf774f9c6cfc0a4ca075919 Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 28 Dec 2015 15:19:31 -0500 Subject: Refactor: logic to get the rule's error message --- system/libraries/Form_validation.php | 73 +++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index c2212585d..12cfdff43 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -637,21 +637,7 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - // Check if a custom message is defined - if (isset($this->_field_data[$row['field']]['errors'][$type])) - { - $line = $this->_field_data[$row['field']]['errors'][$type]; - } - elseif (isset($this->_error_messages[$type])) - { - $line = $this->_error_messages[$type]; - } - elseif (FALSE === ($line = $this->CI->lang->line('form_validation_'.$type)) - // DEPRECATED support for non-prefixed keys - && FALSE === ($line = $this->CI->lang->line($type, FALSE))) - { - $line = 'The field was not set'; - } + $line = $this->_get_raw_error_message($type, $row); // Build the error message $message = $this->_build_error_msg($line, $this->_translate_fieldname($row['label'])); @@ -820,23 +806,9 @@ class CI_Form_validation { { $line = $this->CI->lang->line('form_validation_error_message_not_set').'(Anonymous function)'; } - // Check if a custom message is defined - elseif (isset($this->_field_data[$row['field']]['errors'][$rule])) - { - $line = $this->_field_data[$row['field']]['errors'][$rule]; - } - elseif ( ! isset($this->_error_messages[$rule])) - { - if (FALSE === ($line = $this->CI->lang->line('form_validation_'.$rule)) - // DEPRECATED support for non-prefixed keys - && FALSE === ($line = $this->CI->lang->line($rule, FALSE))) - { - $line = $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')'; - } - } else { - $line = $this->_error_messages[$rule]; + $line = $this->_get_raw_error_message($rule, $row); } // Is the parameter we are inserting into the error message the name @@ -864,6 +836,47 @@ class CI_Form_validation { // -------------------------------------------------------------------- + /** + * Get the error message for the rule + * + * @param string the rule name. + * @param array + * @return string + */ + private function _get_raw_error_message($key, $row) + { + $error_message = ''; + // Check if a custom message is defined through validation config row. + if (isset($this->_field_data[$row['field']]['errors'][$key])) + { + $error_message = $this->_field_data[$row['field']]['errors'][$key]; + } + // check if a custom message has been set using the set_message() function + elseif (isset($this->_error_messages[$key])) + { + $error_message = $this->_error_messages[$key]; + } + // check if we have an error message in lang file + elseif (FALSE !== ($line_tmp = $this->CI->lang->line('form_validation_'.$key))) + { + $error_message = $line_tmp; + } + // DEPRECATED support for non-prefixed keys, lang file again + elseif (FALSE !== ($line_tmp = $this->CI->lang->line($key, FALSE))) + { + $error_message = $line_tmp; + } + //error message not found + else + { + $error_message = $this->CI->lang->line('form_validation_error_message_not_set').'('.$key.')'; + } + + return $error_message; + } + + // -------------------------------------------------------------------- + /** * Translate a field name * -- cgit v1.2.3-24-g4f1b From 0951e58f94c970a03f8ac2d5cba31d122bfa948a Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 28 Dec 2015 15:28:02 -0500 Subject: renamed variable for better readability. --- system/libraries/Form_validation.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 12cfdff43..a34694bfe 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -843,33 +843,33 @@ class CI_Form_validation { * @param array * @return string */ - private function _get_raw_error_message($key, $row) + private function _get_raw_error_message($rule_name, $row) { $error_message = ''; - // Check if a custom message is defined through validation config row. - if (isset($this->_field_data[$row['field']]['errors'][$key])) + // check if a custom message is defined through validation config row. + if (isset($this->_field_data[$row['field']]['errors'][$rule_name])) { - $error_message = $this->_field_data[$row['field']]['errors'][$key]; + $error_message = $this->_field_data[$row['field']]['errors'][$rule_name]; } // check if a custom message has been set using the set_message() function - elseif (isset($this->_error_messages[$key])) + elseif (isset($this->_error_messages[$rule_name])) { - $error_message = $this->_error_messages[$key]; + $error_message = $this->_error_messages[$rule_name]; } // check if we have an error message in lang file - elseif (FALSE !== ($line_tmp = $this->CI->lang->line('form_validation_'.$key))) + elseif (FALSE !== ($line_tmp = $this->CI->lang->line('form_validation_'.$rule_name))) { $error_message = $line_tmp; } // DEPRECATED support for non-prefixed keys, lang file again - elseif (FALSE !== ($line_tmp = $this->CI->lang->line($key, FALSE))) + elseif (FALSE !== ($line_tmp = $this->CI->lang->line($rule_name, FALSE))) { $error_message = $line_tmp; } - //error message not found + // error message not found else { - $error_message = $this->CI->lang->line('form_validation_error_message_not_set').'('.$key.')'; + $error_message = $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule_name.')'; } return $error_message; -- cgit v1.2.3-24-g4f1b From 0f13e09ebb153315539e1ff7f77698f2709996b5 Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 28 Dec 2015 15:45:03 -0500 Subject: block comment formatting --- system/libraries/Form_validation.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index a34694bfe..c37a73418 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -839,9 +839,9 @@ class CI_Form_validation { /** * Get the error message for the rule * - * @param string the rule name. - * @param array - * @return string + * @param string the rule name. + * @param array + * @return string */ private function _get_raw_error_message($rule_name, $row) { -- cgit v1.2.3-24-g4f1b From 20105a70a79c39aeffb06861e982558610ec8a43 Mon Sep 17 00:00:00 2001 From: Gordon Murray Date: Tue, 29 Dec 2015 13:24:34 +0000 Subject: Renamed Step 20 to Step 21 There were two Step 20's --- user_guide_src/source/installation/upgrade_300.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index a29f400f8..45ce21320 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -855,7 +855,7 @@ It is now deprecated and scheduled for removal in CodeIgniter 3.1+. sooner rather than later. *********************************************************** -Step 20: Check your usage of Text helper highlight_phrase() +Step 21: Check your usage of Text helper highlight_phrase() *********************************************************** The default HTML tag used by :doc:`Text Helper <../helpers/text_helper>` function -- cgit v1.2.3-24-g4f1b From f3ddda7ee890d5375f5c4fece118b7663dc465e2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 30 Dec 2015 21:38:54 +0200 Subject: Fix #4331 --- system/database/drivers/mysqli/mysqli_driver.php | 37 +++++++++++++++--------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 827470078..693a96bab 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -97,6 +97,17 @@ class CI_DB_mysqli_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * MySQLi object + * + * Has to be preserved without being assigned to $conn_id. + * + * @var MySQLi + */ + protected $_mysqli; + + // -------------------------------------------------------------------- + /** * Database connection * @@ -122,13 +133,13 @@ class CI_DB_mysqli_driver extends CI_DB { } $client_flags = ($this->compress === TRUE) ? MYSQLI_CLIENT_COMPRESS : 0; - $mysqli = mysqli_init(); + $this->_mysqli = mysqli_init(); - $mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10); + $this->_mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10); if ($this->stricton) { - $mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode="STRICT_ALL_TABLES"'); + $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode="STRICT_ALL_TABLES"'); } if (is_array($this->encrypt)) @@ -144,11 +155,11 @@ class CI_DB_mysqli_driver extends CI_DB { { if ( ! empty($this->encrypt['ssl_verify']) && defined('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT')) { - $mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE); + $this->_mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE); } $client_flags |= MYSQLI_CLIENT_SSL; - $mysqli->ssl_set( + $this->_mysqli->ssl_set( isset($ssl['key']) ? $ssl['key'] : NULL, isset($ssl['cert']) ? $ssl['cert'] : NULL, isset($ssl['ca']) ? $ssl['ca'] : NULL, @@ -158,22 +169,22 @@ class CI_DB_mysqli_driver extends CI_DB { } } - if ($mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags)) + if ($this->_mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags)) { // Prior to version 5.7.3, MySQL silently downgrades to an unencrypted connection if SSL setup fails if ( ($client_flags & MYSQLI_CLIENT_SSL) - && version_compare($mysqli->client_info, '5.7.3', '<=') - && empty($mysqli->query("SHOW STATUS LIKE 'ssl_cipher'")->fetch_object()->Value) + && version_compare($this->_mysqli->client_info, '5.7.3', '<=') + && empty($this->_mysqli->query("SHOW STATUS LIKE 'ssl_cipher'")->fetch_object()->Value) ) { - $mysqli->close(); + $this->_mysqli->close(); $message = 'MySQLi was configured for an SSL connection, but got an unencrypted connection instead!'; log_message('error', $message); return ($this->db->db_debug) ? $this->db->display_error($message, '', TRUE) : FALSE; } - return $mysqli; + return $this->_mysqli; } return FALSE; @@ -457,11 +468,11 @@ class CI_DB_mysqli_driver extends CI_DB { */ public function error() { - if ( ! empty($this->conn_id->connect_errno)) + if ( ! empty($this->_mysqli->connect_errno)) { return array( - 'code' => $this->conn_id->connect_errno, - 'message' => is_php('5.2.9') ? $this->conn_id->connect_error : mysqli_connect_error() + 'code' => $this->_mysqli->connect_errno, + 'message' => is_php('5.2.9') ? $this->_mysqli->connect_error : mysqli_connect_error() ); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3b832b3a9..3f2204847 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.0.4 - Fixed a bug where :doc:`Session Library ` didn't have proper error handling on PHP 5 (due to a PHP bug). - Fixed a bug (#4312) - :doc:`Form Validation Library ` didn't provide error feedback for failed validation on empty requests. - Fixed a bug where :doc:`Database ` method `version()` returned banner text instead of only the version number with the 'oci8' and 'pdo/oci' drivers. +- Fixed a bug (#4331) - :doc:`Database ` method ``error()`` didn't really work for connection errors with the 'mysqli' driver. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 9d84d3cb5cb2dd4044e57bfcbe81c423adab6d7c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 30 Dec 2015 21:50:20 +0200 Subject: Fix #4343 --- system/libraries/Email.php | 3 +-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 034586ac9..754dd1784 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1854,8 +1854,7 @@ class CI_Email { // is popen() enabled? if ( ! function_usable('popen') OR FALSE === ($fp = @popen( - $this->mailpath.' -oi -f '.$this->clean_email($this->_headers['From']) - .' -t -r '.$this->clean_email($this->_headers['Return-Path']) + $this->mailpath.' -oi -f '.$this->clean_email($this->_headers['From']).' -t' , 'w')) ) // server probably has popen disabled, so nothing we can do to get a verbose error. { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3f2204847..09b51ce68 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -29,6 +29,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4312) - :doc:`Form Validation Library ` didn't provide error feedback for failed validation on empty requests. - Fixed a bug where :doc:`Database ` method `version()` returned banner text instead of only the version number with the 'oci8' and 'pdo/oci' drivers. - Fixed a bug (#4331) - :doc:`Database ` method ``error()`` didn't really work for connection errors with the 'mysqli' driver. +- Fixed a bug (#4343) - :doc:`Email Library ` failing with a *"More than one 'from' person"* message when using *sendmail*. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From f603b44cbc497b85fe31fbf0bb4bf170d964f40d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 30 Dec 2015 21:53:40 +0200 Subject: Merge pull request #4345 from murrion/develop [ci skip] Corrected step 21 number in 3.0.0 upgrade instructions --- user_guide_src/source/installation/upgrade_300.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index a29f400f8..45ce21320 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -855,7 +855,7 @@ It is now deprecated and scheduled for removal in CodeIgniter 3.1+. sooner rather than later. *********************************************************** -Step 20: Check your usage of Text helper highlight_phrase() +Step 21: Check your usage of Text helper highlight_phrase() *********************************************************** The default HTML tag used by :doc:`Text Helper <../helpers/text_helper>` function -- cgit v1.2.3-24-g4f1b From 673413e06d05b5695bd7cc1d90c9d66a93aaa955 Mon Sep 17 00:00:00 2001 From: paranic Date: Sat, 2 Jan 2016 00:21:52 +0200 Subject: typo correction to avoid copy paste error --- user_guide_src/source/libraries/image_lib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index 40a280b5c..d5c24c1b0 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -471,4 +471,4 @@ Class Reference Returns all detected errors formatted as a string. :: - echo $this->image_lib->diplay_errors(); \ No newline at end of file + echo $this->image_lib->display_errors(); -- cgit v1.2.3-24-g4f1b From 6bb9170b2f19b5b327e5c6998cbce414c5d28b50 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 2 Jan 2016 02:14:20 +0200 Subject: Merge pull request #4353 from paranic/patch-1 [ci skip] Docs typo correction --- user_guide_src/source/libraries/image_lib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index e5f7c000f..27d2eb98c 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -471,4 +471,4 @@ Class Reference Returns all detected errors formatted as a string. :: - echo $this->image_lib->diplay_errors(); \ No newline at end of file + echo $this->image_lib->display_errors(); -- cgit v1.2.3-24-g4f1b From 0b1efb38293416b13aee8d1d9505e97d2efade5f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Jan 2016 12:34:14 +0200 Subject: Fix #4350 --- system/core/Loader.php | 32 +++++++++++++++++++++++++++++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 18e4c5287..87f21b279 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -285,9 +285,39 @@ class CI_Loader { $this->database($db_conn, FALSE, TRUE); } + // Note: All of the code under this condition used to be just: + // + // load_class('Model', 'core'); + // + // However, load_class() instantiates classes + // to cache them for later use and that prevents + // MY_Model from being an abstract class and is + // sub-optimal otherwise anyway. if ( ! class_exists('CI_Model', FALSE)) { - load_class('Model', 'core'); + $app_path = APPPATH.'core'.DIRECTORY_SEPARATOR; + if (file_exists($app_path.'Model.php')) + { + require_once($app_path.'Model.php'); + if ( ! class_exists('CI_Model', FALSE)) + { + throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model"); + } + } + elseif ( ! class_exists('CI_Model', FALSE)) + { + require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php'); + } + + $class = config_item('subclass_prefix').'Model'; + if (file_exists($app_path.$class.'.php')) + { + require_once($app_path.$class.'.php'); + if ( ! class_exists($class, FALSE)) + { + throw new RuntimeException($app_path.$class.".php exists, but doesn't declare class ".$class); + } + } } $model = ucfirst($model); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 09b51ce68..c189767d8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -30,6 +30,7 @@ Bug fixes for 3.0.4 - Fixed a bug where :doc:`Database ` method `version()` returned banner text instead of only the version number with the 'oci8' and 'pdo/oci' drivers. - Fixed a bug (#4331) - :doc:`Database ` method ``error()`` didn't really work for connection errors with the 'mysqli' driver. - Fixed a bug (#4343) - :doc:`Email Library ` failing with a *"More than one 'from' person"* message when using *sendmail*. +- Fixed a bug (#4350) - :doc:`Loader Library ` method ``model()`` logic directly instantiated the ``CI_Model`` or ``MY_Model`` classes. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 0ca9ae6ca109177eb0e80456b097a9d63412517e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jan 2016 14:51:27 +0200 Subject: Fix #4337 --- system/database/drivers/odbc/odbc_driver.php | 18 ++++++++++++++++++ .../drivers/pdo/subdrivers/pdo_odbc_driver.php | 18 ++++++++++++++++++ .../drivers/pdo/subdrivers/pdo_pgsql_driver.php | 7 ++++++- system/database/drivers/postgre/postgre_driver.php | 7 ++++++- user_guide_src/source/changelog.rst | 3 ++- 5 files changed, 50 insertions(+), 3 deletions(-) diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 409284b44..e12ad53bc 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -188,6 +188,24 @@ class CI_DB_odbc_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * Determines if a query is a "write" type. + * + * @param string An SQL query string + * @return bool + */ + public function is_write_type($sql) + { + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + { + return FALSE; + } + + return parent::is_write_type($sql); + } + + // -------------------------------------------------------------------- + /** * Platform-dependant string escape * diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index 51c70b630..4df2de8ba 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -160,6 +160,24 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { // -------------------------------------------------------------------- + /** + * Determines if a query is a "write" type. + * + * @param string An SQL query string + * @return bool + */ + public function is_write_type($sql) + { + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + { + return FALSE; + } + + return parent::is_write_type($sql); + } + + // -------------------------------------------------------------------- + /** * Show table query * diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 2dd41ca87..79c3c7be0 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -154,7 +154,12 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { */ public function is_write_type($sql) { - return (bool) preg_match('/^\s*"?(SET|INSERT(?![^\)]+\)\s+RETURNING)|UPDATE(?!.*\sRETURNING)|DELETE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', str_replace(array("\r\n", "\r", "\n"), ' ', $sql)); + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + { + return FALSE; + } + + return parent::is_write_type($sql); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index b1df326f7..a7a02496b 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -288,7 +288,12 @@ class CI_DB_postgre_driver extends CI_DB { */ public function is_write_type($sql) { - return (bool) preg_match('/^\s*"?(SET|INSERT(?![^\)]+\)\s+RETURNING)|UPDATE(?!.*\sRETURNING)|DELETE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', str_replace(array("\r\n", "\r", "\n"), ' ', $sql)); + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + { + return FALSE; + } + + return parent::is_write_type($sql); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c189767d8..2ac5213ba 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,7 +19,7 @@ Bug fixes for 3.0.4 - Fixed a bug where :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked". - Fixed a bug (#4217) - :doc:`Config Library ` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``. - Fixed a bug where :doc:`CAPTCHA Helper ` entered an infinite loop while generating a random string. -- Fixed a bug (#4223) - :doc:`Database ` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly. +- Fixed a bug (#4223) - :doc:`Database ` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly. - Fixed a bug (#4244) - :doc:`Email Library ` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding. - Fixed a bug (#4245) - :doc:`Database Forge ` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values. - Fixed a bug (#4283) - :doc:`String Helper ` function :php:func:`alternator()` couldn't be called without arguments. @@ -31,6 +31,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4331) - :doc:`Database ` method ``error()`` didn't really work for connection errors with the 'mysqli' driver. - Fixed a bug (#4343) - :doc:`Email Library ` failing with a *"More than one 'from' person"* message when using *sendmail*. - Fixed a bug (#4350) - :doc:`Loader Library ` method ``model()`` logic directly instantiated the ``CI_Model`` or ``MY_Model`` classes. +- Fixed a bug (#4337) - :doc:`Database ` method ``query()`` didn't return a result set for queries with the ``RETURNING`` statement on PostgreSQL. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From e8de9eb4a8bba7cde0d81fe8571bcceed7aef77b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jan 2016 15:53:19 +0200 Subject: [ci skip] Add support for OFFSET with Oracle 12c As requested in #4279 --- system/database/drivers/oci8/oci8_driver.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 206924d06..994f8f33a 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -654,6 +654,14 @@ class CI_DB_oci8_driver extends CI_DB { */ protected function _limit($sql) { + if (version_compare($this->version(), '12.1', '>=')) + { + // OFFSET-FETCH can be used only with the ORDER BY clause + empty($this->qb_orderby) && $sql .= ' ORDER BY 1'; + + return $sql.' OFFSET '.(int) $this->qb_offset.' ROWS FETCH NEXT '.$this->qb_limit.' ROWS ONLY'; + } + $this->limit_used = TRUE; return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($this->qb_offset + $this->qb_limit + 1).')' .($this->qb_offset ? ' WHERE rnum >= '.($this->qb_offset + 1) : ''); -- cgit v1.2.3-24-g4f1b From 79b8a086187f199bb708bd56477850fbf1dd9e91 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 13:55:21 +0200 Subject: Fix #4362 --- system/libraries/Session/drivers/Session_memcached_driver.php | 5 ++++- system/libraries/Session/drivers/Session_redis_driver.php | 5 ++++- user_guide_src/source/changelog.rst | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 760239dfb..9d7ab1172 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -300,7 +300,10 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa */ protected function _get_lock($session_id) { - if (isset($this->_lock_key)) + // PHP 7 reuses the SessionHandler object on regeneration, + // so we need to check here if the lock key is for the + // correct session ID. + if ($this->_lock_key === $this->_key_prefix.$session_id.':lock') { return ($this->_memcached->replace($this->_lock_key, time(), 300)) ? $this->_success diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index b60ef6b34..a31c45372 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -314,7 +314,10 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle */ protected function _get_lock($session_id) { - if (isset($this->_lock_key)) + // PHP 7 reuses the SessionHandler object on regeneration, + // so we need to check here if the lock key is for the + // correct session ID. + if ($this->_lock_key === $this->_key_prefix.$session_id.':lock') { return $this->_redis->setTimeout($this->_lock_key, 300); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2ac5213ba..d63696a77 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -9,8 +9,8 @@ Release Date: Not Released - General Changes - - Updated :doc:`Security Library ` method ``get_random_bytes()`` to use PHP7's ``random_bytes()`` function when possible. - - Updated :doc:`Encryption Library ` method ``create_key()`` to use PHP7's ``random_bytes()`` function when possible. + - Updated :doc:`Security Library ` method ``get_random_bytes()`` to use PHP 7's ``random_bytes()`` function when possible. + - Updated :doc:`Encryption Library ` method ``create_key()`` to use PHP 7's ``random_bytes()`` function when possible. Bug fixes for 3.0.4 ------------------- @@ -32,6 +32,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4343) - :doc:`Email Library ` failing with a *"More than one 'from' person"* message when using *sendmail*. - Fixed a bug (#4350) - :doc:`Loader Library ` method ``model()`` logic directly instantiated the ``CI_Model`` or ``MY_Model`` classes. - Fixed a bug (#4337) - :doc:`Database ` method ``query()`` didn't return a result set for queries with the ``RETURNING`` statement on PostgreSQL. +- Fixed a bug (#4362) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'redis' and 'memcached' drivers on PHP 7. Version 3.0.3 ============= @@ -53,7 +54,7 @@ Bug fixes for 3.0.3 ------------------- - Fixed a bug (#4170) - :doc:`Database ` method ``insert_id()`` could return an identity from the wrong scope with the 'sqlsrv' driver. -- Fixed a bug (#4179) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP7. +- Fixed a bug (#4179) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP 7. - Fixed a bug (#4173) - :doc:`Database Forge ` method ``add_key()`` didn't allow creation of non-PRIMARY composite keys after the "bugfix" for #3968. - Fixed a bug (#4171) - :doc:`Database Transactions ` didn't work with nesting in methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()``. - Fixed a bug where :doc:`Database Transaction ` methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()`` ignored failures. -- cgit v1.2.3-24-g4f1b From 868b194fe50c0544b43cf8be523c39bdea18897d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 14:22:00 +0200 Subject: [ci skip] Add Oracle 12.1 OFFSET support to PDO_OCI as well Reference: #4279 --- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index 4791ab157..d4cfb7dd7 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -311,6 +311,14 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { */ protected function _limit($sql) { + if (version_compare($this->version(), '12.1', '>=')) + { + // OFFSET-FETCH can be used only with the ORDER BY clause + empty($this->qb_orderby) && $sql .= ' ORDER BY 1'; + + return $sql.' OFFSET '.(int) $this->qb_offset.' ROWS FETCH NEXT '.$this->qb_limit.' ROWS ONLY'; + } + return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($this->qb_offset + $this->qb_limit + 1).')' .($this->qb_offset ? ' WHERE rnum >= '.($this->qb_offset + 1): ''); } -- cgit v1.2.3-24-g4f1b From 20d7d65fd3fca54b86f389b149da5a0d2f2d6808 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 14:23:57 +0200 Subject: [ci skip] Add changelog entry for #4279 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d63696a77..89368f3ab 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: Not Released - Updated :doc:`Security Library ` method ``get_random_bytes()`` to use PHP 7's ``random_bytes()`` function when possible. - Updated :doc:`Encryption Library ` method ``create_key()`` to use PHP 7's ``random_bytes()`` function when possible. + - Updated :doc:`Database ` drivers 'oci8' and 'pdo/oci' with support for ``OFFSET-FETCH`` with Oracle 12c. Bug fixes for 3.0.4 ------------------- -- cgit v1.2.3-24-g4f1b From 89576a8cf0918c4d1797f6ef34be98b5caef29d3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 14:39:04 +0200 Subject: Add support for MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT Available since PHP 5.6.16 --- system/database/drivers/mysqli/mysqli_driver.php | 17 +++++++++++++++-- user_guide_src/source/changelog.rst | 8 ++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 693a96bab..34366827b 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -153,9 +153,22 @@ class CI_DB_mysqli_driver extends CI_DB { if ( ! empty($ssl)) { - if ( ! empty($this->encrypt['ssl_verify']) && defined('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT')) + if (isset($this->encrypt['ssl_verify'])) { - $this->_mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE); + if ($this->encrypt['ssl_verify']) + { + defined('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT') && $this->_mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE); + } + // Apparently (when it exists), setting MYSQLI_OPT_SSL_VERIFY_SERVER_CERT + // to FALSE didn't do anything, so PHP 5.6.16 introduced yet another + // constant ... + // + // https://secure.php.net/ChangeLog-5.php#5.6.16 + // https://bugs.php.net/bug.php?id=68344 + elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) + { + $this->_mysqli->options(MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT, TRUE); + } } $client_flags |= MYSQLI_CLIENT_SSL; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 89368f3ab..52c424614 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,7 +11,11 @@ Release Date: Not Released - Updated :doc:`Security Library ` method ``get_random_bytes()`` to use PHP 7's ``random_bytes()`` function when possible. - Updated :doc:`Encryption Library ` method ``create_key()`` to use PHP 7's ``random_bytes()`` function when possible. - - Updated :doc:`Database ` drivers 'oci8' and 'pdo/oci' with support for ``OFFSET-FETCH`` with Oracle 12c. + +- :doc:`Database ` + + - Added support for ``OFFSET-FETCH`` with Oracle 12c for the 'oci8' and 'pdo/oci' drivers. + - Added support for the new ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` constant from `PHP 5.6.16 `_ for the 'mysqli' driver. Bug fixes for 3.0.4 ------------------- @@ -46,7 +50,7 @@ Release Date: October 31, 2015 - Changed :doc:`Config Library ` method ``base_url()`` to fallback to ``$_SERVER['SERVER_ADDR']`` when ``$config['base_url']`` is empty in order to avoid *Host* header injections. - Changed :doc:`CAPTCHA Helper ` to use the operating system's PRNG when possible. -- Database +- :doc:`Database` - Optimized :doc:`Database Utility ` method ``csv_from_result()`` for speed with larger result sets. - Added proper return values to :doc:`Database Transactions ` method ``trans_start()``. -- cgit v1.2.3-24-g4f1b From b98c657c100d3220a5d7ed1b6ff3ec78e227b406 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 16:10:10 +0200 Subject: Fix MySQL's 'stricton' feature --- system/database/drivers/mysql/mysql_driver.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 9c630d0d6..d9c1a98a6 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -147,9 +147,27 @@ class CI_DB_mysql_driver extends CI_DB { : FALSE; } - if ($this->stricton && is_resource($this->conn_id)) + if (isset($this->stricton) && is_resource($this->conn_id)) { - $this->simple_query('SET SESSION sql_mode="STRICT_ALL_TABLES"'); + if ($this->stricton) + { + $this->simple_query('SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); + } + else + { + $this->simple_query( + 'SET SESSION sql_mode = + REPLACE( + REPLACE( + REPLACE(@@sql_mode, "STRICT_ALL_TABLES,", ""), + ",STRICT_ALL_TABLES", + "" + ), + "STRICT_ALL_TABLES", + "" + )' + ); + } } return $this->conn_id; -- cgit v1.2.3-24-g4f1b From c83e894fe8b3c85ff40f00954df0033ad14940b0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 17:27:39 +0200 Subject: Add MySQL stricton changes to mysqli and pdo/mysql drivers --- system/database/drivers/mysql/mysql_driver.php | 21 +++++++-------- system/database/drivers/mysqli/mysqli_driver.php | 23 +++++++++++++--- .../drivers/pdo/subdrivers/pdo_mysql_driver.php | 31 +++++++++++++++++----- 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index d9c1a98a6..607388a61 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -84,7 +84,7 @@ class CI_DB_mysql_driver extends CI_DB { * * @var bool */ - public $stricton = FALSE; + public $stricton; // -------------------------------------------------------------------- @@ -153,19 +153,18 @@ class CI_DB_mysql_driver extends CI_DB { { $this->simple_query('SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); } - else + elseif (version_compare($this->version, '5.7', '>=')) { $this->simple_query( 'SET SESSION sql_mode = - REPLACE( - REPLACE( - REPLACE(@@sql_mode, "STRICT_ALL_TABLES,", ""), - ",STRICT_ALL_TABLES", - "" - ), - "STRICT_ALL_TABLES", - "" - )' + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( + @@sql_mode, + "STRICT_ALL_TABLES,", ""), + ",STRICT_ALL_TABLES", ""), + "STRICT_ALL_TABLES", ""), + "STRICT_TRANS_TABLES,", ""), + ",STRICT_TRANS_TABLES", ""), + "STRICT_TRANS_TABLES", "")' ); } } diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 34366827b..f8694b9d1 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -84,7 +84,7 @@ class CI_DB_mysqli_driver extends CI_DB { * * @var bool */ - public $stricton = FALSE; + public $stricton; // -------------------------------------------------------------------- @@ -137,9 +137,26 @@ class CI_DB_mysqli_driver extends CI_DB { $this->_mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10); - if ($this->stricton) + if (isset($this->stricton)) { - $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode="STRICT_ALL_TABLES"'); + if ($this->stricton) + { + $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); + } + elseif (version_compare($this->version, '5.7', '>=')) + { + $this->_mysqli->options(MYSQLI_INIT_COMMAND, + 'SET SESSION sql_mode = + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( + @@sql_mode, + "STRICT_ALL_TABLES,", ""), + ",STRICT_ALL_TABLES", ""), + "STRICT_ALL_TABLES", ""), + "STRICT_TRANS_TABLES,", ""), + ",STRICT_TRANS_TABLES", ""), + "STRICT_TRANS_TABLES", "")' + ); + } } if (is_array($this->encrypt)) diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index e9d25cebc..2d8eac4e3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -73,7 +73,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { * * @var bool */ - public $stricton = FALSE; + public $stricton; // -------------------------------------------------------------------- @@ -133,15 +133,34 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { .(empty($this->dbcollat) ? '' : ' COLLATE '.$this->dbcollat); } - if ($this->stricton) + if (isset($this->stricton)) { - if (empty($this->options[PDO::MYSQL_ATTR_INIT_COMMAND])) + if ($this->stricton) { - $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET SESSION sql_mode="STRICT_ALL_TABLES"'; + $sql = 'CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'; } - else + elseif (version_compare($this->version, '5.7', '>=')) { - $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', @@session.sql_mode = "STRICT_ALL_TABLES"'; + $sql = 'REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( + @@sql_mode, + "STRICT_ALL_TABLES,", ""), + ",STRICT_ALL_TABLES", ""), + "STRICT_ALL_TABLES", ""), + "STRICT_TRANS_TABLES,", ""), + ",STRICT_TRANS_TABLES", ""), + "STRICT_TRANS_TABLES", "")'; + } + + if ( ! empty($sql)) + { + if (empty($this->options[PDO::MYSQL_ATTR_INIT_COMMAND])) + { + $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET SESSION sql_mode = '.$sql; + } + else + { + $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', @@session.sql_mode = '.$sql; + } } } -- cgit v1.2.3-24-g4f1b From 679e94853451192410ac138cb592ac5ab021ea67 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 17:31:21 +0200 Subject: [ci skip] Add changelog entries for #4349 --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 52c424614..89d6a3a3a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -38,6 +38,8 @@ Bug fixes for 3.0.4 - Fixed a bug (#4350) - :doc:`Loader Library ` method ``model()`` logic directly instantiated the ``CI_Model`` or ``MY_Model`` classes. - Fixed a bug (#4337) - :doc:`Database ` method ``query()`` didn't return a result set for queries with the ``RETURNING`` statement on PostgreSQL. - Fixed a bug (#4362) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'redis' and 'memcached' drivers on PHP 7. +- Fixed a bug (#4349) - :doc:`Database ` drivers 'mysql', 'mysqli', 'pdo/mysql' discard other ``sql_mode`` flags when "stricton" is enabled. +- Fixed a bug (#4349) - :doc:`Database ` drivers 'mysql', 'mysqli', 'pdo/mysql' don't turn off ``STRICT_TRANS_TABLES`` on MySQL 5.7+ when "stricton" is disabled. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 2d2880dfa6976fbd38ad033765473fd1a8f0bc85 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 17:43:10 +0200 Subject: Fix MySQL errors from latest commits Ref: #4349 --- system/database/drivers/mysql/mysql_driver.php | 2 +- system/database/drivers/mysqli/mysqli_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 607388a61..2573e3c17 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -153,7 +153,7 @@ class CI_DB_mysql_driver extends CI_DB { { $this->simple_query('SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); } - elseif (version_compare($this->version, '5.7', '>=')) + elseif (version_compare($this->version(), '5.7', '>=')) { $this->simple_query( 'SET SESSION sql_mode = diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index f8694b9d1..397368b72 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -143,7 +143,7 @@ class CI_DB_mysqli_driver extends CI_DB { { $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); } - elseif (version_compare($this->version, '5.7', '>=')) + elseif (version_compare($this->version(), '5.7', '>=')) { $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode = diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 2d8eac4e3..0886216e4 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -139,7 +139,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { { $sql = 'CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'; } - elseif (version_compare($this->version, '5.7', '>=')) + elseif (version_compare($this->version(), '5.7', '>=')) { $sql = 'REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( @@sql_mode, -- cgit v1.2.3-24-g4f1b From 0a9cc835b4ec7e85e0ccac04000fa889a599126e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jan 2016 17:52:20 +0200 Subject: MySQL stricton again ... remove the version condition Ref: #4349 --- system/database/drivers/mysql/mysql_driver.php | 2 +- system/database/drivers/mysqli/mysqli_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 2573e3c17..3a450ec4c 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -153,7 +153,7 @@ class CI_DB_mysql_driver extends CI_DB { { $this->simple_query('SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); } - elseif (version_compare($this->version(), '5.7', '>=')) + else { $this->simple_query( 'SET SESSION sql_mode = diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 397368b72..323a67f63 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -143,7 +143,7 @@ class CI_DB_mysqli_driver extends CI_DB { { $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode = CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'); } - elseif (version_compare($this->version(), '5.7', '>=')) + else { $this->_mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode = diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 0886216e4..c230651dc 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -139,7 +139,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { { $sql = 'CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'; } - elseif (version_compare($this->version(), '5.7', '>=')) + else { $sql = 'REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( @@sql_mode, -- cgit v1.2.3-24-g4f1b From b1b45557ad18c596bd9756bd2eebf93fe2d54b0d Mon Sep 17 00:00:00 2001 From: ponsfrilus Date: Fri, 8 Jan 2016 10:24:58 +0100 Subject: [typo] missing ; at end of PHP lines 464 and 469 --- user_guide_src/source/helpers/form_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index a67dbc0bf..bc30a0e98 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -461,12 +461,12 @@ The following functions are available: fourth parameter:: $js = 'onClick="some_function()"'; - echo form_checkbox('newsletter', 'accept', TRUE, $js) + 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) + echo form_checkbox('newsletter', 'accept', TRUE, $js); .. php:function:: form_radio([$data = ''[, $value = ''[, $checked = FALSE[, $extra = '']]]]) -- cgit v1.2.3-24-g4f1b From 8f7cc15c8856d312c091c33cadc75db0605a2829 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 8 Jan 2016 12:59:11 +0200 Subject: Merge pull request #4365 from ponsfrilus/develop [ci skip] Form helper examples missing ; at end of function calls --- user_guide_src/source/helpers/form_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index a67dbc0bf..bc30a0e98 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -461,12 +461,12 @@ The following functions are available: fourth parameter:: $js = 'onClick="some_function()"'; - echo form_checkbox('newsletter', 'accept', TRUE, $js) + 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) + echo form_checkbox('newsletter', 'accept', TRUE, $js); .. php:function:: form_radio([$data = ''[, $value = ''[, $checked = FALSE[, $extra = '']]]]) -- cgit v1.2.3-24-g4f1b From 8de7faa9ff7f342d57966bde0b0429ab241c2a6f Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Fri, 8 Jan 2016 15:13:13 -0500 Subject: use 'while' instead of 'if' 'do' 'while' --- system/database/DB_driver.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index af6b9f399..59662a946 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -641,19 +641,15 @@ abstract class CI_DB_driver { // if transactions are enabled. If we don't call this here // the error message will trigger an exit, causing the // transactions to remain in limbo. - if ($this->_trans_depth !== 0) + while ($this->_trans_depth !== 0) { - do + $trans_depth = $this->_trans_depth; + $this->trans_complete(); + if ($trans_depth === $this->_trans_depth) { - $trans_depth = $this->_trans_depth; - $this->trans_complete(); - if ($trans_depth === $this->_trans_depth) - { - log_message('error', 'Database: Failure during an automated transaction commit/rollback!'); - break; - } + log_message('error', 'Database: Failure during an automated transaction commit/rollback!'); + break; } - while ($this->_trans_depth !== 0); } // Display errors -- cgit v1.2.3-24-g4f1b From 8219714647602c94dd38e6b2efedb4e7ed1c8c4e Mon Sep 17 00:00:00 2001 From: Fery Wardiyanto Date: Sat, 9 Jan 2016 19:30:32 +0700 Subject: Add extra mime for .ogg file Signed-off-by: Fery Wardiyanto --- application/config/mimes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index 957dc05d8..8bac87251 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -149,7 +149,7 @@ return array( 'au' => 'audio/x-au', 'ac3' => 'audio/ac3', 'flac' => 'audio/x-flac', - 'ogg' => 'audio/ogg', + 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), 'ics' => 'text/calendar', -- cgit v1.2.3-24-g4f1b From 803cc12107f687a8ff9a19427023122b2d6b7207 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 11:15:27 +0200 Subject: Merge pull request #4369 from galdiolo/patch-12 Optimize transactions check in CI_DB_driver::query() --- system/database/DB_driver.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index bfe9dd4b0..40e40e927 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -676,19 +676,15 @@ abstract class CI_DB_driver { // if transactions are enabled. If we don't call this here // the error message will trigger an exit, causing the // transactions to remain in limbo. - if ($this->_trans_depth !== 0) + while ($this->_trans_depth !== 0) { - do + $trans_depth = $this->_trans_depth; + $this->trans_complete(); + if ($trans_depth === $this->_trans_depth) { - $trans_depth = $this->_trans_depth; - $this->trans_complete(); - if ($trans_depth === $this->_trans_depth) - { - log_message('error', 'Database: Failure during an automated transaction commit/rollback!'); - break; - } + log_message('error', 'Database: Failure during an automated transaction commit/rollback!'); + break; } - while ($this->_trans_depth !== 0); } // Display errors -- cgit v1.2.3-24-g4f1b From 7886d70be269d4c79cbfd67c1bb7be313ce221fa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 16 Nov 2015 12:02:22 +0200 Subject: Merge pull request #4241 from suhindra/develop [ci skip] Added/updated MIME types for Flash Video --- application/config/mimes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index aa3b1836a..957dc05d8 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -137,7 +137,8 @@ return array( '3gp' => array('video/3gp', 'video/3gpp'), 'mp4' => 'video/mp4', 'm4a' => 'audio/x-m4a', - 'f4v' => 'video/mp4', + 'f4v' => array('video/mp4', 'video/x-f4v'), + 'flv' => 'video/x-flv', 'webm' => 'video/webm', 'aac' => 'audio/x-acc', 'm4u' => 'application/vnd.mpegurl', -- cgit v1.2.3-24-g4f1b From bffcdc06baed39dbaddaf8706b9d70c3d466047d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 11:34:20 +0200 Subject: Merge pull request #4371 from feryardiant/contrib/mime-ogg [ci skip] Add extra mime for .ogg files --- application/config/mimes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index 957dc05d8..8bac87251 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -149,7 +149,7 @@ return array( 'au' => 'audio/x-au', 'ac3' => 'audio/ac3', 'flac' => 'audio/x-flac', - 'ogg' => 'audio/ogg', + 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), 'ics' => 'text/calendar', -- cgit v1.2.3-24-g4f1b From fd5fe1a64c03ae7204a7e72d936215f7a61d8c30 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 11:58:40 +0200 Subject: Fix #4374 --- system/libraries/Session/drivers/Session_database_driver.php | 12 ++++++++++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 13 insertions(+) diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index f2adacb6b..8c4555481 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -147,6 +147,9 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan { if ($this->_get_lock($session_id) !== FALSE) { + // Prevent previous QB calls from messing with our queries + $this->_db->reset_query(); + // Needed by write() to detect session_regenerate_id() calls $this->_session_id = $session_id; @@ -199,6 +202,9 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan */ public function write($session_id, $session_data) { + // Prevent previous QB calls from messing with our queries + $this->_db->reset_query(); + // Was the ID regenerated? if ($session_id !== $this->_session_id) { @@ -287,6 +293,9 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan { if ($this->_lock) { + // Prevent previous QB calls from messing with our queries + $this->_db->reset_query(); + $this->_db->where('id', $session_id); if ($this->_config['match_ip']) { @@ -320,6 +329,9 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan */ public function gc($maxlifetime) { + // Prevent previous QB calls from messing with our queries + $this->_db->reset_query(); + return ($this->_db->delete($this->_config['save_path'], 'timestamp < '.(time() - $maxlifetime))) ? $this->_success : $this->_failure; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 89d6a3a3a..8b0fb677a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -40,6 +40,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4362) - :doc:`Session Library ` doesn't properly maintain its state after ID regeneration with the 'redis' and 'memcached' drivers on PHP 7. - Fixed a bug (#4349) - :doc:`Database ` drivers 'mysql', 'mysqli', 'pdo/mysql' discard other ``sql_mode`` flags when "stricton" is enabled. - Fixed a bug (#4349) - :doc:`Database ` drivers 'mysql', 'mysqli', 'pdo/mysql' don't turn off ``STRICT_TRANS_TABLES`` on MySQL 5.7+ when "stricton" is disabled. +- Fixed a bug (#4374) - :doc:`Session Library ` with the 'database' driver could be affected by userspace :doc:`Query Builder ` conditions. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b From 125ef4751080a2118cb203357d77687699e3eb25 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:33:00 +0200 Subject: [ci skip] Bump year to 2016 --- license.txt | 2 +- system/core/Benchmark.php | 4 ++-- system/core/CodeIgniter.php | 4 ++-- system/core/Common.php | 4 ++-- system/core/Config.php | 4 ++-- system/core/Controller.php | 4 ++-- system/core/Exceptions.php | 4 ++-- system/core/Hooks.php | 4 ++-- system/core/Input.php | 4 ++-- system/core/Lang.php | 4 ++-- system/core/Loader.php | 4 ++-- system/core/Log.php | 4 ++-- system/core/Model.php | 4 ++-- system/core/Output.php | 4 ++-- system/core/Router.php | 4 ++-- system/core/Security.php | 4 ++-- system/core/URI.php | 4 ++-- system/core/Utf8.php | 4 ++-- system/core/compat/hash.php | 4 ++-- system/core/compat/mbstring.php | 4 ++-- system/core/compat/password.php | 4 ++-- system/core/compat/standard.php | 4 ++-- system/database/DB.php | 4 ++-- system/database/DB_cache.php | 4 ++-- system/database/DB_driver.php | 4 ++-- system/database/DB_forge.php | 4 ++-- system/database/DB_query_builder.php | 4 ++-- system/database/DB_result.php | 4 ++-- system/database/DB_utility.php | 4 ++-- system/database/drivers/cubrid/cubrid_driver.php | 4 ++-- system/database/drivers/cubrid/cubrid_forge.php | 4 ++-- system/database/drivers/cubrid/cubrid_result.php | 4 ++-- system/database/drivers/cubrid/cubrid_utility.php | 4 ++-- system/database/drivers/ibase/ibase_driver.php | 4 ++-- system/database/drivers/ibase/ibase_forge.php | 4 ++-- system/database/drivers/ibase/ibase_result.php | 4 ++-- system/database/drivers/ibase/ibase_utility.php | 4 ++-- system/database/drivers/mssql/mssql_driver.php | 4 ++-- system/database/drivers/mssql/mssql_forge.php | 4 ++-- system/database/drivers/mssql/mssql_result.php | 4 ++-- system/database/drivers/mssql/mssql_utility.php | 4 ++-- system/database/drivers/mysql/mysql_driver.php | 4 ++-- system/database/drivers/mysql/mysql_forge.php | 4 ++-- system/database/drivers/mysql/mysql_result.php | 4 ++-- system/database/drivers/mysql/mysql_utility.php | 4 ++-- system/database/drivers/mysqli/mysqli_driver.php | 4 ++-- system/database/drivers/mysqli/mysqli_forge.php | 4 ++-- system/database/drivers/mysqli/mysqli_result.php | 4 ++-- system/database/drivers/mysqli/mysqli_utility.php | 4 ++-- system/database/drivers/oci8/oci8_driver.php | 4 ++-- system/database/drivers/oci8/oci8_forge.php | 4 ++-- system/database/drivers/oci8/oci8_result.php | 4 ++-- system/database/drivers/oci8/oci8_utility.php | 4 ++-- system/database/drivers/odbc/odbc_driver.php | 4 ++-- system/database/drivers/odbc/odbc_forge.php | 4 ++-- system/database/drivers/odbc/odbc_result.php | 4 ++-- system/database/drivers/odbc/odbc_utility.php | 4 ++-- system/database/drivers/pdo/pdo_driver.php | 4 ++-- system/database/drivers/pdo/pdo_forge.php | 4 ++-- system/database/drivers/pdo/pdo_result.php | 4 ++-- system/database/drivers/pdo/pdo_utility.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_informix_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_informix_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php | 4 ++-- system/database/drivers/postgre/postgre_driver.php | 4 ++-- system/database/drivers/postgre/postgre_forge.php | 4 ++-- system/database/drivers/postgre/postgre_result.php | 4 ++-- system/database/drivers/postgre/postgre_utility.php | 4 ++-- system/database/drivers/sqlite/sqlite_driver.php | 4 ++-- system/database/drivers/sqlite/sqlite_forge.php | 4 ++-- system/database/drivers/sqlite/sqlite_result.php | 4 ++-- system/database/drivers/sqlite/sqlite_utility.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_driver.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_forge.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_result.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_utility.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_driver.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_forge.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_result.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_utility.php | 4 ++-- system/helpers/array_helper.php | 4 ++-- system/helpers/captcha_helper.php | 4 ++-- system/helpers/cookie_helper.php | 4 ++-- system/helpers/date_helper.php | 4 ++-- system/helpers/directory_helper.php | 4 ++-- system/helpers/download_helper.php | 4 ++-- system/helpers/email_helper.php | 4 ++-- system/helpers/file_helper.php | 4 ++-- system/helpers/form_helper.php | 4 ++-- system/helpers/html_helper.php | 4 ++-- system/helpers/inflector_helper.php | 4 ++-- system/helpers/language_helper.php | 4 ++-- system/helpers/number_helper.php | 4 ++-- system/helpers/path_helper.php | 4 ++-- system/helpers/security_helper.php | 4 ++-- system/helpers/smiley_helper.php | 4 ++-- system/helpers/string_helper.php | 4 ++-- system/helpers/text_helper.php | 4 ++-- system/helpers/typography_helper.php | 4 ++-- system/helpers/url_helper.php | 4 ++-- system/helpers/xml_helper.php | 4 ++-- system/language/english/calendar_lang.php | 4 ++-- system/language/english/date_lang.php | 4 ++-- system/language/english/db_lang.php | 4 ++-- system/language/english/email_lang.php | 4 ++-- system/language/english/form_validation_lang.php | 4 ++-- system/language/english/ftp_lang.php | 4 ++-- system/language/english/imglib_lang.php | 4 ++-- system/language/english/migration_lang.php | 4 ++-- system/language/english/number_lang.php | 4 ++-- system/language/english/pagination_lang.php | 4 ++-- system/language/english/profiler_lang.php | 4 ++-- system/language/english/unit_test_lang.php | 4 ++-- system/language/english/upload_lang.php | 4 ++-- system/libraries/Cache/Cache.php | 4 ++-- system/libraries/Cache/drivers/Cache_apc.php | 4 ++-- system/libraries/Cache/drivers/Cache_dummy.php | 4 ++-- system/libraries/Cache/drivers/Cache_file.php | 4 ++-- system/libraries/Cache/drivers/Cache_memcached.php | 4 ++-- system/libraries/Cache/drivers/Cache_redis.php | 4 ++-- system/libraries/Cache/drivers/Cache_wincache.php | 4 ++-- system/libraries/Calendar.php | 4 ++-- system/libraries/Cart.php | 4 ++-- system/libraries/Driver.php | 4 ++-- system/libraries/Email.php | 4 ++-- system/libraries/Encrypt.php | 4 ++-- system/libraries/Encryption.php | 4 ++-- system/libraries/Form_validation.php | 4 ++-- system/libraries/Ftp.php | 4 ++-- system/libraries/Image_lib.php | 4 ++-- system/libraries/Javascript.php | 4 ++-- system/libraries/Javascript/Jquery.php | 4 ++-- system/libraries/Migration.php | 4 ++-- system/libraries/Pagination.php | 4 ++-- system/libraries/Parser.php | 4 ++-- system/libraries/Profiler.php | 4 ++-- system/libraries/Session/Session.php | 4 ++-- system/libraries/Session/SessionHandlerInterface.php | 4 ++-- system/libraries/Session/Session_driver.php | 4 ++-- system/libraries/Session/drivers/Session_database_driver.php | 4 ++-- system/libraries/Session/drivers/Session_files_driver.php | 4 ++-- system/libraries/Session/drivers/Session_memcached_driver.php | 4 ++-- system/libraries/Session/drivers/Session_redis_driver.php | 4 ++-- system/libraries/Table.php | 4 ++-- system/libraries/Trackback.php | 4 ++-- system/libraries/Typography.php | 4 ++-- system/libraries/Unit_test.php | 4 ++-- system/libraries/Upload.php | 4 ++-- system/libraries/User_agent.php | 4 ++-- system/libraries/Xmlrpc.php | 4 ++-- system/libraries/Xmlrpcs.php | 4 ++-- system/libraries/Zip.php | 4 ++-- user_guide_src/cilexer/cilexer/cilexer.py | 4 ++-- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/license.rst | 2 +- 176 files changed, 350 insertions(+), 350 deletions(-) diff --git a/license.txt b/license.txt index cb2d8b471..388eee337 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 - 2015, British Columbia Institute of Technology +Copyright (c) 2014 - 2016, 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 diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index e420f62a1..414a801ee 100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 79a23c4ca..1394fd862 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Common.php b/system/core/Common.php index 3ab98cf6d..32e47b743 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Config.php b/system/core/Config.php index c507f342c..d03e02d4d 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Controller.php b/system/core/Controller.php index a0d97baa2..260dee4f6 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index d8f62c0fe..29a285166 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 3b4fb2250..42090d16c 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Input.php b/system/core/Input.php index 4e7a4e95e..55474fd0c 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Lang.php b/system/core/Lang.php index deb955414..6913b92fa 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Loader.php b/system/core/Loader.php index 87f21b279..500a86ae6 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Log.php b/system/core/Log.php index e8cb401f5..4343d746d 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Model.php b/system/core/Model.php index a0469de11..c9f1f8dd6 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Output.php b/system/core/Output.php index 76c1329d2..75116b3a6 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Router.php b/system/core/Router.php index ce41aa958..85d1df719 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Security.php b/system/core/Security.php index e79bf8aff..16375d17f 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/URI.php b/system/core/URI.php index 5179b401f..5262dd49c 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 9d8ac41e1..c6392c4e2 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.0 diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 15954559c..7e5f1335d 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php index e335c85f7..ff8e79257 100644 --- a/system/core/compat/mbstring.php +++ b/system/core/compat/mbstring.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/password.php b/system/core/compat/password.php index 7b933aa04..3062b89c0 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index 5a428c114..c9f7ce225 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/DB.php b/system/database/DB.php index 0c7cf54b3..d713a68dd 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 223055f60..134737e31 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 40e40e927..78228818e 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 1546e40c0..6fc1e1f2b 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 7a3d2f594..7a65225e4 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 746f2a110..7b313914a 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index b51893e18..c4bad9eaf 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 65f4adb3f..70f28d6d0 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 9484e94e1..aac8f03b6 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php index e666bab56..31ad09d72 100644 --- a/system/database/drivers/cubrid/cubrid_result.php +++ b/system/database/drivers/cubrid/cubrid_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_utility.php b/system/database/drivers/cubrid/cubrid_utility.php index de7d71568..c9648c597 100644 --- a/system/database/drivers/cubrid/cubrid_utility.php +++ b/system/database/drivers/cubrid/cubrid_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index 82550d51b..6b1c77b7f 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php index 0e748c710..02e7a3798 100644 --- a/system/database/drivers/ibase/ibase_forge.php +++ b/system/database/drivers/ibase/ibase_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php index 991146f45..c907e35ca 100644 --- a/system/database/drivers/ibase/ibase_result.php +++ b/system/database/drivers/ibase/ibase_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_utility.php b/system/database/drivers/ibase/ibase_utility.php index 79d2788e5..0672113a3 100644 --- a/system/database/drivers/ibase/ibase_utility.php +++ b/system/database/drivers/ibase/ibase_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index b9e310a3a..965e7b02d 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php index 84406a016..4d888ef5c 100644 --- a/system/database/drivers/mssql/mssql_forge.php +++ b/system/database/drivers/mssql/mssql_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index c1c42a486..af1e4d794 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php index 1040b5e41..deffaeef1 100644 --- a/system/database/drivers/mssql/mssql_utility.php +++ b/system/database/drivers/mssql/mssql_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 3a450ec4c..c20b315a2 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index cb90065f2..51ec17c59 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 26aaddd32..3483d816a 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index 55857ab08..3802a46fa 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 323a67f63..61a780372 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php index 196afa845..0f19b737c 100644 --- a/system/database/drivers/mysqli/mysqli_forge.php +++ b/system/database/drivers/mysqli/mysqli_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index d648828bd..9b653088f 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index 04fcd1ded..c771f6f57 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 994f8f33a..1f5258ecf 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 80100977a..f2ec2d109 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 9ec54cc5c..c6cbd5c58 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php index 90022a8c1..372ad3737 100644 --- a/system/database/drivers/oci8/oci8_utility.php +++ b/system/database/drivers/oci8/oci8_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index e12ad53bc..5b17ff692 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php index 45c5dc108..3dc765025 100644 --- a/system/database/drivers/odbc/odbc_forge.php +++ b/system/database/drivers/odbc/odbc_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index 10b93d4fc..a8aa3f67f 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 0e6c23328..35944a55b 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 8c5a5e7e3..4bd7ecfee 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_forge.php b/system/database/drivers/pdo/pdo_forge.php index eedd9722d..25cd5d172 100644 --- a/system/database/drivers/pdo/pdo_forge.php +++ b/system/database/drivers/pdo/pdo_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php index fe26fea6e..56370c972 100644 --- a/system/database/drivers/pdo/pdo_result.php +++ b/system/database/drivers/pdo/pdo_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index 72169c3ca..8c45fd82f 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php index 7a767ef40..c6cc66805 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index 6b420540c..c28c47341 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 98ac89f3d..e03c824f5 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index 15b100d9b..8846f49a1 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index ae2b9983b..2d19c3951 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index d3dd9032e..7529addfa 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 0bafde861..c5e772b18 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index ad28a6550..91703509f 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php index 5dba26ec9..4d363b198 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php index d1b5f92c9..e4693d6b0 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php index 9f8c017a5..230e60be7 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php index 22bdf6104..4de230161 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index c230651dc..a11ad796e 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php index e8e24c6b3..04792c844 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index d4cfb7dd7..cef12befe 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index e2078cf39..64d1c89f0 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index 4df2de8ba..bd4849b2b 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php index 291352982..4736c4244 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 79c3c7be0..a6c83a858 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index b4a6160a8..3b2a9c857 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index 409e6501b..9d1fb6447 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index 15afbdef5..91951718a 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index f8ae5f6db..ee68e5b15 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index 602a1d426..e26c9597b 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index a7a02496b..dd46503b1 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index d26e84cbc..e185a4007 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index a8ad24edf..91e036432 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index 7c6c02590..83e144420 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index e000a8e50..d889ef588 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 2bba330c0..9b97f88cb 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index 487d00366..322a63cba 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index 9cb454274..84c2abb47 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index 73e453785..24cff60f8 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index 24690ba20..6201d8632 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php index 387481b7f..279c75673 100644 --- a/system/database/drivers/sqlite3/sqlite3_result.php +++ b/system/database/drivers/sqlite3/sqlite3_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_utility.php b/system/database/drivers/sqlite3/sqlite3_utility.php index 336f68754..21dc0b84d 100644 --- a/system/database/drivers/sqlite3/sqlite3_utility.php +++ b/system/database/drivers/sqlite3/sqlite3_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 414669a4b..38f89d502 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index b22b60a4a..c01cdccac 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php index d2be926aa..64541baab 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_result.php +++ b/system/database/drivers/sqlsrv/sqlsrv_result.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_utility.php b/system/database/drivers/sqlsrv/sqlsrv_utility.php index 77cf0aaf3..ebb5d618f 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_utility.php +++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.3 diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index 2ce55b9c4..4bf7cd188 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 03c1dd852..4d8e98ea6 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index c2dc73a17..95b8224c5 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index c9b71c30f..5b6b76231 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index 8f05c5b18..01ab4500d 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 73f6456c4..a005c91ef 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php index c4d705810..b8f28da1c 100644 --- a/system/helpers/email_helper.php +++ b/system/helpers/email_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index f6cb1629a..305759556 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 37dafd913..badf7773d 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 28fbe00be..282aa5e7a 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index f2890059f..a84647eb4 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 25ce8abe1..1b5d1396f 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index 3a24259e1..328651cdb 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index c96d0b8b3..c9d119435 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index adbf136bb..ae88dfc07 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index d053dd22c..e13e1e4df 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 3138a04b3..98cf882e0 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index fb47036f2..b7f199d55 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index 45bb9b1d4..e8c84c9ca 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index d65f92f1b..6c96482d2 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 55f9c2f66..8c2a6dcf1 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/calendar_lang.php b/system/language/english/calendar_lang.php index 9d3352868..d7afdfe37 100644 --- a/system/language/english/calendar_lang.php +++ b/system/language/english/calendar_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/date_lang.php b/system/language/english/date_lang.php index c61c9c2ad..cdf55454e 100644 --- a/system/language/english/date_lang.php +++ b/system/language/english/date_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/db_lang.php b/system/language/english/db_lang.php index 5b67da659..be37f2bfd 100644 --- a/system/language/english/db_lang.php +++ b/system/language/english/db_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php index cc6b2fd5a..dd2331a82 100644 --- a/system/language/english/email_lang.php +++ b/system/language/english/email_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 75d6e4b82..797c80245 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/ftp_lang.php b/system/language/english/ftp_lang.php index bccc27397..02a73449f 100644 --- a/system/language/english/ftp_lang.php +++ b/system/language/english/ftp_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php index 41129cd6e..e52490e8d 100644 --- a/system/language/english/imglib_lang.php +++ b/system/language/english/imglib_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/migration_lang.php b/system/language/english/migration_lang.php index 9e4a7c58c..f842e88bb 100644 --- a/system/language/english/migration_lang.php +++ b/system/language/english/migration_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/language/english/number_lang.php b/system/language/english/number_lang.php index db229c5b5..f1756ac16 100644 --- a/system/language/english/number_lang.php +++ b/system/language/english/number_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/pagination_lang.php b/system/language/english/pagination_lang.php index be133781e..d9930d36b 100644 --- a/system/language/english/pagination_lang.php +++ b/system/language/english/pagination_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/profiler_lang.php b/system/language/english/profiler_lang.php index ba3edba60..2259823f7 100644 --- a/system/language/english/profiler_lang.php +++ b/system/language/english/profiler_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/unit_test_lang.php b/system/language/english/unit_test_lang.php index 639829ed8..b9b53e755 100644 --- a/system/language/english/unit_test_lang.php +++ b/system/language/english/unit_test_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/upload_lang.php b/system/language/english/upload_lang.php index a536dda31..7fe518424 100644 --- a/system/language/english/upload_lang.php +++ b/system/language/english/upload_lang.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 0c87a5628..023ad02bb 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index e0d2ffb39..621a59643 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php index bf80945a9..f1fb6b5a0 100644 --- a/system/libraries/Cache/drivers/Cache_dummy.php +++ b/system/libraries/Cache/drivers/Cache_dummy.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index c046f3b7d..01295baf5 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 59cf4685d..f1011348d 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index ea0059ff7..62c1b391a 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index 9cc6ff016..46b12d036 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index f6a0c39c4..fd32cfde6 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php index bf27c6392..0be2a585b 100644 --- a/system/libraries/Cart.php +++ b/system/libraries/Cart.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index da4c548e6..f263d01b1 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 754dd1784..c8859b9c3 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index a46d4f462..18ef92dde 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index 151ce8dec..b5d12c490 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index c2212585d..e36652178 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 2d345c294..e75339697 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index e813efd89..cc865fd81 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 4cc628692..8e3180adc 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php index 11f2d2361..cbaee6108 100644 --- a/system/libraries/Javascript/Jquery.php +++ b/system/libraries/Javascript/Jquery.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 45a3cbbce..d0254abfc 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 4d18998b9..3a5e34792 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 57981af95..508bd4f4f 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 1e464d8b0..2f2848f35 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 05a470d86..28c93434d 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Session/SessionHandlerInterface.php b/system/libraries/Session/SessionHandlerInterface.php index 9dab5ac07..90bae937a 100644 --- a/system/libraries/Session/SessionHandlerInterface.php +++ b/system/libraries/Session/SessionHandlerInterface.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 64b4bb511..6d66e274b 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 8c4555481..5523655d2 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index c540996a7..f9dc426aa 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 9d7ab1172..cf52caac4 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index a31c45372..6a90a7405 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 2d9823093..3c7674e56 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.1 diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 23bdbbd58..944672e62 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 3b6cb1645..2bbe120c9 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 3f986f3e8..2ddc40a1a 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.3.1 diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 8a2dec76a..40ca50284 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 53d932a53..400ec1b37 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 55555f56f..cc1b65eb1 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index 00d1feca6..894597fa2 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 3e98ac568..e3d63e802 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index 2580b0b30..1abdcbbae 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -5,7 +5,7 @@ # # This content is released under the MIT License (MIT) # -# Copyright (c) 2014 - 2015, British Columbia Institute of Technology +# Copyright (c) 2014 - 2016, 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 @@ -26,7 +26,7 @@ # THE SOFTWARE. # # Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) -# Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) +# Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) # # http://opensource.org/licenses/MIT MIT License diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index a1ebb5205..8a4c9db59 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -41,7 +41,7 @@ master_doc = 'index' # General information about the project. project = u'CodeIgniter' -copyright = u'2014 - 2015, British Columbia Institute of Technology' +copyright = u'2014 - 2016, 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 @@ -229,7 +229,7 @@ man_pages = [ epub_title = u'CodeIgniter' epub_author = u'British Columbia Institute of Technology' epub_publisher = u'British Columbia Institute of Technology' -epub_copyright = u'2014 - 2015, British Columbia Institute of Technology' +epub_copyright = u'2014 - 2016, British Columbia Institute of Technology' # The language of the text. It defaults to the language option # or en if the language is not set. diff --git a/user_guide_src/source/license.rst b/user_guide_src/source/license.rst index c1a32772f..3f7b2f58b 100644 --- a/user_guide_src/source/license.rst +++ b/user_guide_src/source/license.rst @@ -2,7 +2,7 @@ The MIT License (MIT) ##################### -Copyright (c) 2014 - 2015, British Columbia Institute of Technology +Copyright (c) 2014 - 2016, 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 -- cgit v1.2.3-24-g4f1b From 09124f5961c7a6c9a54b5e87ff59e8e9315471b9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:40:05 +0200 Subject: [ci skip] Update webchat link in readme --- readme.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.rst b/readme.rst index 2e35d7223..6ddee9410 100644 --- a/readme.rst +++ b/readme.rst @@ -57,7 +57,7 @@ Resources - `Language File Translations `_ - `Community Forums `_ - `Community Wiki `_ -- `Community IRC `_ +- `Community IRC `_ Report security issues to our `Security Panel `_ or via our `page on HackerOne `_, thank you. -- cgit v1.2.3-24-g4f1b From bd202c91b0e9cf0a8c93bcaa71df9574f5909346 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:50:18 +0200 Subject: [ci skip] Update codeigniter.com links to https --- application/config/config.php | 8 ++++---- application/config/hooks.php | 2 +- application/config/memcached.php | 2 +- application/config/profiler.php | 2 +- application/config/routes.php | 2 +- application/config/smileys.php | 2 +- application/controllers/Welcome.php | 2 +- composer.json | 2 +- contributing.md | 4 ++-- index.php | 4 ++-- readme.rst | 6 +++--- system/core/Benchmark.php | 4 ++-- system/core/CodeIgniter.php | 4 ++-- system/core/Common.php | 4 ++-- system/core/Config.php | 4 ++-- system/core/Controller.php | 4 ++-- system/core/Exceptions.php | 4 ++-- system/core/Hooks.php | 4 ++-- system/core/Input.php | 4 ++-- system/core/Lang.php | 4 ++-- system/core/Loader.php | 4 ++-- system/core/Log.php | 4 ++-- system/core/Model.php | 4 ++-- system/core/Output.php | 4 ++-- system/core/Router.php | 4 ++-- system/core/Security.php | 4 ++-- system/core/URI.php | 4 ++-- system/core/Utf8.php | 4 ++-- system/core/compat/hash.php | 4 ++-- system/core/compat/mbstring.php | 4 ++-- system/core/compat/password.php | 4 ++-- system/core/compat/standard.php | 4 ++-- system/database/DB.php | 4 ++-- system/database/DB_cache.php | 4 ++-- system/database/DB_driver.php | 4 ++-- system/database/DB_forge.php | 4 ++-- system/database/DB_query_builder.php | 4 ++-- system/database/DB_result.php | 4 ++-- system/database/DB_utility.php | 4 ++-- system/database/drivers/cubrid/cubrid_driver.php | 4 ++-- system/database/drivers/cubrid/cubrid_forge.php | 4 ++-- system/database/drivers/cubrid/cubrid_result.php | 4 ++-- system/database/drivers/cubrid/cubrid_utility.php | 4 ++-- system/database/drivers/ibase/ibase_driver.php | 4 ++-- system/database/drivers/ibase/ibase_forge.php | 4 ++-- system/database/drivers/ibase/ibase_result.php | 4 ++-- system/database/drivers/ibase/ibase_utility.php | 4 ++-- system/database/drivers/mssql/mssql_driver.php | 4 ++-- system/database/drivers/mssql/mssql_forge.php | 4 ++-- system/database/drivers/mssql/mssql_result.php | 4 ++-- system/database/drivers/mssql/mssql_utility.php | 4 ++-- system/database/drivers/mysql/mysql_driver.php | 4 ++-- system/database/drivers/mysql/mysql_forge.php | 4 ++-- system/database/drivers/mysql/mysql_result.php | 4 ++-- system/database/drivers/mysql/mysql_utility.php | 4 ++-- system/database/drivers/mysqli/mysqli_driver.php | 4 ++-- system/database/drivers/mysqli/mysqli_forge.php | 4 ++-- system/database/drivers/mysqli/mysqli_result.php | 4 ++-- system/database/drivers/mysqli/mysqli_utility.php | 4 ++-- system/database/drivers/oci8/oci8_driver.php | 4 ++-- system/database/drivers/oci8/oci8_forge.php | 4 ++-- system/database/drivers/oci8/oci8_result.php | 4 ++-- system/database/drivers/oci8/oci8_utility.php | 4 ++-- system/database/drivers/odbc/odbc_driver.php | 4 ++-- system/database/drivers/odbc/odbc_forge.php | 4 ++-- system/database/drivers/odbc/odbc_result.php | 4 ++-- system/database/drivers/odbc/odbc_utility.php | 4 ++-- system/database/drivers/pdo/pdo_driver.php | 4 ++-- system/database/drivers/pdo/pdo_forge.php | 4 ++-- system/database/drivers/pdo/pdo_result.php | 4 ++-- system/database/drivers/pdo/pdo_utility.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php | 4 ++-- .../database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 4 ++-- .../database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php | 4 ++-- .../database/drivers/pdo/subdrivers/pdo_informix_driver.php | 4 ++-- .../database/drivers/pdo/subdrivers/pdo_informix_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php | 4 ++-- system/database/drivers/postgre/postgre_driver.php | 4 ++-- system/database/drivers/postgre/postgre_forge.php | 4 ++-- system/database/drivers/postgre/postgre_result.php | 4 ++-- system/database/drivers/postgre/postgre_utility.php | 4 ++-- system/database/drivers/sqlite/sqlite_driver.php | 4 ++-- system/database/drivers/sqlite/sqlite_forge.php | 4 ++-- system/database/drivers/sqlite/sqlite_result.php | 4 ++-- system/database/drivers/sqlite/sqlite_utility.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_driver.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_forge.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_result.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_utility.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_driver.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_forge.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_result.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_utility.php | 4 ++-- system/helpers/array_helper.php | 4 ++-- system/helpers/captcha_helper.php | 4 ++-- system/helpers/cookie_helper.php | 4 ++-- system/helpers/date_helper.php | 4 ++-- system/helpers/directory_helper.php | 4 ++-- system/helpers/download_helper.php | 4 ++-- system/helpers/email_helper.php | 4 ++-- system/helpers/file_helper.php | 4 ++-- system/helpers/form_helper.php | 4 ++-- system/helpers/html_helper.php | 4 ++-- system/helpers/inflector_helper.php | 4 ++-- system/helpers/language_helper.php | 4 ++-- system/helpers/number_helper.php | 4 ++-- system/helpers/path_helper.php | 4 ++-- system/helpers/security_helper.php | 4 ++-- system/helpers/smiley_helper.php | 4 ++-- system/helpers/string_helper.php | 4 ++-- system/helpers/text_helper.php | 4 ++-- system/helpers/typography_helper.php | 4 ++-- system/helpers/url_helper.php | 4 ++-- system/helpers/xml_helper.php | 4 ++-- system/language/english/calendar_lang.php | 2 +- system/language/english/date_lang.php | 2 +- system/language/english/db_lang.php | 2 +- system/language/english/email_lang.php | 2 +- system/language/english/form_validation_lang.php | 2 +- system/language/english/ftp_lang.php | 2 +- system/language/english/imglib_lang.php | 2 +- system/language/english/migration_lang.php | 2 +- system/language/english/number_lang.php | 2 +- system/language/english/pagination_lang.php | 2 +- system/language/english/profiler_lang.php | 2 +- system/language/english/unit_test_lang.php | 2 +- system/language/english/upload_lang.php | 2 +- system/libraries/Cache/Cache.php | 2 +- system/libraries/Cache/drivers/Cache_apc.php | 2 +- system/libraries/Cache/drivers/Cache_dummy.php | 2 +- system/libraries/Cache/drivers/Cache_file.php | 2 +- system/libraries/Cache/drivers/Cache_memcached.php | 2 +- system/libraries/Cache/drivers/Cache_redis.php | 2 +- system/libraries/Cache/drivers/Cache_wincache.php | 2 +- system/libraries/Calendar.php | 4 ++-- system/libraries/Cart.php | 4 ++-- system/libraries/Driver.php | 2 +- system/libraries/Email.php | 4 ++-- system/libraries/Encrypt.php | 6 +++--- system/libraries/Encryption.php | 4 ++-- system/libraries/Form_validation.php | 4 ++-- system/libraries/Ftp.php | 4 ++-- system/libraries/Image_lib.php | 4 ++-- system/libraries/Javascript.php | 4 ++-- system/libraries/Javascript/Jquery.php | 4 ++-- system/libraries/Migration.php | 2 +- system/libraries/Pagination.php | 4 ++-- system/libraries/Parser.php | 4 ++-- system/libraries/Profiler.php | 4 ++-- system/libraries/Session/Session.php | 4 ++-- system/libraries/Session/SessionHandlerInterface.php | 4 ++-- system/libraries/Session/Session_driver.php | 4 ++-- system/libraries/Session/drivers/Session_database_driver.php | 4 ++-- system/libraries/Session/drivers/Session_files_driver.php | 4 ++-- .../libraries/Session/drivers/Session_memcached_driver.php | 4 ++-- system/libraries/Session/drivers/Session_redis_driver.php | 4 ++-- system/libraries/Table.php | 4 ++-- system/libraries/Trackback.php | 4 ++-- system/libraries/Typography.php | 4 ++-- system/libraries/Unit_test.php | 4 ++-- system/libraries/Upload.php | 4 ++-- system/libraries/User_agent.php | 4 ++-- system/libraries/Xmlrpc.php | 12 ++++++------ system/libraries/Xmlrpcs.php | 4 ++-- system/libraries/Zip.php | 4 ++-- user_guide_src/cilexer/cilexer/cilexer.py | 2 +- user_guide_src/source/contributing/index.rst | 4 ++-- user_guide_src/source/installation/upgrade_150.rst | 4 ++-- 186 files changed, 350 insertions(+), 350 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index 4f8f81406..23ef5a528 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -62,7 +62,7 @@ $config['uri_protocol'] = 'REQUEST_URI'; | This option allows you to add a suffix to all URLs generated by CodeIgniter. | For more information please see the user guide: | -| http://codeigniter.com/user_guide/general/urls.html +| https://codeigniter.com/user_guide/general/urls.html */ $config['url_suffix'] = ''; @@ -110,8 +110,8 @@ $config['enable_hooks'] = FALSE; | This item allows you to set the filename/classname prefix when extending | native libraries. For more information please see the user guide: | -| http://codeigniter.com/user_guide/general/core_classes.html -| http://codeigniter.com/user_guide/general/creating_libraries.html +| https://codeigniter.com/user_guide/general/core_classes.html +| https://codeigniter.com/user_guide/general/creating_libraries.html | */ $config['subclass_prefix'] = 'MY_'; @@ -311,7 +311,7 @@ $config['cache_query_string'] = FALSE; | If you use the Encryption class, you must set an encryption key. | See the user guide for more info. | -| http://codeigniter.com/user_guide/libraries/encryption.html +| https://codeigniter.com/user_guide/libraries/encryption.html | */ $config['encryption_key'] = ''; diff --git a/application/config/hooks.php b/application/config/hooks.php index 2eac5bbc9..a8f38a5dc 100644 --- a/application/config/hooks.php +++ b/application/config/hooks.php @@ -8,6 +8,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | This file lets you define "hooks" to extend CI without hacking the core | files. Please see the user guide for info: | -| http://codeigniter.com/user_guide/general/hooks.html +| https://codeigniter.com/user_guide/general/hooks.html | */ diff --git a/application/config/memcached.php b/application/config/memcached.php index 55949a66c..5c23b39c1 100644 --- a/application/config/memcached.php +++ b/application/config/memcached.php @@ -7,7 +7,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | ------------------------------------------------------------------------- | Your Memcached servers can be specified below. | -| See: http://codeigniter.com/user_guide/libraries/caching.html#memcached +| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached | */ $config = array( diff --git a/application/config/profiler.php b/application/config/profiler.php index b30204e16..3db22e39c 100644 --- a/application/config/profiler.php +++ b/application/config/profiler.php @@ -9,6 +9,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | data are displayed when the Profiler is enabled. | Please see the user guide for info: | -| http://codeigniter.com/user_guide/general/profiling.html +| https://codeigniter.com/user_guide/general/profiling.html | */ diff --git a/application/config/routes.php b/application/config/routes.php index a98c6d122..1b45740d7 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -19,7 +19,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | | Please see the user guide for complete details: | -| http://codeigniter.com/user_guide/general/routing.html +| https://codeigniter.com/user_guide/general/routing.html | | ------------------------------------------------------------------------- | RESERVED ROUTES diff --git a/application/config/smileys.php b/application/config/smileys.php index 1eeba4776..abf9a898d 100644 --- a/application/config/smileys.php +++ b/application/config/smileys.php @@ -10,7 +10,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | :-) and :) use the same image replacement. | | Please see user guide for more info: -| http://codeigniter.com/user_guide/helpers/smiley_helper.html +| https://codeigniter.com/user_guide/helpers/smiley_helper.html | */ $smileys = array( diff --git a/application/controllers/Welcome.php b/application/controllers/Welcome.php index 34535ef05..9213c0cf5 100644 --- a/application/controllers/Welcome.php +++ b/application/controllers/Welcome.php @@ -16,7 +16,7 @@ class Welcome extends CI_Controller { * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/ - * @see http://codeigniter.com/user_guide/general/urls.html + * @see https://codeigniter.com/user_guide/general/urls.html */ public function index() { diff --git a/composer.json b/composer.json index 0653a7885..4a9e8748e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "description": "The CodeIgniter framework", "name": "codeigniter/framework", "type": "project", - "homepage": "http://codeigniter.com", + "homepage": "https://codeigniter.com", "license": "MIT", "support": { "forum": "http://forum.codeigniter.com/", diff --git a/contributing.md b/contributing.md index 5a25698bf..2037e0424 100644 --- a/contributing.md +++ b/contributing.md @@ -20,8 +20,8 @@ for us to maintain quality of the code-base. ### PHP Style -All code must meet the [Style Guide](http://codeigniter.com/user_guide/general/styleguide.html), which is -essentially the [Allman indent style](http://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. +All code must meet the [Style Guide](https://codeigniter.com/user_guide/general/styleguide.html), which is +essentially the [Allman indent style](https://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. ### Documentation diff --git a/index.php b/index.php index 4dbc12a5a..a5f5df819 100755 --- a/index.php +++ b/index.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -109,7 +109,7 @@ switch (ENVIRONMENT) * folder than the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: - * http://codeigniter.com/user_guide/general/managing_apps.html + * https://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! */ diff --git a/readme.rst b/readme.rst index 6ddee9410..526950e67 100644 --- a/readme.rst +++ b/readme.rst @@ -16,7 +16,7 @@ Release Information This repo contains in-development code for future releases. To download the latest stable release please visit the `CodeIgniter Downloads -`_ page. +`_ page. ************************** Changelog and New Features @@ -39,7 +39,7 @@ issues, as well as missing features. Installation ************ -Please see the `installation section `_ +Please see the `installation section `_ of the CodeIgniter User Guide. ******* @@ -53,7 +53,7 @@ agreement `_ +- `User Guide `_ - `Language File Translations `_ - `Community Forums `_ - `Community Wiki `_ diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index 414a801ee..fc3b6aafb 100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -47,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/benchmark.html + * @link https://codeigniter.com/user_guide/libraries/benchmark.html */ class CI_Benchmark { diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 1394fd862..3b728ddae 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage CodeIgniter * @category Front-controller * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/ + * @link https://codeigniter.com/user_guide/ */ /** diff --git a/system/core/Common.php b/system/core/Common.php index 32e47b743..02421b1b1 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage CodeIgniter * @category Common Functions * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/ + * @link https://codeigniter.com/user_guide/ */ // ------------------------------------------------------------------------ diff --git a/system/core/Config.php b/system/core/Config.php index d03e02d4d..587877da6 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/config.html + * @link https://codeigniter.com/user_guide/libraries/config.html */ class CI_Config { diff --git a/system/core/Controller.php b/system/core/Controller.php index 260dee4f6..c5c6ee0f4 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -47,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/general/controllers.html + * @link https://codeigniter.com/user_guide/general/controllers.html */ class CI_Controller { diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 29a285166..e3270d609 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Exceptions * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/exceptions.html + * @link https://codeigniter.com/user_guide/libraries/exceptions.html */ class CI_Exceptions { diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 42090d16c..af71dba83 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/general/hooks.html + * @link https://codeigniter.com/user_guide/general/hooks.html */ class CI_Hooks { diff --git a/system/core/Input.php b/system/core/Input.php index 55474fd0c..bb7ad23ba 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Input * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/input.html + * @link https://codeigniter.com/user_guide/libraries/input.html */ class CI_Input { diff --git a/system/core/Lang.php b/system/core/Lang.php index 6913b92fa..20855f975 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Language * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/language.html + * @link https://codeigniter.com/user_guide/libraries/language.html */ class CI_Lang { diff --git a/system/core/Loader.php b/system/core/Loader.php index 500a86ae6..4d093d139 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Loader * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/loader.html + * @link https://codeigniter.com/user_guide/libraries/loader.html */ class CI_Loader { diff --git a/system/core/Log.php b/system/core/Log.php index 4343d746d..a5f64f29d 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Logging * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/general/errors.html + * @link https://codeigniter.com/user_guide/general/errors.html */ class CI_Log { diff --git a/system/core/Model.php b/system/core/Model.php index c9f1f8dd6..058387255 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/config.html + * @link https://codeigniter.com/user_guide/libraries/config.html */ class CI_Model { diff --git a/system/core/Output.php b/system/core/Output.php index 75116b3a6..faeb0ea97 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Output * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/output.html + * @link https://codeigniter.com/user_guide/libraries/output.html */ class CI_Output { diff --git a/system/core/Router.php b/system/core/Router.php index 85d1df719..e46ddb4a9 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/general/routing.html + * @link https://codeigniter.com/user_guide/general/routing.html */ class CI_Router { diff --git a/system/core/Security.php b/system/core/Security.php index 16375d17f..f697dd9c2 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Security * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/security.html + * @link https://codeigniter.com/user_guide/libraries/security.html */ class CI_Security { diff --git a/system/core/URI.php b/system/core/URI.php index 5262dd49c..22e454339 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category URI * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/uri.html + * @link https://codeigniter.com/user_guide/libraries/uri.html */ class CI_URI { diff --git a/system/core/Utf8.php b/system/core/Utf8.php index c6392c4e2..523f5f248 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category UTF-8 * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/utf8.html + * @link https://codeigniter.com/user_guide/libraries/utf8.html */ class CI_Utf8 { diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 7e5f1335d..405c014ab 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage CodeIgniter * @category Compatibility * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/ + * @link https://codeigniter.com/user_guide/ * @link http://php.net/hash */ diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php index ff8e79257..0c64ed346 100644 --- a/system/core/compat/mbstring.php +++ b/system/core/compat/mbstring.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage CodeIgniter * @category Compatibility * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/ + * @link https://codeigniter.com/user_guide/ * @link http://php.net/mbstring */ diff --git a/system/core/compat/password.php b/system/core/compat/password.php index 3062b89c0..6b6a0fc60 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage CodeIgniter * @category Compatibility * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/ + * @link https://codeigniter.com/user_guide/ * @link http://php.net/password */ diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index c9f7ce225..3d439e469 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage CodeIgniter * @category Compatibility * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/ + * @link https://codeigniter.com/user_guide/ */ // ------------------------------------------------------------------------ diff --git a/system/database/DB.php b/system/database/DB.php index d713a68dd..db777da1b 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ * * @param string|string[] $params * @param bool $query_builder_override diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 134737e31..f31a8e2fb 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_Cache { diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 78228818e..02f0cca72 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ abstract class CI_DB_driver { diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 6fc1e1f2b..4392eb25f 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ abstract class CI_DB_forge { diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 7a65225e4..637397fdc 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ abstract class CI_DB_query_builder extends CI_DB_driver { diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 7b313914a..745c92ca7 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_result { diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index c4bad9eaf..619004376 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ abstract class CI_DB_utility { diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 70f28d6d0..08ad3dcd4 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author Esen Sagynov - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_cubrid_driver extends CI_DB { diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index aac8f03b6..7091559cd 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author Esen Sagynov - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_cubrid_forge extends CI_DB_forge { diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php index 31ad09d72..1ac2f899e 100644 --- a/system/database/drivers/cubrid/cubrid_result.php +++ b/system/database/drivers/cubrid/cubrid_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author Esen Sagynov - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_cubrid_result extends CI_DB_result { diff --git a/system/database/drivers/cubrid/cubrid_utility.php b/system/database/drivers/cubrid/cubrid_utility.php index c9648c597..f853a9275 100644 --- a/system/database/drivers/cubrid/cubrid_utility.php +++ b/system/database/drivers/cubrid/cubrid_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author Esen Sagynov - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_cubrid_utility extends CI_DB_utility { diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index 6b1c77b7f..f1b89b748 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_ibase_driver extends CI_DB { diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php index 02e7a3798..44be2ed00 100644 --- a/system/database/drivers/ibase/ibase_forge.php +++ b/system/database/drivers/ibase/ibase_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_ibase_forge extends CI_DB_forge { diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php index c907e35ca..a2c0d1d80 100644 --- a/system/database/drivers/ibase/ibase_result.php +++ b/system/database/drivers/ibase/ibase_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_ibase_result extends CI_DB_result { diff --git a/system/database/drivers/ibase/ibase_utility.php b/system/database/drivers/ibase/ibase_utility.php index 0672113a3..4b8790eee 100644 --- a/system/database/drivers/ibase/ibase_utility.php +++ b/system/database/drivers/ibase/ibase_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_ibase_utility extends CI_DB_utility { diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 965e7b02d..2a954a275 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mssql_driver extends CI_DB { diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php index 4d888ef5c..9d0af0ce2 100644 --- a/system/database/drivers/mssql/mssql_forge.php +++ b/system/database/drivers/mssql/mssql_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mssql_forge extends CI_DB_forge { diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index af1e4d794..bd747c77b 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mssql_result extends CI_DB_result { diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php index deffaeef1..d236c2045 100644 --- a/system/database/drivers/mssql/mssql_utility.php +++ b/system/database/drivers/mssql/mssql_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mssql_utility extends CI_DB_utility { diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index c20b315a2..7628ebd55 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysql_driver extends CI_DB { diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index 51ec17c59..09560bd6c 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysql_forge extends CI_DB_forge { diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 3483d816a..286dcdf86 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysql_result extends CI_DB_result { diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index 3802a46fa..1b0abf4ee 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysql_utility extends CI_DB_utility { diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 61a780372..62f143f30 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysqli_driver extends CI_DB { diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php index 0f19b737c..42b69b55a 100644 --- a/system/database/drivers/mysqli/mysqli_forge.php +++ b/system/database/drivers/mysqli/mysqli_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysqli_forge extends CI_DB_forge { diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index 9b653088f..3ecb46c11 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysqli_result extends CI_DB_result { diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index c771f6f57..7192c55dd 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_mysqli_utility extends CI_DB_utility { diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 1f5258ecf..8bf432013 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.4.1 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ /** diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index f2ec2d109..97afcde89 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.4.1 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_oci8_forge extends CI_DB_forge { diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index c6cbd5c58..a70779cdf 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.4.1 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_oci8_result extends CI_DB_result { diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php index 372ad3737..cde4a5f03 100644 --- a/system/database/drivers/oci8/oci8_utility.php +++ b/system/database/drivers/oci8/oci8_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.4.1 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_oci8_utility extends CI_DB_utility { diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 5b17ff692..370cdaa97 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_odbc_driver extends CI_DB { diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php index 3dc765025..0a482731b 100644 --- a/system/database/drivers/odbc/odbc_forge.php +++ b/system/database/drivers/odbc/odbc_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/database/ + * @link https://codeigniter.com/database/ */ class CI_DB_odbc_forge extends CI_DB_forge { diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index a8aa3f67f..d5aec5277 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_odbc_result extends CI_DB_result { diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 35944a55b..61d1d21fc 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/database/ + * @link https://codeigniter.com/database/ */ class CI_DB_odbc_utility extends CI_DB_utility { diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 4bd7ecfee..612ec32be 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_driver extends CI_DB { diff --git a/system/database/drivers/pdo/pdo_forge.php b/system/database/drivers/pdo/pdo_forge.php index 25cd5d172..97bd4df82 100644 --- a/system/database/drivers/pdo/pdo_forge.php +++ b/system/database/drivers/pdo/pdo_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/database/ + * @link https://codeigniter.com/database/ */ class CI_DB_pdo_forge extends CI_DB_forge { diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php index 56370c972..6dcebda3c 100644 --- a/system/database/drivers/pdo/pdo_result.php +++ b/system/database/drivers/pdo/pdo_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_result extends CI_DB_result { diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index 8c45fd82f..dd5e3c4a2 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.1.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/database/ + * @link https://codeigniter.com/database/ */ class CI_DB_pdo_utility extends CI_DB_utility { diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php index c6cc66805..d93142876 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_4d_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index c28c47341..f6c3f3621 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_4d_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index e03c824f5..3e52cd753 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index 8846f49a1..9f542c6d6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index 2d19c3951..ee2465933 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index 7529addfa..42cdd188e 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_dblib_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index c5e772b18..237029d21 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 91703509f..34d5f7750 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php index 4d363b198..ecc822187 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php index e4693d6b0..6698d5dd3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_ibm_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php index 230e60be7..f9476ecd4 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php index 4de230161..ee79e9950 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_informix_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index a11ad796e..d6c9ce555 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php index 04792c844..dc4426598 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_mysql_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index cef12befe..7c79c0531 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index 64d1c89f0..2f7bb6c78 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index bd4849b2b..622b0d41c 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php index 4736c4244..3724c63d5 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/database/ + * @link https://codeigniter.com/database/ */ class CI_DB_pdo_odbc_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index a6c83a858..bd09a6756 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index 3b2a9c857..71ac3acb5 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index 9d1fb6447..5f85ecacf 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index 91951718a..afe9e7825 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index ee68e5b15..23422431e 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index e26c9597b..9091fc1d6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_pdo_sqlsrv_forge extends CI_DB_pdo_forge { diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index dd46503b1..1ef530afb 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_postgre_driver extends CI_DB { diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index e185a4007..8adff543d 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_postgre_forge extends CI_DB_forge { diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index 91e036432..6c46b0faf 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_postgre_result extends CI_DB_result { diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index 83e144420..abbe6f695 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_postgre_utility extends CI_DB_utility { diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index d889ef588..9adae0829 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite_driver extends CI_DB { diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 9b97f88cb..d6271bf90 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite_forge extends CI_DB_forge { diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index 322a63cba..9e53e14c7 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite_result extends CI_DB_result { diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index 84c2abb47..ed08929f1 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite_utility extends CI_DB_utility { diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index 24cff60f8..bf2be00d3 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite3_driver extends CI_DB { diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index 6201d8632..854a734aa 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite3_forge extends CI_DB_forge { diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php index 279c75673..b77c6ebc6 100644 --- a/system/database/drivers/sqlite3/sqlite3_result.php +++ b/system/database/drivers/sqlite3/sqlite3_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite3_result extends CI_DB_result { diff --git a/system/database/drivers/sqlite3/sqlite3_utility.php b/system/database/drivers/sqlite3/sqlite3_utility.php index 21dc0b84d..c9f772dde 100644 --- a/system/database/drivers/sqlite3/sqlite3_utility.php +++ b/system/database/drivers/sqlite3/sqlite3_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlite3_utility extends CI_DB_utility { diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 38f89d502..f3732544a 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.3 * @filesource */ @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlsrv_driver extends CI_DB { diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index c01cdccac..4f1e76c13 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.3 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlsrv_forge extends CI_DB_forge { diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php index 64541baab..b7e554858 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_result.php +++ b/system/database/drivers/sqlsrv/sqlsrv_result.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.3 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlsrv_result extends CI_DB_result { diff --git a/system/database/drivers/sqlsrv/sqlsrv_utility.php b/system/database/drivers/sqlsrv/sqlsrv_utility.php index ebb5d618f..bdc8c1700 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_utility.php +++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.3 * @filesource */ @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * * @category Database * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/user_guide/database/ */ class CI_DB_sqlsrv_utility extends CI_DB_utility { diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index 4bf7cd188..151324cf9 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/array_helper.html + * @link https://codeigniter.com/user_guide/helpers/array_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 4d8e98ea6..db708e894 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/captcha_helper.html + * @link https://codeigniter.com/user_guide/helpers/captcha_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index 95b8224c5..9c12005a6 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/cookie_helper.html + * @link https://codeigniter.com/user_guide/helpers/cookie_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 5b6b76231..8cc01f6e0 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/date_helper.html + * @link https://codeigniter.com/user_guide/helpers/date_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index 01ab4500d..d37db44ac 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/directory_helper.html + * @link https://codeigniter.com/user_guide/helpers/directory_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a005c91ef..c2362540e 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/download_helper.html + * @link https://codeigniter.com/user_guide/helpers/download_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php index b8f28da1c..65e79c8c5 100644 --- a/system/helpers/email_helper.php +++ b/system/helpers/email_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/email_helper.html + * @link https://codeigniter.com/user_guide/helpers/email_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 305759556..62af7e1f3 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/file_helper.html + * @link https://codeigniter.com/user_guide/helpers/file_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index badf7773d..1624bded0 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/form_helper.html + * @link https://codeigniter.com/user_guide/helpers/form_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 282aa5e7a..2c7595c4f 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/html_helper.html + * @link https://codeigniter.com/user_guide/helpers/html_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index a84647eb4..f02afcf23 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/inflector_helper.html + * @link https://codeigniter.com/user_guide/helpers/inflector_helper.html */ // -------------------------------------------------------------------- diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 1b5d1396f..2de694c2a 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/language_helper.html + * @link https://codeigniter.com/user_guide/helpers/language_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index 328651cdb..b5edfde9c 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/number_helper.html + * @link https://codeigniter.com/user_guide/helpers/number_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index c9d119435..7135b5d60 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/path_helper.html + * @link https://codeigniter.com/user_guide/helpers/path_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index ae88dfc07..80a0bf52e 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/security_helper.html + * @link https://codeigniter.com/user_guide/helpers/security_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index e13e1e4df..f437f0389 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/smiley_helper.html + * @link https://codeigniter.com/user_guide/helpers/smiley_helper.html * @deprecated 3.0.0 This helper is too specific for CI. */ diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 98cf882e0..70172270e 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/string_helper.html + * @link https://codeigniter.com/user_guide/helpers/string_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index b7f199d55..1100e670d 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/text_helper.html + * @link https://codeigniter.com/user_guide/helpers/text_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index e8c84c9ca..139dd8c5e 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/typography_helper.html + * @link https://codeigniter.com/user_guide/helpers/typography_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 6c96482d2..2c6672922 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/url_helper.html + * @link https://codeigniter.com/user_guide/helpers/url_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 8c2a6dcf1..dae094cf2 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/xml_helper.html + * @link https://codeigniter.com/user_guide/helpers/xml_helper.html */ // ------------------------------------------------------------------------ diff --git a/system/language/english/calendar_lang.php b/system/language/english/calendar_lang.php index d7afdfe37..c9603b580 100644 --- a/system/language/english/calendar_lang.php +++ b/system/language/english/calendar_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/date_lang.php b/system/language/english/date_lang.php index cdf55454e..bb341c89e 100644 --- a/system/language/english/date_lang.php +++ b/system/language/english/date_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/db_lang.php b/system/language/english/db_lang.php index be37f2bfd..c28bdab3b 100644 --- a/system/language/english/db_lang.php +++ b/system/language/english/db_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php index dd2331a82..18320269a 100644 --- a/system/language/english/email_lang.php +++ b/system/language/english/email_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 797c80245..23391e411 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/ftp_lang.php b/system/language/english/ftp_lang.php index 02a73449f..d649e4d28 100644 --- a/system/language/english/ftp_lang.php +++ b/system/language/english/ftp_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php index e52490e8d..fe06d449b 100644 --- a/system/language/english/imglib_lang.php +++ b/system/language/english/imglib_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/migration_lang.php b/system/language/english/migration_lang.php index f842e88bb..de81f6d63 100644 --- a/system/language/english/migration_lang.php +++ b/system/language/english/migration_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ diff --git a/system/language/english/number_lang.php b/system/language/english/number_lang.php index f1756ac16..010e83e05 100644 --- a/system/language/english/number_lang.php +++ b/system/language/english/number_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/pagination_lang.php b/system/language/english/pagination_lang.php index d9930d36b..a2874feff 100644 --- a/system/language/english/pagination_lang.php +++ b/system/language/english/pagination_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/profiler_lang.php b/system/language/english/profiler_lang.php index 2259823f7..b66f4e5e5 100644 --- a/system/language/english/profiler_lang.php +++ b/system/language/english/profiler_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/unit_test_lang.php b/system/language/english/unit_test_lang.php index b9b53e755..d9c09f9b0 100644 --- a/system/language/english/unit_test_lang.php +++ b/system/language/english/unit_test_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/language/english/upload_lang.php b/system/language/english/upload_lang.php index 7fe518424..a054031bd 100644 --- a/system/language/english/upload_lang.php +++ b/system/language/english/upload_lang.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 023ad02bb..64377de50 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.0 * @filesource */ diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index 621a59643..5f373ba17 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.0 * @filesource */ diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php index f1fb6b5a0..d8c4b0b2b 100644 --- a/system/libraries/Cache/drivers/Cache_dummy.php +++ b/system/libraries/Cache/drivers/Cache_dummy.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0 * @filesource */ diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 01295baf5..a52b05497 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0 * @filesource */ diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index f1011348d..67f9e4f45 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0 * @filesource */ diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 62c1b391a..59f14d16b 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index 46b12d036..9b5029d8c 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index fd32cfde6..2a42b5844 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/calendar.html + * @link https://codeigniter.com/user_guide/libraries/calendar.html */ class CI_Calendar { diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php index 0be2a585b..af527da9e 100644 --- a/system/libraries/Cart.php +++ b/system/libraries/Cart.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Shopping Cart * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/cart.html + * @link https://codeigniter.com/user_guide/libraries/cart.html * @deprecated 3.0.0 This class is too specific for CI. */ class CI_Cart { diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index f263d01b1..b8f740d6a 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ diff --git a/system/libraries/Email.php b/system/libraries/Email.php index c8859b9c3..ad4c02ff8 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/email.html + * @link https://codeigniter.com/user_guide/libraries/email.html */ class CI_Email { diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 18ef92dde..608f7da28 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/encryption.html + * @link https://codeigniter.com/user_guide/libraries/encryption.html */ class CI_Encrypt { @@ -198,7 +198,7 @@ class CI_Encrypt { * This allows for backwards compatibility and a method to transition to the * new encryption algorithms. * - * For more details, see http://codeigniter.com/user_guide/installation/upgrade_200.html#encryption + * For more details, see https://codeigniter.com/user_guide/installation/upgrade_200.html#encryption * * @param string * @param int (mcrypt mode constant) diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index b5d12c490..5e04fc1ad 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/encryption.html + * @link https://codeigniter.com/user_guide/libraries/encryption.html */ class CI_Encryption { diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index e36652178..194a9292e 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Validation * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/form_validation.html + * @link https://codeigniter.com/user_guide/libraries/form_validation.html */ class CI_Form_validation { diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index e75339697..53ff979e5 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/ftp.html + * @link https://codeigniter.com/user_guide/libraries/ftp.html */ class CI_FTP { diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index cc865fd81..d3a832415 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Image_lib * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/image_lib.html + * @link https://codeigniter.com/user_guide/libraries/image_lib.html */ class CI_Image_lib { diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 8e3180adc..ba8aedb60 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Javascript * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/javascript.html + * @link https://codeigniter.com/user_guide/libraries/javascript.html * @deprecated 3.0.0 This was never a good idea in the first place. */ class CI_Javascript { diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php index cbaee6108..1039a4aa8 100644 --- a/system/libraries/Javascript/Jquery.php +++ b/system/libraries/Javascript/Jquery.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Loader * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/javascript.html + * @link https://codeigniter.com/user_guide/libraries/javascript.html */ class CI_Jquery extends CI_Javascript { diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index d0254abfc..259c83c54 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 3a5e34792..9831730e4 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Pagination * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/pagination.html + * @link https://codeigniter.com/user_guide/libraries/pagination.html */ class CI_Pagination { diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 508bd4f4f..7f3be4672 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Parser * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/parser.html + * @link https://codeigniter.com/user_guide/libraries/parser.html */ class CI_Parser { diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 2f2848f35..4ad33bbac 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/general/profiling.html + * @link https://codeigniter.com/user_guide/general/profiling.html */ class CI_Profiler { diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 28c93434d..1e81ec53f 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 2.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ class CI_Session { diff --git a/system/libraries/Session/SessionHandlerInterface.php b/system/libraries/Session/SessionHandlerInterface.php index 90bae937a..ea825a066 100644 --- a/system/libraries/Session/SessionHandlerInterface.php +++ b/system/libraries/Session/SessionHandlerInterface.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ interface SessionHandlerInterface { diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 6d66e274b..02d984cdf 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ abstract class CI_Session_driver implements SessionHandlerInterface { diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 5523655d2..b3191e060 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ class CI_Session_database_driver extends CI_Session_driver implements SessionHandlerInterface { diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index f9dc426aa..5ac1dcd36 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ class CI_Session_files_driver extends CI_Session_driver implements SessionHandlerInterface { diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index cf52caac4..b2feb56f1 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHandlerInterface { diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 6a90a7405..047760554 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Sessions * @author Andrey Andreev - * @link http://codeigniter.com/user_guide/libraries/sessions.html + * @link https://codeigniter.com/user_guide/libraries/sessions.html */ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandlerInterface { diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 3c7674e56..e261d3e01 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.1 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category HTML Tables * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/table.html + * @link https://codeigniter.com/user_guide/libraries/table.html */ class CI_Table { diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 944672e62..7488a809b 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Trackbacks * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/trackback.html + * @link https://codeigniter.com/user_guide/libraries/trackback.html */ class CI_Trackback { diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 2bbe120c9..71a6d0809 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/typography.html + * @link https://codeigniter.com/user_guide/libraries/typography.html */ class CI_Typography { diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 2ddc40a1a..6db39212b 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.3.1 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category UnitTesting * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/unit_testing.html + * @link https://codeigniter.com/user_guide/libraries/unit_testing.html */ class CI_Unit_test { diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 40ca50284..5cb25eeec 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Uploads * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/file_uploading.html + * @link https://codeigniter.com/user_guide/libraries/file_uploading.html */ class CI_Upload { diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 400ec1b37..150643a4d 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category User Agent * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/user_agent.html + * @link https://codeigniter.com/user_guide/libraries/user_agent.html */ class CI_User_agent { diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index cc1b65eb1..d4bcbd019 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -51,7 +51,7 @@ if ( ! function_exists('xml_parser_create')) * @subpackage Libraries * @category XML-RPC * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/xmlrpc.html + * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html */ class CI_Xmlrpc { @@ -559,7 +559,7 @@ class CI_Xmlrpc { * * @category XML-RPC * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/xmlrpc.html + * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html */ class XML_RPC_Client extends CI_Xmlrpc { @@ -781,7 +781,7 @@ class XML_RPC_Client extends CI_Xmlrpc * * @category XML-RPC * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/xmlrpc.html + * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html */ class XML_RPC_Response { @@ -1030,7 +1030,7 @@ class XML_RPC_Response * * @category XML-RPC * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/xmlrpc.html + * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html */ class XML_RPC_Message extends CI_Xmlrpc { @@ -1649,7 +1649,7 @@ class XML_RPC_Message extends CI_Xmlrpc * * @category XML-RPC * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/xmlrpc.html + * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html */ class XML_RPC_Values extends CI_Xmlrpc { diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index 894597fa2..b75fa288e 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -56,7 +56,7 @@ if ( ! class_exists('CI_Xmlrpc', FALSE)) * @subpackage Libraries * @category XML-RPC * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/xmlrpc.html + * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html */ class CI_Xmlrpcs extends CI_Xmlrpc { diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index e3d63e802..d412ebf34 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License - * @link http://codeigniter.com + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Encryption * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/libraries/zip.html + * @link https://codeigniter.com/user_guide/libraries/zip.html */ class CI_Zip { diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index 1abdcbbae..d6bebe28d 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -1,5 +1,5 @@ # CodeIgniter -# http://codeigniter.com +# https://codeigniter.com # # An open source application development framework for PHP # diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index 5966070d1..9551fbeb7 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -86,9 +86,9 @@ PHP Style ========= All code must meet the `Style Guide -`_, which is +`_, which is essentially the `Allman indent style -`_, underscores and +`_, underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. diff --git a/user_guide_src/source/installation/upgrade_150.rst b/user_guide_src/source/installation/upgrade_150.rst index bfe01ebba..50eb5eae5 100644 --- a/user_guide_src/source/installation/upgrade_150.rst +++ b/user_guide_src/source/installation/upgrade_150.rst @@ -49,8 +49,8 @@ Open your application/config/config.php file and ADD these new items:: | This item allows you to set the filename/classname prefix when extending | native libraries. For more information please see the user guide: | - | http://codeigniter.com/user_guide/general/core_classes.html - | http://codeigniter.com/user_guide/general/creating_libraries.html + | https://codeigniter.com/user_guide/general/core_classes.html + | https://codeigniter.com/user_guide/general/creating_libraries.html | */ $config['subclass_prefix'] = 'MY_'; -- cgit v1.2.3-24-g4f1b From 700dbadb23bfa937f519df668a57c9050cd05062 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:51:46 +0200 Subject: Alter a valid URL test --- tests/codeigniter/libraries/Form_validation_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 26d82ec93..65a3bbff7 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -229,7 +229,7 @@ class Form_validation_test extends CI_TestCase { public function test_rule_valid_url() { $this->assertTrue($this->form_validation->valid_url('www.codeigniter.com')); - $this->assertTrue($this->form_validation->valid_url('http://codeigniter.eu')); + $this->assertTrue($this->form_validation->valid_url('http://codeigniter.com')); $this->assertFalse($this->form_validation->valid_url('htt://www.codeIgniter.com')); $this->assertFalse($this->form_validation->valid_url('')); -- cgit v1.2.3-24-g4f1b From 1924e879b165fb119847a49a7a5eab2f28295fa2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:55:34 +0200 Subject: [ci skip] Update ellislab.com links to https too --- index.php | 2 +- system/core/Benchmark.php | 2 +- system/core/CodeIgniter.php | 2 +- system/core/Common.php | 2 +- system/core/Config.php | 2 +- system/core/Controller.php | 2 +- system/core/Exceptions.php | 2 +- system/core/Hooks.php | 2 +- system/core/Input.php | 2 +- system/core/Lang.php | 2 +- system/core/Loader.php | 2 +- system/core/Log.php | 2 +- system/core/Model.php | 2 +- system/core/Output.php | 2 +- system/core/Router.php | 2 +- system/core/Security.php | 2 +- system/core/URI.php | 2 +- system/core/Utf8.php | 2 +- system/core/compat/hash.php | 2 +- system/core/compat/mbstring.php | 2 +- system/core/compat/password.php | 2 +- system/core/compat/standard.php | 2 +- system/database/DB.php | 2 +- system/database/DB_cache.php | 2 +- system/database/DB_driver.php | 2 +- system/database/DB_forge.php | 2 +- system/database/DB_query_builder.php | 2 +- system/database/DB_result.php | 2 +- system/database/DB_utility.php | 2 +- system/database/drivers/cubrid/cubrid_driver.php | 2 +- system/database/drivers/cubrid/cubrid_forge.php | 2 +- system/database/drivers/cubrid/cubrid_result.php | 2 +- system/database/drivers/cubrid/cubrid_utility.php | 2 +- system/database/drivers/ibase/ibase_driver.php | 2 +- system/database/drivers/ibase/ibase_forge.php | 2 +- system/database/drivers/ibase/ibase_result.php | 2 +- system/database/drivers/ibase/ibase_utility.php | 2 +- system/database/drivers/mssql/mssql_driver.php | 2 +- system/database/drivers/mssql/mssql_forge.php | 2 +- system/database/drivers/mssql/mssql_result.php | 2 +- system/database/drivers/mssql/mssql_utility.php | 2 +- system/database/drivers/mysql/mysql_driver.php | 2 +- system/database/drivers/mysql/mysql_forge.php | 2 +- system/database/drivers/mysql/mysql_result.php | 2 +- system/database/drivers/mysql/mysql_utility.php | 2 +- system/database/drivers/mysqli/mysqli_driver.php | 2 +- system/database/drivers/mysqli/mysqli_forge.php | 2 +- system/database/drivers/mysqli/mysqli_result.php | 2 +- system/database/drivers/mysqli/mysqli_utility.php | 2 +- system/database/drivers/oci8/oci8_driver.php | 2 +- system/database/drivers/oci8/oci8_forge.php | 2 +- system/database/drivers/oci8/oci8_result.php | 2 +- system/database/drivers/oci8/oci8_utility.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- system/database/drivers/odbc/odbc_forge.php | 2 +- system/database/drivers/odbc/odbc_result.php | 2 +- system/database/drivers/odbc/odbc_utility.php | 2 +- system/database/drivers/pdo/pdo_driver.php | 2 +- system/database/drivers/pdo/pdo_forge.php | 2 +- system/database/drivers/pdo/pdo_result.php | 2 +- system/database/drivers/pdo/pdo_utility.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_4d_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_4d_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_informix_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_informix_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php | 2 +- system/database/drivers/postgre/postgre_driver.php | 2 +- system/database/drivers/postgre/postgre_forge.php | 2 +- system/database/drivers/postgre/postgre_result.php | 2 +- system/database/drivers/postgre/postgre_utility.php | 2 +- system/database/drivers/sqlite/sqlite_driver.php | 2 +- system/database/drivers/sqlite/sqlite_forge.php | 2 +- system/database/drivers/sqlite/sqlite_result.php | 2 +- system/database/drivers/sqlite/sqlite_utility.php | 2 +- system/database/drivers/sqlite3/sqlite3_driver.php | 2 +- system/database/drivers/sqlite3/sqlite3_forge.php | 2 +- system/database/drivers/sqlite3/sqlite3_result.php | 2 +- system/database/drivers/sqlite3/sqlite3_utility.php | 2 +- system/database/drivers/sqlsrv/sqlsrv_driver.php | 2 +- system/database/drivers/sqlsrv/sqlsrv_forge.php | 2 +- system/database/drivers/sqlsrv/sqlsrv_result.php | 2 +- system/database/drivers/sqlsrv/sqlsrv_utility.php | 2 +- system/helpers/array_helper.php | 2 +- system/helpers/captcha_helper.php | 2 +- system/helpers/cookie_helper.php | 2 +- system/helpers/date_helper.php | 2 +- system/helpers/directory_helper.php | 2 +- system/helpers/download_helper.php | 2 +- system/helpers/email_helper.php | 2 +- system/helpers/file_helper.php | 2 +- system/helpers/form_helper.php | 2 +- system/helpers/html_helper.php | 2 +- system/helpers/inflector_helper.php | 2 +- system/helpers/language_helper.php | 2 +- system/helpers/number_helper.php | 2 +- system/helpers/path_helper.php | 2 +- system/helpers/security_helper.php | 2 +- system/helpers/smiley_helper.php | 2 +- system/helpers/string_helper.php | 2 +- system/helpers/text_helper.php | 2 +- system/helpers/typography_helper.php | 2 +- system/helpers/url_helper.php | 2 +- system/helpers/xml_helper.php | 2 +- system/language/english/calendar_lang.php | 2 +- system/language/english/date_lang.php | 2 +- system/language/english/db_lang.php | 2 +- system/language/english/email_lang.php | 2 +- system/language/english/form_validation_lang.php | 2 +- system/language/english/ftp_lang.php | 2 +- system/language/english/imglib_lang.php | 2 +- system/language/english/migration_lang.php | 2 +- system/language/english/number_lang.php | 2 +- system/language/english/pagination_lang.php | 2 +- system/language/english/profiler_lang.php | 2 +- system/language/english/unit_test_lang.php | 2 +- system/language/english/upload_lang.php | 2 +- system/libraries/Cache/Cache.php | 2 +- system/libraries/Cache/drivers/Cache_apc.php | 2 +- system/libraries/Cache/drivers/Cache_dummy.php | 2 +- system/libraries/Cache/drivers/Cache_file.php | 2 +- system/libraries/Cache/drivers/Cache_memcached.php | 2 +- system/libraries/Cache/drivers/Cache_redis.php | 2 +- system/libraries/Cache/drivers/Cache_wincache.php | 2 +- system/libraries/Calendar.php | 2 +- system/libraries/Cart.php | 2 +- system/libraries/Driver.php | 2 +- system/libraries/Email.php | 2 +- system/libraries/Encrypt.php | 2 +- system/libraries/Encryption.php | 2 +- system/libraries/Form_validation.php | 2 +- system/libraries/Ftp.php | 2 +- system/libraries/Image_lib.php | 2 +- system/libraries/Javascript.php | 2 +- system/libraries/Javascript/Jquery.php | 2 +- system/libraries/Migration.php | 2 +- system/libraries/Pagination.php | 2 +- system/libraries/Parser.php | 2 +- system/libraries/Profiler.php | 2 +- system/libraries/Session/Session.php | 2 +- system/libraries/Session/SessionHandlerInterface.php | 2 +- system/libraries/Session/Session_driver.php | 2 +- system/libraries/Session/drivers/Session_database_driver.php | 2 +- system/libraries/Session/drivers/Session_files_driver.php | 2 +- system/libraries/Session/drivers/Session_memcached_driver.php | 2 +- system/libraries/Session/drivers/Session_redis_driver.php | 2 +- system/libraries/Table.php | 2 +- system/libraries/Trackback.php | 2 +- system/libraries/Typography.php | 2 +- system/libraries/Unit_test.php | 2 +- system/libraries/Upload.php | 2 +- system/libraries/User_agent.php | 2 +- system/libraries/Xmlrpc.php | 2 +- system/libraries/Xmlrpcs.php | 2 +- system/libraries/Zip.php | 2 +- user_guide_src/cilexer/cilexer/cilexer.py | 2 +- 174 files changed, 174 insertions(+), 174 deletions(-) diff --git a/index.php b/index.php index a5f5df819..13fcd5996 100755 --- a/index.php +++ b/index.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index fc3b6aafb..b1d74f78f 100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 3b728ddae..727f37029 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Common.php b/system/core/Common.php index 02421b1b1..b87ce4d62 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Config.php b/system/core/Config.php index 587877da6..ca6fb3793 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Controller.php b/system/core/Controller.php index c5c6ee0f4..83b3df26c 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index e3270d609..a1c6a1970 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Hooks.php b/system/core/Hooks.php index af71dba83..856795cba 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Input.php b/system/core/Input.php index bb7ad23ba..a7c9ecd0d 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Lang.php b/system/core/Lang.php index 20855f975..1fcff078a 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Loader.php b/system/core/Loader.php index 4d093d139..37d1ecaf9 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Log.php b/system/core/Log.php index a5f64f29d..72d3cfbae 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Model.php b/system/core/Model.php index 058387255..941881a9f 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Output.php b/system/core/Output.php index faeb0ea97..ad87f8545 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Router.php b/system/core/Router.php index e46ddb4a9..045d36687 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Security.php b/system/core/Security.php index f697dd9c2..bad511dd3 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/URI.php b/system/core/URI.php index 22e454339..544f6c85f 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 523f5f248..f2f42e6ca 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 405c014ab..6854e4c26 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php index 0c64ed346..554d10040 100644 --- a/system/core/compat/mbstring.php +++ b/system/core/compat/mbstring.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/compat/password.php b/system/core/compat/password.php index 6b6a0fc60..f0c22c780 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index 3d439e469..47d47aeff 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB.php b/system/database/DB.php index db777da1b..b4b7767e8 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index f31a8e2fb..8855cc1b1 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 02f0cca72..df0ce6a9b 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 4392eb25f..826aa1ebf 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 637397fdc..e92c57091 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 745c92ca7..d9d1fccc7 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 619004376..70528286c 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 08ad3dcd4..77f591ced 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 7091559cd..8262beb6b 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php index 1ac2f899e..9cccb2570 100644 --- a/system/database/drivers/cubrid/cubrid_result.php +++ b/system/database/drivers/cubrid/cubrid_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/cubrid/cubrid_utility.php b/system/database/drivers/cubrid/cubrid_utility.php index f853a9275..942fa3b4e 100644 --- a/system/database/drivers/cubrid/cubrid_utility.php +++ b/system/database/drivers/cubrid/cubrid_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index f1b89b748..cbc1022ff 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php index 44be2ed00..9c358c365 100644 --- a/system/database/drivers/ibase/ibase_forge.php +++ b/system/database/drivers/ibase/ibase_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php index a2c0d1d80..f3c21fcec 100644 --- a/system/database/drivers/ibase/ibase_result.php +++ b/system/database/drivers/ibase/ibase_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/ibase/ibase_utility.php b/system/database/drivers/ibase/ibase_utility.php index 4b8790eee..619ebad01 100644 --- a/system/database/drivers/ibase/ibase_utility.php +++ b/system/database/drivers/ibase/ibase_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 2a954a275..d40d67a0b 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php index 9d0af0ce2..24d1fc204 100644 --- a/system/database/drivers/mssql/mssql_forge.php +++ b/system/database/drivers/mssql/mssql_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index bd747c77b..b62bf75cb 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php index d236c2045..cd23be828 100644 --- a/system/database/drivers/mssql/mssql_utility.php +++ b/system/database/drivers/mssql/mssql_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 7628ebd55..78b1d703a 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index 09560bd6c..fa84be371 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 286dcdf86..20cade2e1 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index 1b0abf4ee..4c1f2391b 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 62f143f30..06c34187f 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php index 42b69b55a..c17f729c0 100644 --- a/system/database/drivers/mysqli/mysqli_forge.php +++ b/system/database/drivers/mysqli/mysqli_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index 3ecb46c11..0ce07414f 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index 7192c55dd..79d9f3670 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 8bf432013..59f0e8456 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 97afcde89..1ca559a32 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index a70779cdf..fc860ea12 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php index cde4a5f03..ebe49c463 100644 --- a/system/database/drivers/oci8/oci8_utility.php +++ b/system/database/drivers/oci8/oci8_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 370cdaa97..19b7b744b 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php index 0a482731b..bac30bedc 100644 --- a/system/database/drivers/odbc/odbc_forge.php +++ b/system/database/drivers/odbc/odbc_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index d5aec5277..110d6ab0f 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 61d1d21fc..2e344963d 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 612ec32be..c6f84e0f9 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/pdo_forge.php b/system/database/drivers/pdo/pdo_forge.php index 97bd4df82..2595f7b6e 100644 --- a/system/database/drivers/pdo/pdo_forge.php +++ b/system/database/drivers/pdo/pdo_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php index 6dcebda3c..d1809bef2 100644 --- a/system/database/drivers/pdo/pdo_result.php +++ b/system/database/drivers/pdo/pdo_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index dd5e3c4a2..384661bf0 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php index d93142876..3dedfd9b3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index f6c3f3621..41994f9db 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 3e52cd753..837779804 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index 9f542c6d6..5f854061d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index ee2465933..84695ee9b 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index 42cdd188e..d5dd9aad1 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 237029d21..96dcc5ec1 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 34d5f7750..256fa1413 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php index ecc822187..2366c4036 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php index 6698d5dd3..a2dbfc25a 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php index f9476ecd4..d40d17a88 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php index ee79e9950..5af39b181 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index d6c9ce555..70f2bfd4e 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php index dc4426598..9d04a8a9a 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index 7c79c0531..dd1d31c26 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index 2f7bb6c78..d0b7be8f2 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index 622b0d41c..333448838 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php index 3724c63d5..7c65daa84 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index bd09a6756..ee8f76348 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index 71ac3acb5..214b6f528 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index 5f85ecacf..62690139c 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index afe9e7825..f6f9bb481 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index 23422431e..dfccb7d69 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index 9091fc1d6..602f895f1 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 1ef530afb..58d445187 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index 8adff543d..8d985ba7d 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index 6c46b0faf..354bb08d5 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index abbe6f695..bb5e6e04b 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 9adae0829..16b8c29c3 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index d6271bf90..8a1659430 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index 9e53e14c7..d40b98aab 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index ed08929f1..59c46f9ef 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index bf2be00d3..9743499bd 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index 854a734aa..43cbe33e5 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php index b77c6ebc6..aa559eef6 100644 --- a/system/database/drivers/sqlite3/sqlite3_result.php +++ b/system/database/drivers/sqlite3/sqlite3_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlite3/sqlite3_utility.php b/system/database/drivers/sqlite3/sqlite3_utility.php index c9f772dde..b47c086f6 100644 --- a/system/database/drivers/sqlite3/sqlite3_utility.php +++ b/system/database/drivers/sqlite3/sqlite3_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index f3732544a..0cd9ce16d 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index 4f1e76c13..f915dad3e 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php index b7e554858..fde7264b9 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_result.php +++ b/system/database/drivers/sqlsrv/sqlsrv_result.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/database/drivers/sqlsrv/sqlsrv_utility.php b/system/database/drivers/sqlsrv/sqlsrv_utility.php index bdc8c1700..726fe3ea6 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_utility.php +++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index 151324cf9..3fdccf909 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index db708e894..fd1b8f1ed 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index 9c12005a6..ca4324495 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 8cc01f6e0..c43209f05 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index d37db44ac..cdc4c16bc 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index c2362540e..a6463dfd7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php index 65e79c8c5..35944fc7b 100644 --- a/system/helpers/email_helper.php +++ b/system/helpers/email_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 62af7e1f3..0d8d1d0d9 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 1624bded0..04778b084 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 2c7595c4f..fdc463fca 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index f02afcf23..96b723c8d 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 2de694c2a..3721164b7 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index b5edfde9c..e7810c706 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 7135b5d60..838ece9e9 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 80a0bf52e..4eb63883d 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index f437f0389..688ca24c2 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 70172270e..db531fa9a 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 1100e670d..1fdbedda5 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index 139dd8c5e..928cb6d04 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 2c6672922..fd7b5e116 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index dae094cf2..3489da91c 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/calendar_lang.php b/system/language/english/calendar_lang.php index c9603b580..8af5e8056 100644 --- a/system/language/english/calendar_lang.php +++ b/system/language/english/calendar_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/date_lang.php b/system/language/english/date_lang.php index bb341c89e..39af5a239 100644 --- a/system/language/english/date_lang.php +++ b/system/language/english/date_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/db_lang.php b/system/language/english/db_lang.php index c28bdab3b..ed93452b4 100644 --- a/system/language/english/db_lang.php +++ b/system/language/english/db_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php index 18320269a..84fb09109 100644 --- a/system/language/english/email_lang.php +++ b/system/language/english/email_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 23391e411..92d6d5ebb 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/ftp_lang.php b/system/language/english/ftp_lang.php index d649e4d28..9e72bce42 100644 --- a/system/language/english/ftp_lang.php +++ b/system/language/english/ftp_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php index fe06d449b..7f23233b4 100644 --- a/system/language/english/imglib_lang.php +++ b/system/language/english/imglib_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/migration_lang.php b/system/language/english/migration_lang.php index de81f6d63..bce9210d3 100644 --- a/system/language/english/migration_lang.php +++ b/system/language/english/migration_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/number_lang.php b/system/language/english/number_lang.php index 010e83e05..0aaf51e72 100644 --- a/system/language/english/number_lang.php +++ b/system/language/english/number_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/pagination_lang.php b/system/language/english/pagination_lang.php index a2874feff..4d36bdee8 100644 --- a/system/language/english/pagination_lang.php +++ b/system/language/english/pagination_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/profiler_lang.php b/system/language/english/profiler_lang.php index b66f4e5e5..2d8fa51f4 100644 --- a/system/language/english/profiler_lang.php +++ b/system/language/english/profiler_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/unit_test_lang.php b/system/language/english/unit_test_lang.php index d9c09f9b0..29a4137a5 100644 --- a/system/language/english/unit_test_lang.php +++ b/system/language/english/unit_test_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/language/english/upload_lang.php b/system/language/english/upload_lang.php index a054031bd..058dca993 100644 --- a/system/language/english/upload_lang.php +++ b/system/language/english/upload_lang.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 64377de50..349af1579 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index 5f373ba17..dd18e7bc8 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php index d8c4b0b2b..4323a68af 100644 --- a/system/libraries/Cache/drivers/Cache_dummy.php +++ b/system/libraries/Cache/drivers/Cache_dummy.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index a52b05497..e1ce16a5a 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 67f9e4f45..c44958b97 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 59f14d16b..81b49e2fc 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index 9b5029d8c..f66080514 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index 2a42b5844..1f8ef814f 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php index af527da9e..44d87e0bf 100644 --- a/system/libraries/Cart.php +++ b/system/libraries/Cart.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index b8f740d6a..38c6aefe6 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Email.php b/system/libraries/Email.php index ad4c02ff8..007f9b431 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 608f7da28..1372a311f 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index 5e04fc1ad..92c38a0ed 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 194a9292e..31632762d 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 53ff979e5..88f265808 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index d3a832415..f594b7125 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index ba8aedb60..dcf933779 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php index 1039a4aa8..9df1be1c1 100644 --- a/system/libraries/Javascript/Jquery.php +++ b/system/libraries/Javascript/Jquery.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 259c83c54..7aefb6c23 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 9831730e4..cef98ebf4 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 7f3be4672..22cffb2c4 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 4ad33bbac..cc7641436 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 1e81ec53f..b93c00c15 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/SessionHandlerInterface.php b/system/libraries/Session/SessionHandlerInterface.php index ea825a066..b3533dd1e 100644 --- a/system/libraries/Session/SessionHandlerInterface.php +++ b/system/libraries/Session/SessionHandlerInterface.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 02d984cdf..98fc897e3 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index b3191e060..3ba9d3d36 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 5ac1dcd36..119bf6572 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index b2feb56f1..d017dfb2f 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 047760554..46b8fa1c2 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Table.php b/system/libraries/Table.php index e261d3e01..3bce294d8 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 7488a809b..a9b256464 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 71a6d0809..c45398bdc 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 6db39212b..3ac6af78e 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 5cb25eeec..15caebebe 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 150643a4d..c4e11592d 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index d4bcbd019..f965858e2 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index b75fa288e..afcdbe68c 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index d412ebf34..140ad7212 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index d6bebe28d..40582f88a 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -25,7 +25,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # -# Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) +# Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) # Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) # # http://opensource.org/licenses/MIT MIT License -- cgit v1.2.3-24-g4f1b From 8f1047ff6bc961159a7103e7be02e6cc459d925e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 13:20:12 +0200 Subject: Polish changes from PR #4269 --- system/helpers/html_helper.php | 28 ++++++++++++++++------ tests/codeigniter/helpers/html_helper_test.php | 32 ++++++++++++++++---------- user_guide_src/source/helpers/html_helper.rst | 12 +++++++--- 3 files changed, 50 insertions(+), 22 deletions(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 5cc994ff1..becd9a00c 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -359,17 +359,31 @@ if ( ! function_exists('meta')) // Turn single array into multidimensional $name = array($name); } - $allowed_type = array('charset', 'http-equiv', 'name', 'property'); + + $allowed_types = array('charset', 'http-equiv', 'name', 'property'); $str = ''; foreach ($name as $meta) { - $meta['type'] = isset($meta['type']) ? (($meta['type'] === 'equiv') ? 'http-equiv' : $meta['type']) : ''; // backward compatibility - $type = in_array($meta['type'], $allowed_type) ? $meta['type'] : 'name'; - $name = isset($meta['name']) ? $meta['name'] : ''; - $content = isset($meta['content']) ? $meta['content'] : ''; - $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; + // This is to preserve BC with pre-3.1 versions where only + // 'http-equiv' (default) and 'name' were supported. + if (isset($meta['type'])) + { + if ($meta['type'] === 'equiv') + { + $meta['type'] === 'http-equiv'; + } + elseif ( ! in_array($meta['type'], $allowed_types, TRUE)) + { + $meta['type'] = 'name'; + } + } + + $type = isset($meta['type']) ? $meta['type'] : 'name'; + $name = isset($meta['name']) ? $meta['name'] : ''; + $content = isset($meta['content']) ? $meta['content'] : ''; + $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; - $str .= ''.$newline; + $str .= ''.$newline; } return $str; diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php index 0b9655bf5..029f3f4cd 100644 --- a/tests/codeigniter/helpers/html_helper_test.php +++ b/tests/codeigniter/helpers/html_helper_test.php @@ -81,16 +81,24 @@ EOH; public function test_meta() { - $this->assertEquals("\n", meta('test', 'foo')); - - $expect = "\n"; - - $this->assertEquals($expect, meta(array('name' => 'foo'))); - - $expect = "\n"; - - $this->assertEquals($expect, meta(array('name' => 'foo', 'type' => 'charset'))); - + $this->assertEquals( + "\n", + meta('test', 'foo') + ); + + $this->assertEquals( + "\n", + meta(array('name' => 'foo')) + ); + + $this->assertEquals( + "\n", + meta(array('name' => 'foo', 'type' => 'charset')) + ); + + $this->assertEquals( + "\n", + meta(array('name' => 'foo', 'type' => 'charset')) + ); } - -} +} \ No newline at end of file diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index fffb2cab4..a19924dde 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -309,6 +309,11 @@ The following functions are available: 'name' => 'robots', 'content' => 'no-cache' ), + array( + '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: // // // + // // -.. php:function:: doctype([$type = 'html5']) +.. php:function:: doctype([$type = 'xhtml1-strict']) :param string $type: Doctype name :returns: HTML DocType tag :rtype: string - Helps you generate document type declarations, or DTD's. HTML 5 + Helps you generate document type declarations, or DTD's. XHTML 1.0 is used by default, but many doctypes are available. Example:: - echo doctype(); // + echo doctype(); // echo doctype('html4-trans'); // -- cgit v1.2.3-24-g4f1b From c5cbe8cafc55dae693b8fa973d8f219272d463bd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 13:22:42 +0200 Subject: [ci skip] Add changelog entry for PR #4269 --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7a0d0f9fa..bf5427ef4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,10 @@ Release Date: Not Released - 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 ` function :php:func:`meta()` with support for "charset" and "property" properties. + Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 363d56a6fafb1ff7c8dd8ac8d88abe854df26868 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jan 2016 16:15:50 +0200 Subject: [ci skip] 2016 in index.php --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 13fcd5996..5cc37108a 100755 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From 4e44a4d9fcf6590fddbba93545b8bde893910c22 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jan 2016 16:15:50 +0200 Subject: [ci skip] 2016 in index.php --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 13fcd5996..5cc37108a 100755 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology + * Copyright (c) 2014 - 2016, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From 1f91ac640ada20850fa651d249beea548a63d978 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 13 Jan 2016 02:05:39 +0200 Subject: [ci skip] Fix a changelog line --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8b0fb677a..3826fc66d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -53,7 +53,7 @@ Release Date: October 31, 2015 - Changed :doc:`Config Library ` method ``base_url()`` to fallback to ``$_SERVER['SERVER_ADDR']`` when ``$config['base_url']`` is empty in order to avoid *Host* header injections. - Changed :doc:`CAPTCHA Helper ` to use the operating system's PRNG when possible. -- :doc:`Database` +- :doc:`Database ` - Optimized :doc:`Database Utility ` method ``csv_from_result()`` for speed with larger result sets. - Added proper return values to :doc:`Database Transactions ` method ``trans_start()``. -- cgit v1.2.3-24-g4f1b From 4307bff0a4ae884d57cc0c0fa8f54de6c05000e7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 13 Jan 2016 02:13:10 +0200 Subject: [ci skip] Mark the start of 3.0.5 development --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 8 +++++++- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_305.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 6 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_305.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 727f37029..52b542654 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.4-dev'); + define('CI_VERSION', '3.0.5-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3826fc66d..1ba85fa35 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,11 +2,17 @@ Change Log ########## -Version 3.0.4 +Version 3.0.5 ============= Release Date: Not Released + +Version 3.0.4 +============= + +Release Date: January 13, 2016 + - General Changes - Updated :doc:`Security Library ` method ``get_random_bytes()`` to use PHP 7's ``random_bytes()`` function when possible. diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 8a4c9db59..12339eb91 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.0.4-dev' +version = '3.0.5-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.4-dev' +release = '3.0.5-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 00c98ab23..c7db54cd8 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.0.4-dev (Current version) `_ +- `CodeIgniter v3.0.5-dev (Current version) `_ +- `CodeIgniter v3.0.4 `_ - `CodeIgniter v3.0.3 `_ - `CodeIgniter v3.0.2 `_ - `CodeIgniter v3.0.1 `_ diff --git a/user_guide_src/source/installation/upgrade_305.rst b/user_guide_src/source/installation/upgrade_305.rst new file mode 100644 index 000000000..a47982481 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_305.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.4 to 3.0.5 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index dd777346d..102f20abf 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.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 Upgrading from 3.0.2 to 3.0.3 Upgrading from 3.0.1 to 3.0.2 -- cgit v1.2.3-24-g4f1b From d1688af15458af8684a109e5e65f41a8a02786fb Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Wed, 13 Jan 2016 08:46:03 -0500 Subject: Fix type in default constants configuration The word "destructive" was misspelled in the conditional portion. --- application/config/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/constants.php b/application/config/constants.php index e8d2c00ea..18d3b4b76 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -42,7 +42,7 @@ defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care -defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care +defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); -- cgit v1.2.3-24-g4f1b From 05268d6d08afb3b66e7edd5877c597ef7ea2113a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 13 Jan 2016 15:59:42 +0200 Subject: Merge pull request #4378 from jtneal/patch-1 [ci skip] Fix a defined() typo in config/constants.php --- application/config/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/constants.php b/application/config/constants.php index e8d2c00ea..18d3b4b76 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -42,7 +42,7 @@ defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care -defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care +defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); -- cgit v1.2.3-24-g4f1b From 009ce6c4b68375f77bc8864528602824d6c603ba Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Fri, 15 Jan 2016 10:25:53 -0500 Subject: Code styling changes as suggested by narfbg --- system/core/Log.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/system/core/Log.php b/system/core/Log.php index 0e1f7e2ac..f338a36ec 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -154,8 +154,8 @@ class CI_Log { * * Generally this function will be called using the global log_message() function * - * @param string the error level: 'error', 'debug' or 'info' - * @param string the error message + * @param string $level The error level: 'error', 'debug' or 'info' + * @param string $msg The error message * @return bool */ public function write_log($level, $msg) @@ -204,7 +204,7 @@ class CI_Log { $date = date($this->_date_fmt); } - $message .= $this->_format_log_line($level, $date, $msg); + $message .= $this->_format_line($level, $date, $msg); flock($fp, LOCK_EX); @@ -227,6 +227,8 @@ class CI_Log { return is_int($result); } + // -------------------------------------------------------------------- + /** * Format the log line. * @@ -234,13 +236,13 @@ class CI_Log { * If you want to change the log format, * extend the CI_Log class and override this method. * - * @param string the error level: 'error', 'debug' or 'info' - * @param string formatted date string - * @param string the log message + * @param string $level The error level + * @param string $date Formatted date string + * @param string $msg The log message * @return string formatted log line with a new line character '\n' at the end. */ - protected function _format_log_line($level, $date, $msg) + protected function _format_line($level, $date, $message) { - return $level.' - '.$date.' --> '.$msg."\n"; + return $level.' - '.$date.' --> '.$message."\n"; } } -- cgit v1.2.3-24-g4f1b From b6774cbeb11ac7bc5bd694c1da87ed77e9d4f9fb Mon Sep 17 00:00:00 2001 From: Sébastien Adam Date: Wed, 20 Jan 2016 09:25:22 +0100 Subject: Default doctype is now HTML 5 --- system/helpers/html_helper.php | 2 +- user_guide_src/source/helpers/html_helper.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index becd9a00c..696f0eee2 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -229,7 +229,7 @@ if ( ! function_exists('doctype')) * @param string type The doctype to be generated * @return string */ - function doctype($type = 'xhtml1-strict') + function doctype($type = 'html5') { static $doctypes; diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index a19924dde..b4e56fdca 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -330,18 +330,18 @@ The following functions are available: // -.. 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 + Helps you generate document type declarations, or DTD's. HTML 5 is used by default, but many doctypes are available. Example:: - echo doctype(); // + echo doctype(); // echo doctype('html4-trans'); // -- cgit v1.2.3-24-g4f1b From a062bdc6cf80268f89309d8be416cc3489e010c5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 20 Jan 2016 12:03:21 +0200 Subject: [ci skip] Add changelog entry and upgrade instructions following PR #4389 --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/installation/upgrade_310.rst | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9bbe38207..7c09047f0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -20,6 +20,7 @@ Release Date: Not Released - Helpers - Updated :doc:`HTML Helper ` function :php:func:`meta()` with support for "charset" and "property" properties. + - Changed :doc:`HTML Helper ` function :php:func:`doctype()` default document type to HTML 5. Version 3.0.5 ============= diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index 37772cd4f..b86bb1da3 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -57,3 +57,16 @@ 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 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. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 22df06b544cb74b4a71c0e1b0d9fa0bc13c95469 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 20 Jan 2016 12:10:08 +0200 Subject: [ci skip] Fix a documentation error on output cache times --- system/core/Output.php | 2 +- user_guide_src/source/libraries/output.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/core/Output.php b/system/core/Output.php index ad87f8545..ec9c21b91 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -377,7 +377,7 @@ class CI_Output { /** * Set Cache * - * @param int $time Cache expiration time in seconds + * @param int $time Cache expiration time in minutes * @return CI_Output */ public function cache($time) diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst index 84529f766..92060f66a 100644 --- a/user_guide_src/source/libraries/output.rst +++ b/user_guide_src/source/libraries/output.rst @@ -199,11 +199,11 @@ Class Reference .. php:method:: cache($time) - :param int $time: Cache expiration time in seconds + :param int $time: Cache expiration time in minutes :returns: CI_Output instance (method chaining) :rtype: CI_Output - Caches the current page for the specified amount of seconds. + Caches the current page for the specified amount of minutes. For more information, please see the :doc:`caching documentation <../general/caching>`. -- cgit v1.2.3-24-g4f1b From c70216d560d85adf907d9941868a0d8d3df868ca Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 20 Jan 2016 17:25:13 +0200 Subject: Fix #4391 --- system/libraries/Email.php | 18 +++++++++++------- user_guide_src/source/changelog.rst | 4 ++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 007f9b431..ed6f737a1 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -574,14 +574,18 @@ class CI_Email { $this->validate_email($this->_str_to_array($replyto)); } - if ($name === '') - { - $name = $replyto; - } - - if (strpos($name, '"') !== 0) + if ($name !== '') { - $name = '"'.$name.'"'; + // only use Q encoding if there are characters that would require it + if ( ! preg_match('/[\200-\377]/', $name)) + { + // add slashes for non-printing characters, slashes, and double quotes, and surround it in double quotes + $name = '"'.addcslashes($name, "\0..\37\177'\"\\").'"'; + } + else + { + $name = $this->_prep_q_encoding($name); + } } $this->set_header('Reply-To', $name.' <'.$replyto.'>'); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1ba85fa35..bd3d567d9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.0.5 Release Date: Not Released +Bug fixes for 3.0.5 +------------------- + +- Fixed a bug (#4391) - :doc:`Email Library ` method ``reply_to()`` didn't apply Q-encoding. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 356ad58b61d485570d4f4ca96fefda0d3a9c5d32 Mon Sep 17 00:00:00 2001 From: jekkos Date: Mon, 18 Jan 2016 21:14:06 +0100 Subject: Respect $config['cur_page'] variable for pagination After upgrading to CI3 I noticed that developers are able to determine the current page counter for pagination based on * Explicit query string parameters * URI segment configuration In earlier versions a developer could still set the current page counter in the pagination lib directly which is useful if you want to use pagination with HTTP POST instead of GET. This could be done by passing $config['cur_page'] = '10'; to the pagination function for link generation. Currently this code has changed and will always try to check whether the uri segment is a valid number or not, even if the cur_page variable was passed in the associative array, and fallback to zero if it fails to validate that result. This can be easily resolved by checking whether the counter was already set with a valid number from the $config array before trying to resolve it from the uri segment. This fix give a developer more flexibility and stop CI from overwriting the externally set value with an incorrect one. Signed-off-by: jekkos --- system/libraries/Pagination.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index cef98ebf4..9ac9661ad 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -497,7 +497,7 @@ class CI_Pagination { { $this->cur_page = $this->CI->input->get($this->query_string_segment); } - else + elseif (empty($this->cur_page)) { // Default to the last segment number if one hasn't been defined. if ($this->uri_segment === 0) @@ -512,6 +512,10 @@ class CI_Pagination { { $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page); } + } + else + { + $this->cur_page = (string) $this->cur_page; } // If something isn't quite right, back to the default base page. -- cgit v1.2.3-24-g4f1b From 1e77136c47032221ae0cdb7f6b43f56792dae224 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 20 Jan 2016 19:36:39 +0200 Subject: [ci skip] Remove a trailing space from latest PR merge --- system/libraries/Pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 9ac9661ad..44f848fe0 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -512,7 +512,7 @@ class CI_Pagination { { $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page); } - } + } else { $this->cur_page = (string) $this->cur_page; -- cgit v1.2.3-24-g4f1b From 4e87bd3622b3b9edcb90d7d4792f4374daf46446 Mon Sep 17 00:00:00 2001 From: jekkos Date: Mon, 18 Jan 2016 21:14:06 +0100 Subject: Respect $config['cur_page'] variable for pagination After upgrading to CI3 I noticed that developers are able to determine the current page counter for pagination based on * Explicit query string parameters * URI segment configuration In earlier versions a developer could still set the current page counter in the pagination lib directly which is useful if you want to use pagination with HTTP POST instead of GET. This could be done by passing $config['cur_page'] = '10'; to the pagination function for link generation. Currently this code has changed and will always try to check whether the uri segment is a valid number or not, even if the cur_page variable was passed in the associative array, and fallback to zero if it fails to validate that result. This can be easily resolved by checking whether the counter was already set with a valid number from the $config array before trying to resolve it from the uri segment. This fix give a developer more flexibility and stop CI from overwriting the externally set value with an incorrect one. Signed-off-by: jekkos --- system/libraries/Pagination.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index cef98ebf4..9ac9661ad 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -497,7 +497,7 @@ class CI_Pagination { { $this->cur_page = $this->CI->input->get($this->query_string_segment); } - else + elseif (empty($this->cur_page)) { // Default to the last segment number if one hasn't been defined. if ($this->uri_segment === 0) @@ -512,6 +512,10 @@ class CI_Pagination { { $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page); } + } + else + { + $this->cur_page = (string) $this->cur_page; } // If something isn't quite right, back to the default base page. -- cgit v1.2.3-24-g4f1b From ca26561a987bf0ec6e2736ea4c2eab29c663b94b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 20 Jan 2016 19:36:39 +0200 Subject: [ci skip] Remove a trailing space from latest PR merge --- system/libraries/Pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 9ac9661ad..44f848fe0 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -512,7 +512,7 @@ class CI_Pagination { { $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page); } - } + } else { $this->cur_page = (string) $this->cur_page; -- cgit v1.2.3-24-g4f1b From b5d410530f7641ba0feb1ec0e25b4243be1fe053 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 20 Jan 2016 19:41:29 +0200 Subject: [ci skip] Add changelog entry for PR #4384 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index bd3d567d9..d0d0a10eb 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Bug fixes for 3.0.5 ------------------- - Fixed a bug (#4391) - :doc:`Email Library ` method ``reply_to()`` didn't apply Q-encoding. +- Fixed a bug (#4384) - :doc:`Pagination Library ` ignored (possible) *cur_page* configuration value. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 075bdb4e90d9b567cdb4db3e46410854c0437856 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jan 2016 13:31:23 +0200 Subject: Fix #4395 --- system/database/DB_query_builder.php | 16 +++++++++++++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index e92c57091..c180a17e9 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1379,7 +1379,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->from($table); } - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_orderby)) + // ORDER BY usage is often problematic here (most notably + // on Microsoft SQL Server) and ultimately unnecessary + // for selecting COUNT(*) ... + if ( ! empty($this->qb_orderby)) + { + $orderby = $this->qb_orderby; + $this->qb_orderby = NULL; + } + + $result = ($this->qb_distinct === TRUE) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); @@ -1387,6 +1396,11 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { $this->_reset_select(); } + // If we've previously reset the qb_orderby values, get them back + elseif ( ! isset($this->qb_orderby)) + { + $this->qb_orderby = $orderby; + } if ($result->num_rows() === 0) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d0d0a10eb..466726a7e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,6 +12,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4391) - :doc:`Email Library ` method ``reply_to()`` didn't apply Q-encoding. - Fixed a bug (#4384) - :doc:`Pagination Library ` ignored (possible) *cur_page* configuration value. +- Fixed a bug (#4395) - :doc:`Query Builder ` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 8ec82e2885d60847331e88f22ecffa71feafcb61 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jan 2016 16:33:31 +0200 Subject: Fix #4399 --- system/database/DB_query_builder.php | 43 +++++++++++++++++++++++------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index c180a17e9..be7582815 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1458,20 +1458,26 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param bool $escape Whether to escape values and identifiers * @return int Number of rows inserted or FALSE on failure */ - public function insert_batch($table = '', $set = NULL, $escape = NULL) + public function insert_batch($table, $set = NULL, $escape = NULL) { - if ($set !== NULL) + if ($set === NULL) { - $this->set_insert_batch($set, '', $escape); + if (empty($this->qb_set)) + { + return ($this->db_debug) ? $this->display_error('db_must_use_set') : FALSE; + } } - - if (count($this->qb_set) === 0) + else { - // No valid data array. Folds in cases where keys and values did not match up - return ($this->db_debug) ? $this->display_error('db_must_use_set') : FALSE; + if (empty($set)) + { + return ($this->db_debug) ? $this->display_error('insert_batch() called with no data') : FALSE; + } + + $this->set_insert_batch($set, '', $escape); } - if ($table === '') + if (strlen($table) === 0) { if ( ! isset($this->qb_from[0])) { @@ -1859,7 +1865,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the where key * @return int number of rows affected or FALSE on failure */ - public function update_batch($table = '', $set = NULL, $index = NULL) + public function update_batch($table, $set = NULL, $index = NULL) { // Combine any cached components with the current statements $this->_merge_cache(); @@ -1869,17 +1875,24 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return ($this->db_debug) ? $this->display_error('db_must_use_index') : FALSE; } - if ($set !== NULL) + if ($set === NULL) { - $this->set_update_batch($set, $index); + if (empty($this->qb_set)) + { + return ($this->db_debug) ? $this->display_error('db_must_use_set') : FALSE; + } } - - if (count($this->qb_set) === 0) + else { - return ($this->db_debug) ? $this->display_error('db_must_use_set') : FALSE; + if (empty($set)) + { + return ($this->db_debug) ? $this->display_error('update_batch() called with no data') : FALSE; + } + + $this->set_update_batch($set, $index); } - if ($table === '') + if (strlen($table) === 0) { if ( ! isset($this->qb_from[0])) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 466726a7e..1623341ea 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4391) - :doc:`Email Library ` method ``reply_to()`` didn't apply Q-encoding. - Fixed a bug (#4384) - :doc:`Pagination Library ` ignored (possible) *cur_page* configuration value. - Fixed a bug (#4395) - :doc:`Query Builder ` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. +- Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 1089a862fc8cd6fdd6bb2a5f88e1446d37912ace Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 27 Jan 2016 16:15:01 +0200 Subject: Fix #4401 --- system/database/DB_driver.php | 8 ++++---- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index df0ce6a9b..bad641d17 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1566,11 +1566,11 @@ abstract class CI_DB_driver { '\s*>\s*', // > '\s+IS NULL', // IS NULL '\s+IS NOT NULL', // IS NOT NULL - '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) - '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) + '\s+EXISTS\s*\(.*\)', // EXISTS(sql) + '\s+NOT EXISTS\s*\(.*\)', // NOT EXISTS(sql) '\s+BETWEEN\s+', // BETWEEN value AND value - '\s+IN\s*\([^\)]+\)', // IN(list) - '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) + '\s+IN\s*\(.*\)', // IN(list) + '\s+NOT IN\s*\(.*\)', // NOT IN (list) '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] '\s+NOT LIKE\s+\S.*('.$_les.')?' // NOT LIKE 'expr'[ ESCAPE '%s'] ); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1623341ea..8e76f1d01 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4384) - :doc:`Pagination Library ` ignored (possible) *cur_page* configuration value. - Fixed a bug (#4395) - :doc:`Query Builder ` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. - Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. +- Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 4a7d2fd8d7dfc3512f15172431c75c8b2dba281a Mon Sep 17 00:00:00 2001 From: Sherman K Date: Fri, 29 Jan 2016 02:12:04 +0800 Subject: Fixed minor typographical error Signed-off-by: Sherman K --- user_guide_src/source/contributing/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index da5bb527b..64e9f0d92 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -155,5 +155,5 @@ could even alias git commit to use the -s flag so you don’t have to think abou it. By signing your work in this manner, you certify to a "Developer's Certificate -or Origin". The current version of this certificate is in the :doc:`/DCO` file +of Origin". The current version of this certificate is in the :doc:`/DCO` file in the root of this documentation. -- cgit v1.2.3-24-g4f1b From 168c7212a2b458bf27460e790b63066d24f2296d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 00:56:27 +0200 Subject: Merge pull request #4408 from ShrmnK/develop [ci skip] Fixed minor typographical error in DCO doc --- user_guide_src/source/contributing/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index 9551fbeb7..739d436a0 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -155,5 +155,5 @@ could even alias git commit to use the -s flag so you don’t have to think abou it. By signing your work in this manner, you certify to a "Developer's Certificate -or Origin". The current version of this certificate is in the :doc:`/DCO` file +of Origin". The current version of this certificate is in the :doc:`/DCO` file in the root of this documentation. -- cgit v1.2.3-24-g4f1b From 0b59bdd3cd647b44c83e746a5d3d3aa179325df4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 01:18:08 +0200 Subject: Fix a regression in Form helper caused by 0139e6a4a99cbe9b0cc06f394fa12d5691193b72 --- system/helpers/form_helper.php | 4 ++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 04778b084..3e1039525 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -791,7 +791,7 @@ if ( ! function_exists('set_checkbox')) // Unchecked checkbox and radio inputs are not even submitted by browsers ... if ($CI->input->method() === 'post') { - return ($input === 'value') ? ' checked="checked"' : ''; + return ($input === $value) ? ' checked="checked"' : ''; } return ($default === TRUE) ? ' checked="checked"' : ''; @@ -843,7 +843,7 @@ if ( ! function_exists('set_radio')) // Unchecked checkbox and radio inputs are not even submitted by browsers ... if ($CI->input->method() === 'post') { - return ($input === 'value') ? ' checked="checked"' : ''; + return ($input === $value) ? ' checked="checked"' : ''; } return ($default === TRUE) ? ' checked="checked"' : ''; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8e76f1d01..372261efd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4395) - :doc:`Query Builder ` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. - Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. - Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. +- Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 237b4c915d873ab1b4efc80d50e86b97cbb97c03 Mon Sep 17 00:00:00 2001 From: Sherman K Date: Fri, 29 Jan 2016 09:33:20 +0800 Subject: Consistent formatting of italicised file paths and inline code references Signed-off-by: Sherman K --- user_guide_src/source/installation/index.rst | 18 +++++++++--------- user_guide_src/source/installation/troubleshooting.rst | 6 +++--- user_guide_src/source/overview/at_a_glance.rst | 4 ++-- user_guide_src/source/tutorial/create_news_items.rst | 16 ++++++++-------- user_guide_src/source/tutorial/static_pages.rst | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/user_guide_src/source/installation/index.rst b/user_guide_src/source/installation/index.rst index 50493bbbd..fbf6ecee1 100644 --- a/user_guide_src/source/installation/index.rst +++ b/user_guide_src/source/installation/index.rst @@ -6,37 +6,37 @@ CodeIgniter is installed in four steps: #. Unzip the package. #. Upload the CodeIgniter folders and files to your server. Normally the - index.php file will be at your root. -#. Open the application/config/config.php file with a text editor and + *index.php* file will be at your root. +#. Open the *application/config/config.php* file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key. #. If you intend to use a database, open the - application/config/database.php file with a text editor and set your + *application/config/database.php* file with a text editor and set your database settings. If you wish to increase security by hiding the location of your CodeIgniter files you can rename the system and application folders to something more private. If you do rename them, you must open your main -index.php file and set the $system_path and $application_folder +*index.php* file and set the ``$system_path`` and ``$application_folder`` variables at the top of the file with the new name you've chosen. For the best security, both the system and any application folders should be placed above web root so that they are not directly accessible -via a browser. By default, .htaccess files are included in each folder +via a browser. By default, *.htaccess* files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn't -abide by the .htaccess. +abide by the *.htaccess*. If you would like to keep your views public it is also possible to move the views folder out of your application folder. After moving them, open your main index.php file and set the -$system_path, $application_folder and $view_folder variables, -preferably with a full path, e.g. '/www/MyUser/system'. +``$system_path``, ``$application_folder`` and ``$view_folder`` variables, +preferably with a full path, e.g. '*/www/MyUser/system*'. One additional measure to take in production environments is to disable PHP error reporting and any other development-only functionality. In -CodeIgniter, this can be done by setting the ENVIRONMENT constant, which +CodeIgniter, this can be done by setting the ``ENVIRONMENT`` constant, which is more fully described on the :doc:`security page <../general/security>`. diff --git a/user_guide_src/source/installation/troubleshooting.rst b/user_guide_src/source/installation/troubleshooting.rst index e874bb0ec..ffd65e0e9 100644 --- a/user_guide_src/source/installation/troubleshooting.rst +++ b/user_guide_src/source/installation/troubleshooting.rst @@ -4,12 +4,12 @@ Troubleshooting If you find that no matter what you put in your URL only your default page is loading, it might be that your server does not support the -REQUEST_URI variable needed to serve search-engine friendly URLs. As a -first step, open your application/config/config.php file and look for +``REQUEST_URI`` variable needed to serve search-engine friendly URLs. As a +first step, open your *application/config/config.php* file and look for the URI Protocol information. It will recommend that you try a couple alternate settings. If it still doesn't work after you've tried this you'll need to force CodeIgniter to add a question mark to your URLs. To -do this open your **application/config/config.php** file and change this:: +do this open your *application/config/config.php* file and change this:: $config['index_page'] = "index.php"; diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst index ce195c211..b4db6b18b 100644 --- a/user_guide_src/source/overview/at_a_glance.rst +++ b/user_guide_src/source/overview/at_a_glance.rst @@ -54,8 +54,8 @@ approach:: example.com/news/article/345 -Note: By default the index.php file is included in the URL but it can be -removed using a simple .htaccess file. +Note: By default the *index.php* file is included in the URL but it can be +removed using a simple *.htaccess* file. CodeIgniter Packs a Punch ========================= diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index bc0ce7612..e10eebd3b 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -14,7 +14,7 @@ To input data into the database you need to create a form where you can input the information to be stored. This means you'll be needing a form with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at -application/views/news/create.php. +*application/views/news/create.php*. :: @@ -35,7 +35,7 @@ application/views/news/create.php. There are only two things here that probably look unfamiliar to you: the -form_open() function and the validation_errors() function. +``form_open()`` function and the ``validation_errors()`` function. The first function is provided by the :doc:`form helper <../helpers/form_helper>` and renders the form element and @@ -76,7 +76,7 @@ validation <../libraries/form_validation>` library to do this. The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the -form validation are set. The set\_rules() method takes three arguments; +form validation are set. The ``set\_rules()`` method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required. @@ -88,7 +88,7 @@ Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it was submitted **and** passed all the rules, the model is called. After this, a view is loaded to display a success message. Create a view at -application/views/news/success.php and write a success message. +*application/views/news/success.php* and write a success message. Model ----- @@ -123,19 +123,19 @@ sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs. Let's continue with preparing the record that is going to be inserted -later, inside the $data array. Each element corresponds with a column in +later, inside the ``$data`` array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, -namely the post() method from the :doc:`input +namely the ``post()`` method from the :doc:`input library <../libraries/input>`. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input -library is loaded by default. At last, you insert our $data array into +library is loaded by default. At last, you insert our ``$data`` array into our database. Routing ------- Before you can start adding news items into your CodeIgniter application -you have to add an extra rule to config/routes.php file. Make sure your +you have to add an extra rule to *config/routes.php* file. Make sure your file contains the following. This makes sure CodeIgniter sees 'create' as a method instead of a news item's slug. diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 66621471e..569287c98 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -24,7 +24,7 @@ you'll see URL patterns that match: As URL schemes become more complex, this may change. But for now, this is all we will need to know. -Create a file at application/controllers/Pages.php with the following +Create a file at *application/controllers/Pages.php* with the following code. :: -- cgit v1.2.3-24-g4f1b From c31588a7fc0a2bc44d6b64644726cebba0be7b3f Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 25 Jan 2016 14:57:39 +0900 Subject: Fix formatting of paths Signed-off-by: Kenji Suzuki --- user_guide_src/source/installation/upgrade_300.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 45ce21320..9a40f2b60 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -65,7 +65,7 @@ Step 3: Replace config/mimes.php ******************************** This config file has been updated to contain more user mime-types, please copy -it to _application/config/mimes.php*. +it to *application/config/mimes.php*. ************************************************************** Step 4: Remove $autoload['core'] from your config/autoload.php @@ -206,13 +206,13 @@ Step 8: Replace your error templates ************************************ In CodeIgniter 3.0, the error templates are now considered as views and have been moved to the -_application/views/errors* directory. +*application/views/errors* directory. Furthermore, we've added support for CLI error templates in plain-text format that unlike HTML, is suitable for the command line. This of course requires another level of separation. -It is safe to move your old templates from _application/errors* to _application/views/errors/html*, -but you'll have to copy the new _application/views/errors/cli* directory from the CodeIgniter archive. +It is safe to move your old templates from *application/errors* to *application/views/errors/html*, +but you'll have to copy the new *application/views/errors/cli* directory from the CodeIgniter archive. ****************************************** Step 9: Update your config/routes.php file -- cgit v1.2.3-24-g4f1b From 6a802289522abc85309527855d9dc2faa34f54e0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 12:12:57 +0200 Subject: Merge pull request #4411 from kenjis/fix-upgrade_300-1 [ci skip] Fix formatting of paths in 3.0.0 upgrade instructions --- user_guide_src/source/installation/upgrade_300.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 45ce21320..9a40f2b60 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -65,7 +65,7 @@ Step 3: Replace config/mimes.php ******************************** This config file has been updated to contain more user mime-types, please copy -it to _application/config/mimes.php*. +it to *application/config/mimes.php*. ************************************************************** Step 4: Remove $autoload['core'] from your config/autoload.php @@ -206,13 +206,13 @@ Step 8: Replace your error templates ************************************ In CodeIgniter 3.0, the error templates are now considered as views and have been moved to the -_application/views/errors* directory. +*application/views/errors* directory. Furthermore, we've added support for CLI error templates in plain-text format that unlike HTML, is suitable for the command line. This of course requires another level of separation. -It is safe to move your old templates from _application/errors* to _application/views/errors/html*, -but you'll have to copy the new _application/views/errors/cli* directory from the CodeIgniter archive. +It is safe to move your old templates from *application/errors* to *application/views/errors/html*, +but you'll have to copy the new *application/views/errors/cli* directory from the CodeIgniter archive. ****************************************** Step 9: Update your config/routes.php file -- cgit v1.2.3-24-g4f1b From 6af9dd6e24687b6a7b9d14a058a47edcac761e61 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 13:29:57 +0200 Subject: Fix #4407 --- system/helpers/text_helper.php | 21 ++++++++++++++++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 1fdbedda5..79aaf1492 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -275,13 +275,28 @@ if ( ! function_exists('word_censor')) foreach ($censored as $badword) { + $badword = str_replace('\*', '\w*?', preg_quote($badword, '/')); if ($replacement !== '') { - $str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/i", "\\1{$replacement}\\3", $str); + $str = preg_replace( + "/({$delim})(".$badword.")({$delim})/i", + "\\1{$replacement}\\3", + $str + ); } - else + elseif (preg_match_all("/{$delim}(".$badword."){$delim}/i", $str, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE)) { - $str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/ie", "'\\1'.str_repeat('#', strlen('\\2')).'\\3'", $str); + $matches = $matches[1]; + for ($i = count($matches); $i >= 0; $i--) + { + $length = strlen($matches[$i][0]); + $str = substr_replace( + $str, + str_repeat('#', $length), + $matches[$i][1], + $length + ); + } } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 372261efd..a3fed6af3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. - Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. +- Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 9aab22e0a1aa876b98dcfa58781b0ffde71f97a1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 16:19:46 +0200 Subject: Fix an error from 6af9dd6e24687b6a7b9d14a058a47edcac761e61 Related: #4407 --- system/helpers/text_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 79aaf1492..4f9210f2d 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -287,7 +287,7 @@ if ( ! function_exists('word_censor')) elseif (preg_match_all("/{$delim}(".$badword."){$delim}/i", $str, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE)) { $matches = $matches[1]; - for ($i = count($matches); $i >= 0; $i--) + for ($i = count($matches) - 1; $i >= 0; $i--) { $length = strlen($matches[$i][0]); $str = substr_replace( -- cgit v1.2.3-24-g4f1b From 391d339b921623ce921bdb5520fb93f9cf62fac5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 30 Jan 2016 22:43:41 +0200 Subject: Fix #4415 and add unit tests for https://bugs.php.net/bug.php?id=51192 --- system/libraries/Form_validation.php | 8 ++++++++ tests/codeigniter/libraries/Form_validation_test.php | 7 +++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 16 insertions(+) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 31632762d..ea3bc6de7 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1214,6 +1214,14 @@ class CI_Form_validation { $str = $matches[2]; } + // PHP 7 accepts IPv6 addresses within square brackets as hostnames, + // but it appears that the PR that came in with https://bugs.php.net/bug.php?id=68039 + // was never merged into a PHP 5 branch ... https://3v4l.org/8PsSN + if (preg_match('/^\[([^\]]+)\]/', $str, $matches) && ! is_php('7') && filter_var($matches[1], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== FALSE) + { + $str = 'ipv6.host'.substr($str, strlen($matches[1]) + 2); + } + $str = 'http://'.$str; // There's a bug affecting PHP 5.2.13, 5.3.2 that considers the diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 65a3bbff7..f455b9146 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -231,6 +231,13 @@ class Form_validation_test extends CI_TestCase { $this->assertTrue($this->form_validation->valid_url('www.codeigniter.com')); $this->assertTrue($this->form_validation->valid_url('http://codeigniter.com')); + // https://bugs.php.net/bug.php?id=51192 + $this->assertTrue($this->form_validation->valid_url('http://accept-dashes.tld')); + $this->assertFalse($this->form_validation->valid_url('http://reject_underscores.tld')); + + // https://github.com/bcit-ci/CodeIgniter/issues/4415 + $this->assertTrue($this->form_validation->valid_url('http://[::1]/ipv6')); + $this->assertFalse($this->form_validation->valid_url('htt://www.codeIgniter.com')); $this->assertFalse($this->form_validation->valid_url('')); $this->assertFalse($this->form_validation->valid_url('code igniter')); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a3fed6af3..a8cb3f5c3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. +- Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From f51ef09e34f049911af99332f937ebaf723c129e Mon Sep 17 00:00:00 2001 From: Kristian Matthews Date: Sun, 31 Jan 2016 15:54:30 +0000 Subject: Added Unique Field Attribute Doc Signed-off-by: Kristian Matthews --- user_guide_src/source/database/forge.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index 646e3a56e..cb5c35662 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,6 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. +- unique/false : to generate a unique key for the field definition. :: @@ -110,6 +111,7 @@ Additionally, the following key/values can be used: 'blog_title' => array( 'type' => 'VARCHAR', 'constraint' => '100', + 'unique' => TRUE, ), 'blog_author' => array( 'type' =>'VARCHAR', @@ -175,14 +177,14 @@ below is for MySQL. $this->dbforge->add_key('blog_id', TRUE); // gives PRIMARY KEY `blog_id` (`blog_id`) - + $this->dbforge->add_key('blog_id', TRUE); $this->dbforge->add_key('site_id', TRUE); // gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`) - + $this->dbforge->add_key('blog_name'); // gives KEY `blog_name` (`blog_name`) - + $this->dbforge->add_key(array('blog_name', 'blog_label')); // gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`) @@ -261,7 +263,7 @@ number of additional fields. $fields = array( 'preferences' => array('type' => 'TEXT') ); - $this->dbforge->add_column('table_name', $fields); + $this->dbforge->add_column('table_name', $fields); // Executes: ALTER TABLE table_name ADD preferences TEXT If you are using MySQL or CUBIRD, then you can take advantage of their -- cgit v1.2.3-24-g4f1b From ea07f04725c56730d4b99d5f215d6e09edb54df6 Mon Sep 17 00:00:00 2001 From: Kristian Matthews Date: Mon, 1 Feb 2016 18:06:17 +0000 Subject: Changed Unique Value Changed unique value from false to true. Signed-off-by: Kristian Matthews --- user_guide_src/source/database/forge.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index cb5c35662..5af4f2248 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,7 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. -- unique/false : to generate a unique key for the field definition. +- unique/true : to generate a unique key for the field definition. :: -- cgit v1.2.3-24-g4f1b From e8bcc9eeb4ccbbea78442275c646de21aaaa6594 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 2 Feb 2016 14:01:50 +0200 Subject: Merge pull request #4419 from EpicKris/hotfix/database-forge-unique-doc [ci skip] Added docs for UNIQUE keys in DBForge --- user_guide_src/source/database/forge.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index 646e3a56e..5af4f2248 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,6 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. +- unique/true : to generate a unique key for the field definition. :: @@ -110,6 +111,7 @@ Additionally, the following key/values can be used: 'blog_title' => array( 'type' => 'VARCHAR', 'constraint' => '100', + 'unique' => TRUE, ), 'blog_author' => array( 'type' =>'VARCHAR', @@ -175,14 +177,14 @@ below is for MySQL. $this->dbforge->add_key('blog_id', TRUE); // gives PRIMARY KEY `blog_id` (`blog_id`) - + $this->dbforge->add_key('blog_id', TRUE); $this->dbforge->add_key('site_id', TRUE); // gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`) - + $this->dbforge->add_key('blog_name'); // gives KEY `blog_name` (`blog_name`) - + $this->dbforge->add_key(array('blog_name', 'blog_label')); // gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`) @@ -261,7 +263,7 @@ number of additional fields. $fields = array( 'preferences' => array('type' => 'TEXT') ); - $this->dbforge->add_column('table_name', $fields); + $this->dbforge->add_column('table_name', $fields); // Executes: ALTER TABLE table_name ADD preferences TEXT If you are using MySQL or CUBIRD, then you can take advantage of their -- cgit v1.2.3-24-g4f1b From 4dc17cf59142b3d3d80e9b3cdba77e7db0d2b75c Mon Sep 17 00:00:00 2001 From: Jonty Sewell Date: Wed, 3 Feb 2016 11:41:34 +0000 Subject: If attempting to write an empty session to Redis, a key will not actually be created, so when the driver tries to set the expiration timeout on the key, 0 is returned, triggering a warning from session_write_close Signed-off-by: Jonty Sewell --- system/libraries/Session/drivers/Session_redis_driver.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index c7c574202..aa8459bef 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -240,9 +240,15 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_failure; } - return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) - ? $this->_success - : $this->_failure; + if($this->_fingerprint === md5('')) + { + // A blank session will not be written to redis, so a timeout cannot be set on it + return $this->_success; + } else { + return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) + ? $this->_success + : $this->_failure; + } } return $this->_failure; -- cgit v1.2.3-24-g4f1b From ec9e96eb09caa9d024c89a8bdb1b00bf6540278a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 14:43:46 +0200 Subject: Fix #4427 --- system/helpers/captcha_helper.php | 45 +++++++++++++++++++------------------ user_guide_src/source/changelog.rst | 1 + 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index fd1b8f1ed..3c1e006f8 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -171,35 +171,36 @@ if ( ! function_exists('create_captcha')) $byte_index = $word_index = 0; while ($word_index < $word_length) { - list(, $rand_index) = unpack('C', $bytes[$byte_index++]); - if ($rand_index > $rand_max) + // Do we have more random data to use? + // It could be exhausted by previous iterations + // ignoring bytes higher than $rand_max. + if ($byte_index === $pool_length) { - // Was this the last byte we have? - // If so, try to fetch more. - if ($byte_index === $pool_length) + // No failures should be possible if the + // first get_random_bytes() call didn't + // return FALSE, but still ... + for ($i = 0; $i < 5; $i++) { - // No failures should be possible if - // the first get_random_bytes() call - // didn't return FALSE, but still ... - for ($i = 0; $i < 5; $i++) + if (($bytes = $security->get_random_bytes($pool_length)) === FALSE) { - if (($bytes = $security->get_random_bytes($pool_length)) === FALSE) - { - continue; - } - - $byte_index = 0; - break; + continue; } - if ($bytes === FALSE) - { - // Sadly, this means fallback to mt_rand() - $word = ''; - break; - } + $byte_index = 0; + break; + } + + if ($bytes === FALSE) + { + // Sadly, this means fallback to mt_rand() + $word = ''; + break; } + } + list(, $rand_index) = unpack('C', $bytes[$byte_index++]); + if ($rand_index > $rand_max) + { continue; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a8cb3f5c3..cde4b8b4e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Bug fixes for 3.0.5 - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). +- Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 71d64cbcfde625606ffb55867e0bb547123ef22f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 15:04:35 +0200 Subject: Fix #4430 --- system/libraries/Upload.php | 6 ++++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 7 insertions(+) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 15caebebe..f2418378b 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -526,6 +526,12 @@ class CI_Upload { $this->file_name = preg_replace('/\s+/', '_', $this->file_name); } + if ($this->file_ext_tolower && ($ext_length = strlen($this->file_ext))) + { + // file_ext was previously lower-cased by a get_extension() call + $this->file_name = substr($this->file_name, 0, -$ext_length).$this->file_ext; + } + /* * Validate the file name * This function appends an number onto the end of diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cde4b8b4e..1a06bd5ae 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). - Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. +- Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 105a48bbfc97be5902dbe80f90f8936fe174c9cf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 15:45:10 +0200 Subject: Add batch_size param to insert_batch(), update_batch() This should resolve #42 --- system/database/DB_query_builder.php | 12 ++++++------ user_guide_src/source/changelog.rst | 5 +++++ user_guide_src/source/database/query_builder.rst | 18 ++++++++++++++---- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index be7582815..4922dd623 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1458,7 +1458,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param bool $escape Whether to escape values and identifiers * @return int Number of rows inserted or FALSE on failure */ - public function insert_batch($table, $set = NULL, $escape = NULL) + public function insert_batch($table, $set = NULL, $escape = NULL, $batch_size = 100) { if ($set === NULL) { @@ -1489,9 +1489,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // Batch this baby $affected_rows = 0; - for ($i = 0, $total = count($this->qb_set); $i < $total; $i += 100) + for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) { - $this->query($this->_insert_batch($this->protect_identifiers($table, TRUE, $escape, FALSE), $this->qb_keys, array_slice($this->qb_set, $i, 100))); + $this->query($this->_insert_batch($this->protect_identifiers($table, TRUE, $escape, FALSE), $this->qb_keys, array_slice($this->qb_set, $i, $batch_size))); $affected_rows += $this->affected_rows(); } @@ -1865,7 +1865,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the where key * @return int number of rows affected or FALSE on failure */ - public function update_batch($table, $set = NULL, $index = NULL) + public function update_batch($table, $set = NULL, $index = NULL, $batch_size = 100) { // Combine any cached components with the current statements $this->_merge_cache(); @@ -1904,9 +1904,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // Batch this baby $affected_rows = 0; - for ($i = 0, $total = count($this->qb_set); $i < $total; $i += 100) + for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) { - $this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, 100), $this->protect_identifiers($index))); + $this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, $batch_size), $this->protect_identifiers($index))); $affected_rows += $this->affected_rows(); $this->qb_where = array(); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1a06bd5ae..7e72c230f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,11 @@ Version 3.0.5 Release Date: Not Released +- :doc:`Query Builder ` + + - Added a ``$batch_size`` parameter to the ``insert_batch()`` method (defaults to 100). + - Added a ``$batch_size`` parameter to the ``update_batch()`` method (defaults to 100). + Bug fixes for 3.0.5 ------------------- diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 5d9ae4592..3135f76da 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1433,15 +1433,20 @@ Class Reference Compiles and executes an INSERT statement. - .. php:method:: insert_batch([$table = ''[, $set = NULL[, $escape = NULL]]]) + .. php:method:: insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]]) :param string $table: Table name :param array $set: Data to insert :param bool $escape: Whether to escape values and identifiers + :param int $batch_size: Count of rows to insert at once :returns: Number of rows inserted or FALSE on failure :rtype: mixed - Compiles and executes batch INSERT statements. + Compiles and executes batch ``INSERT`` statements. + + .. note:: When more than ``$batch_size`` rows are provided, multiple + ``INSERT`` queries will be executed, each trying to insert + up to ``$batch_size`` rows. .. php:method:: set_insert_batch($key[, $value = ''[, $escape = NULL]]) @@ -1464,15 +1469,20 @@ Class Reference Compiles and executes an UPDATE statement. - .. php:method:: update_batch([$table = ''[, $set = NULL[, $value = NULL]]]) + .. php:method:: update_batch($table[, $set = NULL[, $value = NULL[, $batch_size = 100]]]) :param string $table: Table name :param array $set: Field name, or an associative array of field/value pairs :param string $value: Field value, if $set is a single field + :param int $batch_size: Count of conditions to group in a single query :returns: Number of rows updated or FALSE on failure :rtype: mixed - Compiles and executes batch UPDATE statements. + Compiles and executes batch ``UPDATE`` statements. + + .. note:: When more than ``$batch_size`` field/value pairs are provided, + multiple queries will be executed, each handling up to + ``$batch_size`` field/value pairs. .. php:method:: set_update_batch($key[, $value = ''[, $escape = NULL]]) -- cgit v1.2.3-24-g4f1b From b864ece65755e91e28a802824da7e4beebab3a9c Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 4 Feb 2016 13:02:39 -0500 Subject: [ci skip] fix comment --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index e565f0fd1..1b52bf3b8 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1731,7 +1731,7 @@ abstract class CI_DB_driver { * the table prefix onto it. Some logic is necessary in order to deal with * column names that include the path. Consider a query like this: * - * SELECT * FROM hostname.database.table.column AS c FROM hostname.database.table + * SELECT hostname.database.table.column AS c FROM hostname.database.table * * Or a query with aliasing: * -- cgit v1.2.3-24-g4f1b From 27eb5c9e63b15643f9648bb7198c680010debbd1 Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 4 Feb 2016 13:02:39 -0500 Subject: [ci skip] fix comment --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index bad641d17..848516adc 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1793,7 +1793,7 @@ abstract class CI_DB_driver { * the table prefix onto it. Some logic is necessary in order to deal with * column names that include the path. Consider a query like this: * - * SELECT * FROM hostname.database.table.column AS c FROM hostname.database.table + * SELECT hostname.database.table.column AS c FROM hostname.database.table * * Or a query with aliasing: * -- cgit v1.2.3-24-g4f1b From 880036d5cea0021258c43c0d0fba0e6fd9d04b69 Mon Sep 17 00:00:00 2001 From: Jonty Sewell Date: Fri, 5 Feb 2016 09:27:47 +0000 Subject: Revert previous changes - fixing the source of the problem rather than working around it Signed-off-by: Jonty Sewell --- system/libraries/Session/drivers/Session_redis_driver.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index aa8459bef..c7c574202 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -240,15 +240,9 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_failure; } - if($this->_fingerprint === md5('')) - { - // A blank session will not be written to redis, so a timeout cannot be set on it - return $this->_success; - } else { - return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) - ? $this->_success - : $this->_failure; - } + return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) + ? $this->_success + : $this->_failure; } return $this->_failure; -- cgit v1.2.3-24-g4f1b From 74f846890d69e6f5ff5f0bb4268539803242d015 Mon Sep 17 00:00:00 2001 From: Jonty Sewell Date: Fri, 5 Feb 2016 09:39:05 +0000 Subject: Add a flag to determine whether the redis key currently exists, and if not, force creation of it at write-time Signed-off-by: Jonty Sewell --- .../Session/drivers/Session_redis_driver.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index c7c574202..e62a3c597 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -69,6 +69,13 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle */ protected $_lock_key; + /** + * Key exists flag + * + * @var boolean + */ + protected $_key_exists = FALSE; + // ------------------------------------------------------------------------ /** @@ -189,7 +196,15 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle // Needed by write() to detect session_regenerate_id() calls $this->_session_id = $session_id; - $session_data = (string) $this->_redis->get($this->_key_prefix.$session_id); + $session_data = $this->_redis->get($this->_key_prefix.$session_id); + + if ($session_data === FALSE) + { + // The session ID does not exist in redis yet, so set a flag to create it + $this->_key_exists = FALSE; + $session_data = ''; + } + $this->_fingerprint = md5($session_data); return $session_data; } @@ -229,7 +244,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if (isset($this->_lock_key)) { $this->_redis->setTimeout($this->_lock_key, 300); - if ($this->_fingerprint !== ($fingerprint = md5($session_data))) + if ($this->_fingerprint !== ($fingerprint = md5($session_data)) OR $this->_key_exists === FALSE) { if ($this->_redis->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) { -- cgit v1.2.3-24-g4f1b From a7f9ea28aa40bd036de1cee7a4ec4ab63235fd12 Mon Sep 17 00:00:00 2001 From: Jonty Sewell Date: Fri, 5 Feb 2016 10:33:00 +0000 Subject: Set the _key_exists flag to TRUE when the key does in fact exist. Set it to FALSE if the ID is being regenerated, and set it to TRUE once it's been written. Signed-off-by: Jonty Sewell --- system/libraries/Session/drivers/Session_redis_driver.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index e62a3c597..be5b37e81 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -72,7 +72,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle /** * Key exists flag * - * @var boolean + * @var bool */ protected $_key_exists = FALSE; @@ -204,6 +204,10 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle $this->_key_exists = FALSE; $session_data = ''; } + else + { + $this->_key_exists = TRUE; + } $this->_fingerprint = md5($session_data); return $session_data; @@ -237,7 +241,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_failure; } - $this->_fingerprint = md5(''); + $this->_key_exists = FALSE; $this->_session_id = $session_id; } @@ -249,6 +253,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) { $this->_fingerprint = $fingerprint; + $this->_key_exists = TRUE; return $this->_success; } -- cgit v1.2.3-24-g4f1b From 0f19fd0550e95354e8512c28ff19799aa913c0f9 Mon Sep 17 00:00:00 2001 From: Jonty Sewell Date: Fri, 5 Feb 2016 10:38:43 +0000 Subject: Setting the flag to FALSE is unnecessary since it defaults to FALSE, therefore this block of code can be reduced to a single statement Signed-off-by: Jonty Sewell --- system/libraries/Session/drivers/Session_redis_driver.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index be5b37e81..c4483e439 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -198,16 +198,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle $session_data = $this->_redis->get($this->_key_prefix.$session_id); - if ($session_data === FALSE) - { - // The session ID does not exist in redis yet, so set a flag to create it - $this->_key_exists = FALSE; - $session_data = ''; - } - else - { - $this->_key_exists = TRUE; - } + is_string($session_data) && $this->_key_exists = TRUE; $this->_fingerprint = md5($session_data); return $session_data; -- cgit v1.2.3-24-g4f1b From 805eddaefd9503b5dbbd924bd6da66e29c4768f3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 12:44:19 +0200 Subject: Fix #4431 --- system/database/DB_query_builder.php | 9 ++++----- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 4922dd623..68df309f9 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -542,9 +542,8 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $s = $m[0][$i][1] + strlen($m[0][$i][0]), $i++) { $temp = substr($cond, $s, ($m[0][$i][1] - $s)); - - $newcond .= preg_match("/([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $temp, $match) - ? $this->protect_identifiers($match[1]).$match[2].$this->protect_identifiers($match[3]) + $newcond .= preg_match("/(.*)([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $temp, $match) + ? $match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]) : $temp; $newcond .= $m[0][$i][0]; @@ -553,9 +552,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $cond = ' ON '.$newcond; } // Split apart the condition and protect the identifiers - elseif ($escape === TRUE && preg_match("/([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) + elseif ($escape === TRUE && preg_match("/(.*)([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) { - $cond = ' ON '.$this->protect_identifiers($match[1]).$match[2].$this->protect_identifiers($match[3]); + $cond = ' ON '.$match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]); } elseif ( ! $this->_has_operator($cond)) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7e72c230f..e993a862a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). - Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. +- Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 28fdb3185c4f1e4f78b493c5a7eab09e975260ef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 14:04:32 +0200 Subject: Fix a regression caused by 805eddaefd9503b5dbbd924bd6da66e29c4768f3 --- system/database/DB_query_builder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 68df309f9..b46730e22 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -552,9 +552,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $cond = ' ON '.$newcond; } // Split apart the condition and protect the identifiers - elseif ($escape === TRUE && preg_match("/(.*)([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) + elseif ($escape === TRUE && preg_match("/([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) { - $cond = ' ON '.$match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]); + $cond = ' ON '.$this->protect_identifiers($match[1]).$match[2].$this->protect_identifiers($match[3]); } elseif ( ! $this->_has_operator($cond)) { -- cgit v1.2.3-24-g4f1b From 95bd763784f215a5cb4c38a4bc1caf5ac3c8f72d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 14:15:45 +0200 Subject: Fix another regression caused by 805eddaefd9503b5dbbd924bd6da66e29c4768f3 Also added a unit test for #4431 --- system/database/DB_query_builder.php | 6 +++--- .../codeigniter/database/query_builder/join_test.php | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b46730e22..66ef913c9 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -542,7 +542,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $s = $m[0][$i][1] + strlen($m[0][$i][0]), $i++) { $temp = substr($cond, $s, ($m[0][$i][1] - $s)); - $newcond .= preg_match("/(.*)([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $temp, $match) + $newcond .= preg_match("/(\(*)?([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $temp, $match) ? $match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]) : $temp; @@ -552,9 +552,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $cond = ' ON '.$newcond; } // Split apart the condition and protect the identifiers - elseif ($escape === TRUE && preg_match("/([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) + elseif ($escape === TRUE && preg_match("/(\(*)?([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) { - $cond = ' ON '.$this->protect_identifiers($match[1]).$match[2].$this->protect_identifiers($match[3]); + $cond = ' ON '.$match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]); } elseif ( ! $this->_has_operator($cond)) { diff --git a/tests/codeigniter/database/query_builder/join_test.php b/tests/codeigniter/database/query_builder/join_test.php index 25bd4accb..58cb21492 100644 --- a/tests/codeigniter/database/query_builder/join_test.php +++ b/tests/codeigniter/database/query_builder/join_test.php @@ -55,4 +55,24 @@ class Join_test extends CI_TestCase { $this->assertEquals($expected, $result); } + // ------------------------------------------------------------------------ + + public function test_join_escape_multiple_conditions_with_parentheses() + { + // We just need a valid query produced, not one that makes sense + $fields = array($this->db->protect_identifiers('table1.field1'), $this->db->protect_identifiers('table2.field2')); + + $expected = 'SELECT '.implode(', ', $fields) + ."\nFROM ".$this->db->escape_identifiers('table1') + ."\nRIGHT JOIN ".$this->db->escape_identifiers('table2').' ON '.implode(' = ', $fields) + .' AND ('.$fields[0]." = 'foo' OR ".$fields[1].' = 0)'; + + $result = $this->db->select('table1.field1, table2.field2') + ->from('table1') + ->join('table2', "table1.field1 = table2.field2 AND (table1.field1 = 'foo' OR table2.field2 = 0)", 'RIGHT') + ->get_compiled_select(); + + $this->assertEquals($expected, $result); + } + } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From c07ae0888377fb434ce70d0817746962722ea3b1 Mon Sep 17 00:00:00 2001 From: Jonty Sewell Date: Fri, 5 Feb 2016 12:34:01 +0000 Subject: Fix regression on PHP7 when regenerating the session (#4362) --- system/libraries/Session/drivers/Session_redis_driver.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index c4483e439..dc4328644 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -198,7 +198,9 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle $session_data = $this->_redis->get($this->_key_prefix.$session_id); - is_string($session_data) && $this->_key_exists = TRUE; + is_string($session_data) + ? $this->_key_exists = TRUE + : $session_data = ''; $this->_fingerprint = md5($session_data); return $session_data; -- cgit v1.2.3-24-g4f1b From 173cf413d38be042b40c2e519041ecaafb6a0919 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 14:36:50 +0200 Subject: Merge pull request #4424 from jonty-comp/develop [ci skip] Fix PHP session_write_close() warning when writing a new session to Redis --- .../Session/drivers/Session_redis_driver.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 46b8fa1c2..ad95309da 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -69,6 +69,13 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle */ protected $_lock_key; + /** + * Key exists flag + * + * @var bool + */ + protected $_key_exists = FALSE; + // ------------------------------------------------------------------------ /** @@ -166,7 +173,12 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle // Needed by write() to detect session_regenerate_id() calls $this->_session_id = $session_id; - $session_data = (string) $this->_redis->get($this->_key_prefix.$session_id); + $session_data = $this->_redis->get($this->_key_prefix.$session_id); + + is_string($session_data) + ? $this->_key_exists = TRUE + : $session_data = ''; + $this->_fingerprint = md5($session_data); return $session_data; } @@ -199,18 +211,19 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_failure; } - $this->_fingerprint = md5(''); + $this->_key_exists = FALSE; $this->_session_id = $session_id; } if (isset($this->_lock_key)) { $this->_redis->setTimeout($this->_lock_key, 300); - if ($this->_fingerprint !== ($fingerprint = md5($session_data))) + if ($this->_fingerprint !== ($fingerprint = md5($session_data)) OR $this->_key_exists === FALSE) { if ($this->_redis->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) { $this->_fingerprint = $fingerprint; + $this->_key_exists = TRUE; return $this->_success; } -- cgit v1.2.3-24-g4f1b From acc2f249315f70bfb9c236389627869d4b247930 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 14:39:40 +0200 Subject: [ci skip] Add changelog entry for PR #4424 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e993a862a..6176875c7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. - Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. +- Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 57fb63c388b8487e3f4d08f251b3fca1677688e5 Mon Sep 17 00:00:00 2001 From: Sherman K Date: Sat, 6 Feb 2016 14:16:38 +0800 Subject: Reverted formatting for non-variable --- user_guide_src/source/installation/troubleshooting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/troubleshooting.rst b/user_guide_src/source/installation/troubleshooting.rst index ffd65e0e9..cca290763 100644 --- a/user_guide_src/source/installation/troubleshooting.rst +++ b/user_guide_src/source/installation/troubleshooting.rst @@ -4,7 +4,7 @@ Troubleshooting If you find that no matter what you put in your URL only your default page is loading, it might be that your server does not support the -``REQUEST_URI`` variable needed to serve search-engine friendly URLs. As a +REQUEST_URI variable needed to serve search-engine friendly URLs. As a first step, open your *application/config/config.php* file and look for the URI Protocol information. It will recommend that you try a couple alternate settings. If it still doesn't work after you've tried this -- cgit v1.2.3-24-g4f1b From b37036a48a7639b82050d9aba24d92a48f50de75 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 6 Feb 2016 15:25:40 +0200 Subject: Merge pull request #4410 from ShrmnK/develop [ci skip] Consistent formatting of file paths and inline code in docs --- user_guide_src/source/installation/index.rst | 18 +++++++++--------- user_guide_src/source/installation/troubleshooting.rst | 4 ++-- user_guide_src/source/overview/at_a_glance.rst | 4 ++-- user_guide_src/source/tutorial/create_news_items.rst | 16 ++++++++-------- user_guide_src/source/tutorial/static_pages.rst | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/user_guide_src/source/installation/index.rst b/user_guide_src/source/installation/index.rst index 50493bbbd..fbf6ecee1 100644 --- a/user_guide_src/source/installation/index.rst +++ b/user_guide_src/source/installation/index.rst @@ -6,37 +6,37 @@ CodeIgniter is installed in four steps: #. Unzip the package. #. Upload the CodeIgniter folders and files to your server. Normally the - index.php file will be at your root. -#. Open the application/config/config.php file with a text editor and + *index.php* file will be at your root. +#. Open the *application/config/config.php* file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key. #. If you intend to use a database, open the - application/config/database.php file with a text editor and set your + *application/config/database.php* file with a text editor and set your database settings. If you wish to increase security by hiding the location of your CodeIgniter files you can rename the system and application folders to something more private. If you do rename them, you must open your main -index.php file and set the $system_path and $application_folder +*index.php* file and set the ``$system_path`` and ``$application_folder`` variables at the top of the file with the new name you've chosen. For the best security, both the system and any application folders should be placed above web root so that they are not directly accessible -via a browser. By default, .htaccess files are included in each folder +via a browser. By default, *.htaccess* files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn't -abide by the .htaccess. +abide by the *.htaccess*. If you would like to keep your views public it is also possible to move the views folder out of your application folder. After moving them, open your main index.php file and set the -$system_path, $application_folder and $view_folder variables, -preferably with a full path, e.g. '/www/MyUser/system'. +``$system_path``, ``$application_folder`` and ``$view_folder`` variables, +preferably with a full path, e.g. '*/www/MyUser/system*'. One additional measure to take in production environments is to disable PHP error reporting and any other development-only functionality. In -CodeIgniter, this can be done by setting the ENVIRONMENT constant, which +CodeIgniter, this can be done by setting the ``ENVIRONMENT`` constant, which is more fully described on the :doc:`security page <../general/security>`. diff --git a/user_guide_src/source/installation/troubleshooting.rst b/user_guide_src/source/installation/troubleshooting.rst index e874bb0ec..cca290763 100644 --- a/user_guide_src/source/installation/troubleshooting.rst +++ b/user_guide_src/source/installation/troubleshooting.rst @@ -5,11 +5,11 @@ Troubleshooting If you find that no matter what you put in your URL only your default page is loading, it might be that your server does not support the REQUEST_URI variable needed to serve search-engine friendly URLs. As a -first step, open your application/config/config.php file and look for +first step, open your *application/config/config.php* file and look for the URI Protocol information. It will recommend that you try a couple alternate settings. If it still doesn't work after you've tried this you'll need to force CodeIgniter to add a question mark to your URLs. To -do this open your **application/config/config.php** file and change this:: +do this open your *application/config/config.php* file and change this:: $config['index_page'] = "index.php"; diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst index ce195c211..b4db6b18b 100644 --- a/user_guide_src/source/overview/at_a_glance.rst +++ b/user_guide_src/source/overview/at_a_glance.rst @@ -54,8 +54,8 @@ approach:: example.com/news/article/345 -Note: By default the index.php file is included in the URL but it can be -removed using a simple .htaccess file. +Note: By default the *index.php* file is included in the URL but it can be +removed using a simple *.htaccess* file. CodeIgniter Packs a Punch ========================= diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index bc0ce7612..e10eebd3b 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -14,7 +14,7 @@ To input data into the database you need to create a form where you can input the information to be stored. This means you'll be needing a form with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at -application/views/news/create.php. +*application/views/news/create.php*. :: @@ -35,7 +35,7 @@ application/views/news/create.php. There are only two things here that probably look unfamiliar to you: the -form_open() function and the validation_errors() function. +``form_open()`` function and the ``validation_errors()`` function. The first function is provided by the :doc:`form helper <../helpers/form_helper>` and renders the form element and @@ -76,7 +76,7 @@ validation <../libraries/form_validation>` library to do this. The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the -form validation are set. The set\_rules() method takes three arguments; +form validation are set. The ``set\_rules()`` method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required. @@ -88,7 +88,7 @@ Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it was submitted **and** passed all the rules, the model is called. After this, a view is loaded to display a success message. Create a view at -application/views/news/success.php and write a success message. +*application/views/news/success.php* and write a success message. Model ----- @@ -123,19 +123,19 @@ sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs. Let's continue with preparing the record that is going to be inserted -later, inside the $data array. Each element corresponds with a column in +later, inside the ``$data`` array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, -namely the post() method from the :doc:`input +namely the ``post()`` method from the :doc:`input library <../libraries/input>`. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input -library is loaded by default. At last, you insert our $data array into +library is loaded by default. At last, you insert our ``$data`` array into our database. Routing ------- Before you can start adding news items into your CodeIgniter application -you have to add an extra rule to config/routes.php file. Make sure your +you have to add an extra rule to *config/routes.php* file. Make sure your file contains the following. This makes sure CodeIgniter sees 'create' as a method instead of a news item's slug. diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 66621471e..569287c98 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -24,7 +24,7 @@ you'll see URL patterns that match: As URL schemes become more complex, this may change. But for now, this is all we will need to know. -Create a file at application/controllers/Pages.php with the following +Create a file at *application/controllers/Pages.php* with the following code. :: -- cgit v1.2.3-24-g4f1b From c52ff48f7449b25719fde942757f6043a2d14dde Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 6 Feb 2016 15:27:15 +0200 Subject: [ci skip] Note adjustment in docs --- user_guide_src/source/overview/at_a_glance.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst index b4db6b18b..742d7bd0e 100644 --- a/user_guide_src/source/overview/at_a_glance.rst +++ b/user_guide_src/source/overview/at_a_glance.rst @@ -54,8 +54,8 @@ approach:: example.com/news/article/345 -Note: By default the *index.php* file is included in the URL but it can be -removed using a simple *.htaccess* file. +.. note:: By default the *index.php* file is included in the URL but it can + be removed using a simple *.htaccess* file. CodeIgniter Packs a Punch ========================= -- cgit v1.2.3-24-g4f1b From 9fee9e450372963e0869ed4fe034acebc74b7a81 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Sun, 7 Feb 2016 21:33:46 +0200 Subject: hunanize() helper: Escaping the $separator argument. --- system/helpers/inflector_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index 96b723c8d..c064d8de4 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -219,7 +219,7 @@ if ( ! function_exists('humanize')) */ function humanize($str, $separator = '_') { - return ucwords(preg_replace('/['.$separator.']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str)))); + return ucwords(preg_replace('/['.preg_quote($separator).']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str)))); } } -- cgit v1.2.3-24-g4f1b From c65a37e21d87a27ac7dc397eac16b5f70aec064f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 8 Feb 2016 12:29:14 +0200 Subject: [ci skip] Add a changelog entry for PR #4437 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6176875c7..a64a6c75a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. - Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. - Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. +- Fixed a bug (#4437) - :doc:`Inflector Helper ` function :php:func:`humanize()` didn't escape its ``$separator`` parameter while using it in a regular expression. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From dd149da93a2064937e490977343d152207b73815 Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 8 Feb 2016 09:32:24 -0500 Subject: code styling changes as suggested by @narfbg --- system/libraries/Form_validation.php | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index c37a73418..da5ab4e04 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -637,7 +637,7 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - $line = $this->_get_raw_error_message($type, $row); + $line = $this->_get_error_message($type, $row["field"]); // Build the error message $message = $this->_build_error_msg($line, $this->_translate_fieldname($row['label'])); @@ -808,7 +808,7 @@ class CI_Form_validation { } else { - $line = $this->_get_raw_error_message($rule, $row); + $line = $this->_get_error_message($rule, $row["field"]); } // Is the parameter we are inserting into the error message the name @@ -839,40 +839,34 @@ class CI_Form_validation { /** * Get the error message for the rule * - * @param string the rule name. - * @param array + * @param string $rule The rule name + * @param string $field + * * @return string */ - private function _get_raw_error_message($rule_name, $row) + protected function _get_error_message($rule, $field) { - $error_message = ''; // check if a custom message is defined through validation config row. - if (isset($this->_field_data[$row['field']]['errors'][$rule_name])) + if (isset($this->_field_data[$field]['errors'][$rule])) { - $error_message = $this->_field_data[$row['field']]['errors'][$rule_name]; + return $this->_field_data[$field]['errors'][$rule]; } // check if a custom message has been set using the set_message() function - elseif (isset($this->_error_messages[$rule_name])) + elseif (isset($this->_error_messages[$rule])) { - $error_message = $this->_error_messages[$rule_name]; + return $this->_error_messages[$rule]; } - // check if we have an error message in lang file - elseif (FALSE !== ($line_tmp = $this->CI->lang->line('form_validation_'.$rule_name))) + elseif (FALSE !== ($tmp = $this->CI->lang->line('form_validation_' . $rule))) { - $error_message = $line_tmp; + return $tmp; } // DEPRECATED support for non-prefixed keys, lang file again - elseif (FALSE !== ($line_tmp = $this->CI->lang->line($rule_name, FALSE))) - { - $error_message = $line_tmp; - } - // error message not found - else + elseif (FALSE !== ($tmp = $this->CI->lang->line($rule, FALSE))) { - $error_message = $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule_name.')'; + return $tmp; } - return $error_message; + return $this->CI->lang->line('form_validation_error_message_not_set'). '(' . $rule . ')'; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From e9aad049553f4f276093a1a212a2f03f20cb337d Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Mon, 8 Feb 2016 16:42:37 -0500 Subject: Doc block formatting change. --- system/core/Log.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/system/core/Log.php b/system/core/Log.php index f338a36ec..34ac64a27 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -232,14 +232,13 @@ class CI_Log { /** * Format the log line. * - * This is for extensibility of log formatting. - * If you want to change the log format, - * extend the CI_Log class and override this method. + * This is for extensibility of log formatting + * If you want to change the log format, extend the CI_Log class and override this method * * @param string $level The error level * @param string $date Formatted date string * @param string $msg The log message - * @return string formatted log line with a new line character '\n' at the end. + * @return string Formatted log line with a new line character '\n' at the end */ protected function _format_line($level, $date, $message) { -- cgit v1.2.3-24-g4f1b From 7b31ac381409989580dbcab99d56be4024d14cb9 Mon Sep 17 00:00:00 2001 From: Damien Grandi Date: Tue, 9 Feb 2016 13:49:04 +0100 Subject: Update DB_query_builder.php - phpdoc (some incorrect return type) Edit of some return type in phpdoc. This can also help to fix some autocompletion troubles in some IDE. --- system/database/DB_query_builder.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index be7582815..cf2927b23 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1138,7 +1138,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $key * @param string $value * @param bool $escape - * @return object + * @return CI_DB_query_builder */ public function having($key, $value = NULL, $escape = NULL) { @@ -1155,7 +1155,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $key * @param string $value * @param bool $escape - * @return object + * @return CI_DB_query_builder */ public function or_having($key, $value = NULL, $escape = NULL) { @@ -1339,7 +1339,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table * @param string the limit clause * @param string the offset clause - * @return object + * @return CI_DB_result */ public function get($table = '', $limit = NULL, $offset = NULL) { @@ -1422,7 +1422,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $where * @param int $limit * @param int $offset - * @return object + * @return CI_DB_result */ public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL) { @@ -1456,7 +1456,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $table Table to insert into * @param array $set An associative array of insert values * @param bool $escape Whether to escape values and identifiers - * @return int Number of rows inserted or FALSE on failure + * @return int|bool Number of rows inserted or FALSE on failure */ public function insert_batch($table, $set = NULL, $escape = NULL) { @@ -1618,7 +1618,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table to insert data into * @param array an associative array of insert values * @param bool $escape Whether to escape values and identifiers - * @return object + * @return bool TRUE on success, FALSE on failure */ public function insert($table = '', $set = NULL, $escape = NULL) { @@ -1684,7 +1684,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * * @param string the table to replace data into * @param array an associative array of insert values - * @return object + * @return bool TRUE on success, FALSE on failure */ public function replace($table = '', $set = NULL) { @@ -1790,7 +1790,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param array $set An associative array of update values * @param mixed $where * @param int $limit - * @return object + * @return bool TRUE on success, FALSE on failure */ public function update($table = '', $set = NULL, $where = NULL, $limit = NULL) { @@ -1863,7 +1863,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table to retrieve the results from * @param array an associative array of update values * @param string the where key - * @return int number of rows affected or FALSE on failure + * @return int|bool Number of rows affected or FALSE on failure */ public function update_batch($table, $set = NULL, $index = NULL) { @@ -2010,7 +2010,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * Compiles a delete string and runs "DELETE FROM table" * * @param string the table to empty - * @return object + * @return bool TRUE on success, FALSE on failure */ public function empty_table($table = '') { @@ -2043,7 +2043,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * This function maps to "DELETE FROM table" * * @param string the table to truncate - * @return object + * @return bool TRUE on success, FALSE on failure */ public function truncate($table = '') { @@ -2114,7 +2114,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param mixed the where clause * @param mixed the limit clause * @param bool - * @return mixed + * @return CI_DB_query_builder|bool CI_DB_query_builder instance or FALSE on failure */ public function delete($table = '', $where = '', $limit = NULL, $reset_data = TRUE) { -- cgit v1.2.3-24-g4f1b From 8d6df5afde9b4c0eb29fcce233bc8e290378d557 Mon Sep 17 00:00:00 2001 From: Damien Grandi Date: Tue, 9 Feb 2016 18:09:46 +0100 Subject: Revert some previous changes --- system/database/DB_query_builder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index cf2927b23..02be94d66 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1456,7 +1456,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $table Table to insert into * @param array $set An associative array of insert values * @param bool $escape Whether to escape values and identifiers - * @return int|bool Number of rows inserted or FALSE on failure + * @return int Number of rows inserted or FALSE on failure */ public function insert_batch($table, $set = NULL, $escape = NULL) { @@ -1863,7 +1863,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table to retrieve the results from * @param array an associative array of update values * @param string the where key - * @return int|bool Number of rows affected or FALSE on failure + * @return int Number of rows affected or FALSE on failure */ public function update_batch($table, $set = NULL, $index = NULL) { @@ -2114,7 +2114,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param mixed the where clause * @param mixed the limit clause * @param bool - * @return CI_DB_query_builder|bool CI_DB_query_builder instance or FALSE on failure + * @return mixed */ public function delete($table = '', $where = '', $limit = NULL, $reset_data = TRUE) { -- cgit v1.2.3-24-g4f1b From a90c53e71d3dfac5372526363f8aaa0e1d30ad9e Mon Sep 17 00:00:00 2001 From: Damien Grandi Date: Tue, 9 Feb 2016 18:11:29 +0100 Subject: fix a typo edit --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 02be94d66..00c5394e2 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1863,7 +1863,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table to retrieve the results from * @param array an associative array of update values * @param string the where key - * @return int Number of rows affected or FALSE on failure + * @return int number of rows affected or FALSE on failure */ public function update_batch($table, $set = NULL, $index = NULL) { -- cgit v1.2.3-24-g4f1b From aec5126f5d554fb3b14cd8f37adf57339446d957 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 21:11:07 +0200 Subject: Merge pull request #4445 from damiengrandi/develop [ci skip] Update QB phpdoc returns --- system/database/DB_query_builder.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 66ef913c9..d6f35e0df 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1137,7 +1137,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $key * @param string $value * @param bool $escape - * @return object + * @return CI_DB_query_builder */ public function having($key, $value = NULL, $escape = NULL) { @@ -1154,7 +1154,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $key * @param string $value * @param bool $escape - * @return object + * @return CI_DB_query_builder */ public function or_having($key, $value = NULL, $escape = NULL) { @@ -1338,7 +1338,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table * @param string the limit clause * @param string the offset clause - * @return object + * @return CI_DB_result */ public function get($table = '', $limit = NULL, $offset = NULL) { @@ -1421,7 +1421,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string $where * @param int $limit * @param int $offset - * @return object + * @return CI_DB_result */ public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL) { @@ -1617,7 +1617,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param string the table to insert data into * @param array an associative array of insert values * @param bool $escape Whether to escape values and identifiers - * @return object + * @return bool TRUE on success, FALSE on failure */ public function insert($table = '', $set = NULL, $escape = NULL) { @@ -1683,7 +1683,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * * @param string the table to replace data into * @param array an associative array of insert values - * @return object + * @return bool TRUE on success, FALSE on failure */ public function replace($table = '', $set = NULL) { @@ -1789,7 +1789,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * @param array $set An associative array of update values * @param mixed $where * @param int $limit - * @return object + * @return bool TRUE on success, FALSE on failure */ public function update($table = '', $set = NULL, $where = NULL, $limit = NULL) { @@ -2009,7 +2009,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * Compiles a delete string and runs "DELETE FROM table" * * @param string the table to empty - * @return object + * @return bool TRUE on success, FALSE on failure */ public function empty_table($table = '') { @@ -2042,7 +2042,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * This function maps to "DELETE FROM table" * * @param string the table to truncate - * @return object + * @return bool TRUE on success, FALSE on failure */ public function truncate($table = '') { -- cgit v1.2.3-24-g4f1b From 1ccc8bed6ed169356ef31397d9ae988a16cd9a63 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 21:15:10 +0200 Subject: Merge pull request #4323 from jspreddy/sai/log_line_formatting_extensibility_change Refactored CI_Log line formatting to allow extensibility --- system/core/Log.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/system/core/Log.php b/system/core/Log.php index 72d3cfbae..7c81d358b 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -154,8 +154,8 @@ class CI_Log { * * Generally this function will be called using the global log_message() function * - * @param string the error level: 'error', 'debug' or 'info' - * @param string the error message + * @param string $level The error level: 'error', 'debug' or 'info' + * @param string $msg The error message * @return bool */ public function write_log($level, $msg) @@ -204,7 +204,7 @@ class CI_Log { $date = date($this->_date_fmt); } - $message .= $level.' - '.$date.' --> '.$msg."\n"; + $message .= $this->_format_line($level, $date, $msg); flock($fp, LOCK_EX); @@ -227,4 +227,21 @@ class CI_Log { return is_int($result); } + // -------------------------------------------------------------------- + + /** + * Format the log line. + * + * This is for extensibility of log formatting + * If you want to change the log format, extend the CI_Log class and override this method + * + * @param string $level The error level + * @param string $date Formatted date string + * @param string $msg The log message + * @return string Formatted log line with a new line character '\n' at the end + */ + protected function _format_line($level, $date, $message) + { + return $level.' - '.$date.' --> '.$message."\n"; + } } -- cgit v1.2.3-24-g4f1b From 37da3bd78530478b2bb2a23bc2144d50e1589313 Mon Sep 17 00:00:00 2001 From: Sai Phaninder Reddy Jonnala Date: Tue, 9 Feb 2016 16:09:57 -0500 Subject: Code formatting changes, again. I am bad at this. --- system/libraries/Form_validation.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index da5ab4e04..097d7aaba 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -637,7 +637,7 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - $line = $this->_get_error_message($type, $row["field"]); + $line = $this->_get_error_message($type, $row['field']); // Build the error message $message = $this->_build_error_msg($line, $this->_translate_fieldname($row['label'])); @@ -808,7 +808,7 @@ class CI_Form_validation { } else { - $line = $this->_get_error_message($rule, $row["field"]); + $line = $this->_get_error_message($rule, $row['field']); } // Is the parameter we are inserting into the error message the name @@ -840,8 +840,7 @@ class CI_Form_validation { * Get the error message for the rule * * @param string $rule The rule name - * @param string $field - * + * @param string $field The field name * @return string */ protected function _get_error_message($rule, $field) @@ -856,7 +855,7 @@ class CI_Form_validation { { return $this->_error_messages[$rule]; } - elseif (FALSE !== ($tmp = $this->CI->lang->line('form_validation_' . $rule))) + elseif (FALSE !== ($tmp = $this->CI->lang->line('form_validation_'.$rule))) { return $tmp; } @@ -866,7 +865,7 @@ class CI_Form_validation { return $tmp; } - return $this->CI->lang->line('form_validation_error_message_not_set'). '(' . $rule . ')'; + return $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')'; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 39967987ebcc79fc867c1f7fa8d69cc65801f594 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 23:34:04 +0200 Subject: Add CI_Log test cases --- tests/codeigniter/core/Log_test.php | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tests/codeigniter/core/Log_test.php diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php new file mode 100644 index 000000000..01e90f5fc --- /dev/null +++ b/tests/codeigniter/core/Log_test.php @@ -0,0 +1,64 @@ +setAccessible(TRUE); + $threshold = new ReflectionProperty('CI_Log', '_threshold'); + $threshold->setAccessible(TRUE); + $date_fmt = new ReflectionProperty('CI_Log', '_date_fmt'); + $date_fmt->setAccessible(TRUE); + $file_ext = new ReflectionProperty('CI_Log', '_file_ext'); + $file_ext->setAccessible(TRUE); + $file_perms = new ReflectionProperty('CI_Log', '_file_permissions'); + $file_perms->setAccessible(TRUE); + $enabled = new ReflectionProperty('CI_Log', '_enabled'); + $enabled->setAccessible(TRUE); + + $this->ci_set_config('log_path', '/root/'); + $this->ci_set_config('log_threshold', 'z'); + $this->ci_set_config('log_date_format', 'd.m.Y'); + $this->ci_set_config('log_file_extension', ''); + $this->ci_set_config('log_file_permissions', ''); + $instance = new CI_Log(); + + $this->assertEquals($path->getValue($instance), '/root/'); + $this->assertEquals($threshold->getValue($instance), 1); + $this->assertEquals($date_fmt->getValue($instance), 'd.m.Y'); + $this->assertEquals($file_ext->getValue($instance), 'php'); + $this->assertEquals($file_perms->getValue($instance), 0644); + $this->assertEquals($enabled->getValue($instance), FALSE); + + $this->ci_set_config('log_path', ''); + $this->ci_set_config('log_threshold', '0'); + $this->ci_set_config('log_date_format', ''); + $this->ci_set_config('log_file_extension', '.log'); + $this->ci_set_config('log_file_permissions', 0600); + $instance = new CI_Log(); + + $this->assertEquals($path->getValue($instance), APPPATH.'logs/'); + $this->assertEquals($threshold->getValue($instance), 0); + $this->assertEquals($date_fmt->getValue($instance), 'Y-m-d H:i:s'); + $this->assertEquals($file_ext->getValue($instance), 'log'); + $this->assertEquals($file_perms->getValue($instance), 0600); + $this->assertEquals($enabled->getValue($instance), TRUE); + } + + // -------------------------------------------------------------------- + + public function test_format_line() + { + $this->ci_set_config('log_path', ''); + $this->ci_set_config('log_threshold', 0); + $instance = new CI_Log(); + + $format_line = new ReflectionMethod($instance, '_format_line'); + $format_line->setAccessible(TRUE); + $this->assertEquals( + $format_line->invoke($instance, 'LEVEL', 'Timestamp', 'Message'), + "LEVEL - Timestamp --> Message\n" + ); + } +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 9a33f7833729005e2ffd40dea9c10268b1bc0fbe Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 23:37:59 +0200 Subject: [ci skip] Whitespace --- tests/codeigniter/core/Log_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php index 01e90f5fc..d44cbac0f 100644 --- a/tests/codeigniter/core/Log_test.php +++ b/tests/codeigniter/core/Log_test.php @@ -17,7 +17,7 @@ class Log_test extends CI_TestCase { $enabled = new ReflectionProperty('CI_Log', '_enabled'); $enabled->setAccessible(TRUE); - $this->ci_set_config('log_path', '/root/'); + $this->ci_set_config('log_path', '/root/'); $this->ci_set_config('log_threshold', 'z'); $this->ci_set_config('log_date_format', 'd.m.Y'); $this->ci_set_config('log_file_extension', ''); -- cgit v1.2.3-24-g4f1b From 376ae77cb420df1bae8313d76bf0b01d5c523c48 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 23:37:59 +0200 Subject: [ci skip] Whitespace --- tests/codeigniter/core/Log_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php index 01e90f5fc..d44cbac0f 100644 --- a/tests/codeigniter/core/Log_test.php +++ b/tests/codeigniter/core/Log_test.php @@ -17,7 +17,7 @@ class Log_test extends CI_TestCase { $enabled = new ReflectionProperty('CI_Log', '_enabled'); $enabled->setAccessible(TRUE); - $this->ci_set_config('log_path', '/root/'); + $this->ci_set_config('log_path', '/root/'); $this->ci_set_config('log_threshold', 'z'); $this->ci_set_config('log_date_format', 'd.m.Y'); $this->ci_set_config('log_file_extension', ''); -- cgit v1.2.3-24-g4f1b From 98c14ae881549c58298aef1d3f5ef7f88ff48d1e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 23:43:55 +0200 Subject: Merge pull request #4342 from jspreddy/sai/form_validation_refactor Abstract error message fetching in Form_validation --- system/libraries/Form_validation.php | 66 ++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index ea3bc6de7..24b2d1fc4 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -637,21 +637,7 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - // Check if a custom message is defined - if (isset($this->_field_data[$row['field']]['errors'][$type])) - { - $line = $this->_field_data[$row['field']]['errors'][$type]; - } - elseif (isset($this->_error_messages[$type])) - { - $line = $this->_error_messages[$type]; - } - elseif (FALSE === ($line = $this->CI->lang->line('form_validation_'.$type)) - // DEPRECATED support for non-prefixed keys - && FALSE === ($line = $this->CI->lang->line($type, FALSE))) - { - $line = 'The field was not set'; - } + $line = $this->_get_error_message($type, $row['field']); // Build the error message $message = $this->_build_error_msg($line, $this->_translate_fieldname($row['label'])); @@ -820,23 +806,9 @@ class CI_Form_validation { { $line = $this->CI->lang->line('form_validation_error_message_not_set').'(Anonymous function)'; } - // Check if a custom message is defined - elseif (isset($this->_field_data[$row['field']]['errors'][$rule])) - { - $line = $this->_field_data[$row['field']]['errors'][$rule]; - } - elseif ( ! isset($this->_error_messages[$rule])) - { - if (FALSE === ($line = $this->CI->lang->line('form_validation_'.$rule)) - // DEPRECATED support for non-prefixed keys - && FALSE === ($line = $this->CI->lang->line($rule, FALSE))) - { - $line = $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')'; - } - } else { - $line = $this->_error_messages[$rule]; + $line = $this->_get_error_message($rule, $row['field']); } // Is the parameter we are inserting into the error message the name @@ -864,6 +836,40 @@ class CI_Form_validation { // -------------------------------------------------------------------- + /** + * Get the error message for the rule + * + * @param string $rule The rule name + * @param string $field The field name + * @return string + */ + protected function _get_error_message($rule, $field) + { + // check if a custom message is defined through validation config row. + if (isset($this->_field_data[$field]['errors'][$rule])) + { + return $this->_field_data[$field]['errors'][$rule]; + } + // check if a custom message has been set using the set_message() function + elseif (isset($this->_error_messages[$rule])) + { + return $this->_error_messages[$rule]; + } + elseif (FALSE !== ($tmp = $this->CI->lang->line('form_validation_'.$rule))) + { + return $tmp; + } + // DEPRECATED support for non-prefixed keys, lang file again + elseif (FALSE !== ($tmp = $this->CI->lang->line($rule, FALSE))) + { + return $tmp; + } + + return $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')'; + } + + // -------------------------------------------------------------------- + /** * Translate a field name * -- cgit v1.2.3-24-g4f1b From b30a64a73057ad1253ae1f61f6cd8b125f64cc99 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 23:46:25 +0200 Subject: Rename back a variable changed by the last PR merge Because. --- system/libraries/Form_validation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 24b2d1fc4..296ddb92a 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -855,14 +855,14 @@ class CI_Form_validation { { return $this->_error_messages[$rule]; } - elseif (FALSE !== ($tmp = $this->CI->lang->line('form_validation_'.$rule))) + elseif (FALSE !== ($line = $this->CI->lang->line('form_validation_'.$rule))) { - return $tmp; + return $line; } // DEPRECATED support for non-prefixed keys, lang file again - elseif (FALSE !== ($tmp = $this->CI->lang->line($rule, FALSE))) + elseif (FALSE !== ($line = $this->CI->lang->line($rule, FALSE))) { - return $tmp; + return $line; } return $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')'; -- cgit v1.2.3-24-g4f1b From 24adbfc5e163de9da72f59e36be6c0ac02bf10c2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Feb 2016 23:46:25 +0200 Subject: Rename back a variable changed by the last PR merge Because. --- system/libraries/Form_validation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 24b2d1fc4..296ddb92a 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -855,14 +855,14 @@ class CI_Form_validation { { return $this->_error_messages[$rule]; } - elseif (FALSE !== ($tmp = $this->CI->lang->line('form_validation_'.$rule))) + elseif (FALSE !== ($line = $this->CI->lang->line('form_validation_'.$rule))) { - return $tmp; + return $line; } // DEPRECATED support for non-prefixed keys, lang file again - elseif (FALSE !== ($tmp = $this->CI->lang->line($rule, FALSE))) + elseif (FALSE !== ($line = $this->CI->lang->line($rule, FALSE))) { - return $tmp; + return $line; } return $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')'; -- cgit v1.2.3-24-g4f1b From c4de3c2f93cb6d2af65b325ae2812fccad7e98b8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Feb 2016 07:41:43 +0200 Subject: [ci skip] Fix Memcached session lock handling and error checking around replace() usage --- .../Session/drivers/Session_memcached_driver.php | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index d017dfb2f..e9246443c 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -204,10 +204,16 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if (isset($this->_lock_key)) { + $key = $this->_key_prefix.$session_id; + $this->_memcached->replace($this->_lock_key, time(), 300); if ($this->_fingerprint !== ($fingerprint = md5($session_data))) { - if ($this->_memcached->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) + + if ( + $this->_memcached->replace($key, $session_data, $this->_config['expiration']) + OR ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) + ) { $this->_fingerprint = $fingerprint; return $this->_success; @@ -305,9 +311,12 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa // correct session ID. if ($this->_lock_key === $this->_key_prefix.$session_id.':lock') { - return ($this->_memcached->replace($this->_lock_key, time(), 300)) - ? $this->_success - : $this->_failure; + if ( ! $this->_memcached->replace($this->_lock_key, time(), 300)) + { + return ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED) + ? $this->_memcached->set($this->_lock_key, time(), 300) + : FALSE; + } } // 30 attempts to obtain a lock, in case another request already has it @@ -324,7 +333,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if ( ! $this->_memcached->set($lock_key, time(), 300)) { log_message('error', 'Session: Error while trying to obtain lock for '.$this->_key_prefix.$session_id); - return $this->_failure; + return FALSE; } $this->_lock_key = $lock_key; @@ -335,11 +344,11 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if ($attempt === 30) { log_message('error', 'Session: Unable to obtain lock for '.$this->_key_prefix.$session_id.' after 30 attempts, aborting.'); - return $this->_failure; + return FALSE; } $this->_lock = TRUE; - return $this->_success; + return TRUE; } // ------------------------------------------------------------------------ @@ -367,5 +376,4 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return TRUE; } - -} +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From d45cd5ab7d35f3c9b55414dc7709a0a41d91c0be Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Feb 2016 07:50:19 +0200 Subject: [ci skip] Add changelog entry for latest commit --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a64a6c75a..cd18599ba 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. - Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. - Fixed a bug (#4437) - :doc:`Inflector Helper ` function :php:func:`humanize()` didn't escape its ``$separator`` parameter while using it in a regular expression. +- Fixed a bug where :doc:`Session Library ` didn't properly handle its locks' statuses with the 'memcached' driver. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From a54a2b90bf057d7883ea7506d78a1073478ea4cf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Feb 2016 19:55:39 +0200 Subject: Fix a bug where CI_Session_memcached_driver doesn't write empty sessions Related: #3919 --- system/libraries/Session/drivers/Session_memcached_driver.php | 11 +++++++---- user_guide_src/source/changelog.rst | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index e9246443c..ab3b1d97c 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -209,7 +209,6 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa $this->_memcached->replace($this->_lock_key, time(), 300); if ($this->_fingerprint !== ($fingerprint = md5($session_data))) { - if ( $this->_memcached->replace($key, $session_data, $this->_config['expiration']) OR ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) @@ -222,9 +221,13 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return $this->_failure; } - return $this->_memcached->touch($this->_key_prefix.$session_id, $this->_config['expiration']) - ? $this->_success - : $this->_failure; + if ( + $this->_memcached->touch($key, $this->_config['expiration']) + OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) + ) + { + return $this->_success; + } } return $this->_failure; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cd18599ba..e9a265f76 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -29,6 +29,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. - Fixed a bug (#4437) - :doc:`Inflector Helper ` function :php:func:`humanize()` didn't escape its ``$separator`` parameter while using it in a regular expression. - Fixed a bug where :doc:`Session Library ` didn't properly handle its locks' statuses with the 'memcached' driver. +- Fixed a bug where :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'memcached' driver. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 46adb9fdbc9604065dc7990bc61707446aa5cc81 Mon Sep 17 00:00:00 2001 From: Kristian Matthews Date: Thu, 11 Feb 2016 21:23:30 +0000 Subject: Autoload Driver Object Names Updated documentation for `$autoload['drivers']`. Updated loader to autoload drivers with object names the same as autoloading libraries. Signed-off-by: Kristian Matthews --- application/config/autoload.php | 5 +++++ system/core/Loader.php | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index 4bc6bf0ad..aeacbdb66 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -72,6 +72,11 @@ $autoload['libraries'] = array(); | Prototype: | | $autoload['drivers'] = array('cache'); +| +| You can also supply an alternative library name to be assigned in +| the controller: +| +| $autoload['drivers'] = array('cache' => 'cch'); */ $autoload['drivers'] = array(); diff --git a/system/core/Loader.php b/system/core/Loader.php index 18e4c5287..dc61ed882 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -688,9 +688,16 @@ class CI_Loader { { if (is_array($library)) { - foreach ($library as $driver) + foreach ($library as $key => $value) { - $this->driver($driver); + if (is_int($key)) + { + $this->driver($value, $params); + } + else + { + $this->driver($key, $params, $value) + } } return $this; @@ -1304,10 +1311,7 @@ class CI_Loader { // Autoload drivers if (isset($autoload['drivers'])) { - foreach ($autoload['drivers'] as $item) - { - $this->driver($item); - } + $this->driver($autoload['drivers']); } // Load libraries -- cgit v1.2.3-24-g4f1b From c6011941511e706c3a3d44151eccda7d0b472007 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 11 Feb 2016 23:49:37 +0200 Subject: Fix #4449 --- system/database/DB_query_builder.php | 60 ++++++++++++---------- .../database/query_builder/join_test.php | 27 +++++++++- 2 files changed, 59 insertions(+), 28 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index d6f35e0df..6bf039ead 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -531,38 +531,46 @@ abstract class CI_DB_query_builder extends CI_DB_driver { is_bool($escape) OR $escape = $this->_protect_identifiers; - // Split multiple conditions - if ($escape === TRUE && preg_match_all('/\sAND\s|\sOR\s/i', $cond, $m, PREG_OFFSET_CAPTURE)) + if ( ! $this->_has_operator($cond)) { - $newcond = ''; - $m[0][] = array('', strlen($cond)); - - for ($i = 0, $c = count($m[0]), $s = 0; - $i < $c; - $s = $m[0][$i][1] + strlen($m[0][$i][0]), $i++) - { - $temp = substr($cond, $s, ($m[0][$i][1] - $s)); - $newcond .= preg_match("/(\(*)?([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $temp, $match) - ? $match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]) - : $temp; - - $newcond .= $m[0][$i][0]; - } - - $cond = ' ON '.$newcond; - } - // Split apart the condition and protect the identifiers - elseif ($escape === TRUE && preg_match("/(\(*)?([\[\]\w\.'-]+)(\s*[^\"\[`'\w]+\s*)(.+)/i", $cond, $match)) - { - $cond = ' ON '.$match[1].$this->protect_identifiers($match[2]).$match[3].$this->protect_identifiers($match[4]); + $cond = ' USING ('.($escape ? $this->escape_identifiers($cond) : $cond).')'; } - elseif ( ! $this->_has_operator($cond)) + elseif ($escape === FALSE) { - $cond = ' USING ('.($escape ? $this->escape_identifiers($cond) : $cond).')'; + $cond = ' ON '.$cond; } else { - $cond = ' ON '.$cond; + // Split multiple conditions + if (preg_match_all('/\sAND\s|\sOR\s/i', $cond, $joints, PREG_OFFSET_CAPTURE)) + { + $conditions = array(); + $joints = $joints[0]; + array_unshift($joints, array('', 0)); + + for ($i = count($joints) - 1, $pos = strlen($cond); $i >= 0; $i--) + { + $joints[$i][1] += strlen($joints[$i][0]); // offset + $conditions[$i] = substr($cond, $joints[$i][1], $pos - $joints[$i][1]); + $pos = $joints[$i][1] - strlen($joints[$i][0]); + $joints[$i] = $joints[$i][0]; + } + } + else + { + $conditions = array($cond); + $joints = array(''); + } + + $cond = ' ON '; + for ($i = 0, $c = count($conditions); $i < $c; $i++) + { + $operator = $this->_get_operator($conditions[$i]); + $cond .= $joints[$i]; + $cond .= preg_match("/(\(*)?([\[\]\w\.'-]+)".preg_quote($operator)."(.*)/i", $conditions[$i], $match) + ? $match[1].$this->protect_identifiers($match[2]).$operator.$this->protect_identifiers($match[3]) + : $conditions[$i]; + } } // Do we want to escape the table name? diff --git a/tests/codeigniter/database/query_builder/join_test.php b/tests/codeigniter/database/query_builder/join_test.php index 58cb21492..54b2a4e18 100644 --- a/tests/codeigniter/database/query_builder/join_test.php +++ b/tests/codeigniter/database/query_builder/join_test.php @@ -37,6 +37,29 @@ class Join_test extends CI_TestCase { // ------------------------------------------------------------------------ + public function test_join_escape_is_null() + { + $expected = 'SELECT '.$this->db->escape_identifiers('field') + ."\nFROM ".$this->db->escape_identifiers('table1') + ."\nJOIN ".$this->db->escape_identifiers('table2').' ON '.$this->db->escape_identifiers('field').' IS NULL'; + + $this->assertEquals( + $expected, + $this->db->select('field')->from('table1')->join('table2', 'field IS NULL')->get_compiled_select() + ); + + $expected = 'SELECT '.$this->db->escape_identifiers('field') + ."\nFROM ".$this->db->escape_identifiers('table1') + ."\nJOIN ".$this->db->escape_identifiers('table2').' ON '.$this->db->escape_identifiers('field').' IS NOT NULL'; + + $this->assertEquals( + $expected, + $this->db->select('field')->from('table1')->join('table2', 'field IS NOT NULL')->get_compiled_select() + ); + } + + // ------------------------------------------------------------------------ + public function test_join_escape_multiple_conditions() { // We just need a valid query produced, not one that makes sense @@ -65,11 +88,11 @@ class Join_test extends CI_TestCase { $expected = 'SELECT '.implode(', ', $fields) ."\nFROM ".$this->db->escape_identifiers('table1') ."\nRIGHT JOIN ".$this->db->escape_identifiers('table2').' ON '.implode(' = ', $fields) - .' AND ('.$fields[0]." = 'foo' OR ".$fields[1].' = 0)'; + .' AND ('.$fields[0]." = 'foo' OR ".$fields[1].' IS NULL)'; $result = $this->db->select('table1.field1, table2.field2') ->from('table1') - ->join('table2', "table1.field1 = table2.field2 AND (table1.field1 = 'foo' OR table2.field2 = 0)", 'RIGHT') + ->join('table2', "table1.field1 = table2.field2 AND (table1.field1 = 'foo' OR table2.field2 IS NULL)", 'RIGHT') ->get_compiled_select(); $this->assertEquals($expected, $result); -- cgit v1.2.3-24-g4f1b From 9198ad04ba27803ce9f924bbd753fad36122fb5a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 12 Feb 2016 00:07:31 +0200 Subject: [ci skip] Add changelog entry for issue #4449 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e9a265f76..ba9f93860 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -30,6 +30,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4437) - :doc:`Inflector Helper ` function :php:func:`humanize()` didn't escape its ``$separator`` parameter while using it in a regular expression. - Fixed a bug where :doc:`Session Library ` didn't properly handle its locks' statuses with the 'memcached' driver. - Fixed a bug where :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'memcached' driver. +- Fixed a bug (#4449) - :doc:`Query Builder ` method ``join()`` breaks conditions containing ``IS NULL``, ``IS NOT NULL``. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 7730dbebab54e6533a30f93c43311039b89c5760 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 12 Feb 2016 00:09:23 +0200 Subject: Skip CI_Log tests on PHP 5.2 We still run those (with failures enabled) and that test breaks them --- tests/codeigniter/core/Log_test.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php index d44cbac0f..2dd9d90d2 100644 --- a/tests/codeigniter/core/Log_test.php +++ b/tests/codeigniter/core/Log_test.php @@ -1,9 +1,13 @@ markTestSkipped("PHP 5.2 doesn't have ReflectionProperty::setAccessible() and can't run this test"); + } + $path = new ReflectionProperty('CI_Log', '_log_path'); $path->setAccessible(TRUE); $threshold = new ReflectionProperty('CI_Log', '_threshold'); @@ -50,6 +54,11 @@ class Log_test extends CI_TestCase { public function test_format_line() { + if ( ! is_php('5.3')) + { + return $this->markTestSkipped("PHP 5.2 doesn't have ReflectionProperty::setAccessible() and can't run this test"); + } + $this->ci_set_config('log_path', ''); $this->ci_set_config('log_threshold', 0); $instance = new CI_Log(); -- cgit v1.2.3-24-g4f1b From 0d181ee540749c3a5dc147b1e280b7515d1b360e Mon Sep 17 00:00:00 2001 From: Kristian Matthews Date: Fri, 12 Feb 2016 12:13:04 +0000 Subject: Fixed syntax error. Signed-off-by: Kristian Matthews --- system/core/Loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index dc61ed882..b9f5a52c7 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -696,7 +696,7 @@ class CI_Loader { } else { - $this->driver($key, $params, $value) + $this->driver($key, $params, $value); } } -- cgit v1.2.3-24-g4f1b From 1be0f05e3f70a369e9e3e5153d0f786c0d2dface Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Fri, 12 Feb 2016 22:31:15 +0100 Subject: return false when image isn't valid --- system/language/english/imglib_lang.php | 1 + system/libraries/Image_lib.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php index 7f23233b4..0f3ba0f59 100644 --- a/system/language/english/imglib_lang.php +++ b/system/language/english/imglib_lang.php @@ -51,6 +51,7 @@ $lang['imglib_libpath_invalid'] = 'The path to your image library is not correct $lang['imglib_image_process_failed'] = 'Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.'; $lang['imglib_rotation_angle_required'] = 'An angle of rotation is required to rotate the image.'; $lang['imglib_invalid_path'] = 'The path to the image is not correct.'; +$lang['imglib_invalid_image'] = 'The provided image is not valid.'; $lang['imglib_copy_failed'] = 'The image copy routine failed.'; $lang['imglib_missing_font'] = 'Unable to find a font to use.'; $lang['imglib_save_failed'] = 'Unable to save the image. Please make sure the image and file directory are writable.'; diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index f594b7125..e3e87f93f 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1641,6 +1641,11 @@ class CI_Image_lib { } $vals = getimagesize($path); + if ($vals === FALSE) + { + $this->set_error('imglib_invalid_image'); + return FALSE; + } $types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png'); $mime = (isset($types[$vals[2]])) ? 'image/'.$types[$vals[2]] : 'image/jpg'; -- cgit v1.2.3-24-g4f1b From 8215e2fcf828964b232e9f48befac4f08fa11187 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 11 Feb 2016 20:30:43 +0200 Subject: [ci skip] Fix Memcached replace() result code checks in CI_Session Related #3919 --- system/libraries/Session/drivers/Session_memcached_driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index ab3b1d97c..875e72255 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -211,7 +211,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if ( $this->_memcached->replace($key, $session_data, $this->_config['expiration']) - OR ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) + OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) ) { $this->_fingerprint = $fingerprint; @@ -316,7 +316,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if ( ! $this->_memcached->replace($this->_lock_key, time(), 300)) { - return ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED) + return ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND) ? $this->_memcached->set($this->_lock_key, time(), 300) : FALSE; } -- cgit v1.2.3-24-g4f1b From a6d1c538f61ce12216eef7bb92716e24af0b86bf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:09:48 +0200 Subject: Don't apply url_suffix, permitted_uri_chars to CLI requests Close #4085 Close #4460 --- system/core/URI.php | 118 ++++++++++++--------- user_guide_src/source/changelog.rst | 4 + user_guide_src/source/installation/upgrade_310.rst | 15 ++- 3 files changed, 86 insertions(+), 51 deletions(-) diff --git a/system/core/URI.php b/system/core/URI.php index 544f6c85f..79cf640b9 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -100,41 +100,36 @@ class CI_URI { { $this->config =& load_class('Config', 'core'); + // If it's a CLI request, ignore the configuration + if (is_cli()) + { + $this->_set_uri_string($this->_parse_argv(), TRUE); + } // If query strings are enabled, we don't need to parse any segments. - // However, they don't make sense under CLI. - if (is_cli() OR $this->config->item('enable_query_strings') !== TRUE) + elseif ($this->config->item('enable_query_strings') !== TRUE) { $this->_permitted_uri_chars = $this->config->item('permitted_uri_chars'); + $protocol = $this->config->item('uri_protocol'); + empty($protocol) && $protocol = 'REQUEST_URI'; - // If it's a CLI request, ignore the configuration - if (is_cli()) + switch ($protocol) { - $uri = $this->_parse_argv(); + case 'AUTO': // For BC purposes only + case 'REQUEST_URI': + $uri = $this->_parse_request_uri(); + break; + case 'QUERY_STRING': + $uri = $this->_parse_query_string(); + break; + case 'PATH_INFO': + default: + $uri = isset($_SERVER[$protocol]) + ? $_SERVER[$protocol] + : $this->_parse_request_uri(); + break; } - else - { - $protocol = $this->config->item('uri_protocol'); - empty($protocol) && $protocol = 'REQUEST_URI'; - switch ($protocol) - { - case 'AUTO': // For BC purposes only - case 'REQUEST_URI': - $uri = $this->_parse_request_uri(); - break; - case 'QUERY_STRING': - $uri = $this->_parse_query_string(); - break; - case 'PATH_INFO': - default: - $uri = isset($_SERVER[$protocol]) - ? $_SERVER[$protocol] - : $this->_parse_request_uri(); - break; - } - } - - $this->_set_uri_string($uri); + $this->_set_uri_string($uri, FALSE); } log_message('info', 'URI Class Initialized'); @@ -145,43 +140,66 @@ class CI_URI { /** * Set URI String * - * @param string $str + * @param string $str Input URI string + * @param bool $is_cli Whether the input comes from CLI * @return void */ - protected function _set_uri_string($str) + protected function _set_uri_string($str, $is_cli = FALSE) { - // Filter out control characters and trim slashes - $this->uri_string = trim(remove_invisible_characters($str, FALSE), '/'); - - if ($this->uri_string !== '') + // CLI requests have a bit simpler logic + if ($is_cli) { - // Remove the URL suffix, if present - if (($suffix = (string) $this->config->item('url_suffix')) !== '') + if (($this->uri_string = trim($str, '/')) === '') { - $slen = strlen($suffix); - - if (substr($this->uri_string, -$slen) === $suffix) - { - $this->uri_string = substr($this->uri_string, 0, -$slen); - } + return; } $this->segments[0] = NULL; - // Populate the segments array - foreach (explode('/', trim($this->uri_string, '/')) as $val) + foreach (explode('/', $this->uri_string) as $segment) { - $val = trim($val); - // Filter segments for security - $this->filter_uri($val); - - if ($val !== '') + if (($segment = trim($segment)) !== '') { - $this->segments[] = $val; + $this->segments[] = $segment; } } unset($this->segments[0]); + return; + } + + // Filter out control characters and trim slashes + $this->uri_string = trim(remove_invisible_characters($str, FALSE), '/'); + + if ($this->uri_string === '') + { + return; } + + // Remove the URL suffix, if present + if (($suffix = (string) $this->config->item('url_suffix')) !== '') + { + $slen = strlen($suffix); + + if (substr($this->uri_string, -$slen) === $suffix) + { + $this->uri_string = substr($this->uri_string, 0, -$slen); + } + } + + $this->segments[0] = NULL; + foreach (explode('/', trim($this->uri_string, '/')) as $segment) + { + $segment = trim($segment); + // Filter segments for security + $this->filter_uri($segment); + + if ($segment !== '') + { + $this->segments[] = $segment; + } + } + + unset($this->segments[0]); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d490f1504..8e1789fb9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.0 Release Date: Not Released +- Core + + - Changed :doc:`URI Library ` 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 ` 'redis' driver. diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index b86bb1da3..a6e6bae7e 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -58,7 +58,20 @@ 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 usage of doctype() HTML helper +Step 3: Check logic related to URI parsing of CLI requests +========================================================== + +When running a CodeIgniter application from the CLI, the +:doc:`URI Library ` 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 usage of doctype() HTML helper ============================================ The :doc:`HTML Helper <../helpers/html_helper>` function -- cgit v1.2.3-24-g4f1b From 2426635afc58f7bbf8355e80d4228076321a669d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:21:13 +0200 Subject: [ci skip] Add notes in config about CLI for url_suffix, permitted_uri_chars --- application/config/config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/config/config.php b/application/config/config.php index 23ef5a528..0a7b8202b 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -63,6 +63,8 @@ $config['uri_protocol'] = 'REQUEST_URI'; | For more information please see the user guide: | | https://codeigniter.com/user_guide/general/urls.html +| +| Note: This option is ignored for CLI requests. */ $config['url_suffix'] = ''; @@ -157,6 +159,8 @@ $config['composer_autoload'] = FALSE; | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! | +| Note: This option is ignored for CLI requests. +| */ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; -- cgit v1.2.3-24-g4f1b From 2a34081c5e1b8a86d2d3f87c3da69b9d580d6027 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:33:34 +0200 Subject: Pass CI_Config as a parameter to CI_URI constructor --- system/core/CodeIgniter.php | 2 +- system/core/URI.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 14f62edaa..84f224123 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -298,7 +298,7 @@ if ( ! is_php('5.4')) * Instantiate the URI class * ------------------------------------------------------ */ - $URI =& load_class('URI', 'core'); + $URI =& load_class('URI', 'core', $CFG); /* * ------------------------------------------------------ diff --git a/system/core/URI.php b/system/core/URI.php index 79cf640b9..7c93e36b7 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -96,9 +96,9 @@ class CI_URI { * * @return void */ - public function __construct() + public function __construct(CI_Config &$config) { - $this->config =& load_class('Config', 'core'); + $this->config = $config; // If it's a CLI request, ignore the configuration if (is_cli()) -- cgit v1.2.3-24-g4f1b From 02fde67322db74df42ef8dc953cc2be3f9fc4ccd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:35:37 +0200 Subject: Remove reference usage from last commit ... it's useless --- system/core/URI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/URI.php b/system/core/URI.php index 7c93e36b7..7f07bfe1e 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -96,7 +96,7 @@ class CI_URI { * * @return void */ - public function __construct(CI_Config &$config) + public function __construct(CI_Config $config) { $this->config = $config; -- cgit v1.2.3-24-g4f1b From a7bd30c75e844f133b6aa8aae7c64e6cf9ce143a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:39:59 +0200 Subject: [ci skip] Polish changes from PR #4453 --- application/config/autoload.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index aeacbdb66..7cdc9013c 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -73,10 +73,11 @@ $autoload['libraries'] = array(); | | $autoload['drivers'] = array('cache'); | -| You can also supply an alternative library name to be assigned in +| You can also supply an alternative property name to be assigned in | the controller: | -| $autoload['drivers'] = array('cache' => 'cch'); +| $autoload['drivers'] = array('cache' => 'cch'); +| */ $autoload['drivers'] = array(); -- cgit v1.2.3-24-g4f1b From 44d3b185ae7a15e50bd595440187c6c863a13415 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:37:14 +0200 Subject: Merge pull request #4453 from EpicKris/feature/Autoload-Driver-Object-Name Autoload Driver Object Names --- application/config/autoload.php | 5 +++++ system/core/Loader.php | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index 4bc6bf0ad..aeacbdb66 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -72,6 +72,11 @@ $autoload['libraries'] = array(); | Prototype: | | $autoload['drivers'] = array('cache'); +| +| You can also supply an alternative library name to be assigned in +| the controller: +| +| $autoload['drivers'] = array('cache' => 'cch'); */ $autoload['drivers'] = array(); diff --git a/system/core/Loader.php b/system/core/Loader.php index 37d1ecaf9..80de804ea 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -718,9 +718,16 @@ class CI_Loader { { if (is_array($library)) { - foreach ($library as $driver) + foreach ($library as $key => $value) { - $this->driver($driver); + if (is_int($key)) + { + $this->driver($value, $params); + } + else + { + $this->driver($key, $params, $value); + } } return $this; @@ -1334,10 +1341,7 @@ class CI_Loader { // Autoload drivers if (isset($autoload['drivers'])) { - foreach ($autoload['drivers'] as $item) - { - $this->driver($item); - } + $this->driver($autoload['drivers']); } // Load libraries -- cgit v1.2.3-24-g4f1b From 5fd4afdecba772d5f38254cb57a845b2fd607d82 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:39:59 +0200 Subject: [ci skip] Polish changes from PR #4453 --- application/config/autoload.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index aeacbdb66..7cdc9013c 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -73,10 +73,11 @@ $autoload['libraries'] = array(); | | $autoload['drivers'] = array('cache'); | -| You can also supply an alternative library name to be assigned in +| You can also supply an alternative property name to be assigned in | the controller: | -| $autoload['drivers'] = array('cache' => 'cch'); +| $autoload['drivers'] = array('cache' => 'cch'); +| */ $autoload['drivers'] = array(); -- cgit v1.2.3-24-g4f1b From 82efb383544dc06aef7c628780b74acac31fb622 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:43:06 +0200 Subject: [ci skip] Add changelog entry for PR #4453 --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ba9f93860..6bbd7f9e9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.0.5 Release Date: Not Released +- Core + + - Changed :doc:`Loader Library ` to allow ``$autoload['drivers']`` assigning with custom property names. + - :doc:`Query Builder ` - Added a ``$batch_size`` parameter to the ``insert_batch()`` method (defaults to 100). -- cgit v1.2.3-24-g4f1b From 86d2ec40b47f885a6d7e28b9dd519fac3332e7ae Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 17 Feb 2016 19:19:56 +0200 Subject: [ci skip] Update docs to reflect escape_like_str() usage with ESCAPE '\!' Closes #4462 --- user_guide_src/source/database/db_driver_reference.rst | 7 +++++++ user_guide_src/source/database/queries.rst | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1e436ede1..1ecd38968 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -234,6 +234,13 @@ This article is intended to be a reference for them. and ``_`` wildcard characters, so that they don't cause false-positives in LIKE conditions. + .. important:: The ``escape_like_str()`` method uses '!' (exclamation mark) + to escape special characters for *LIKE* conditions. Because this + method escapes partial strings that you would wrap in quotes + yourself, it cannot automatically add the ``ESCAPE '!'`` + condition for you, and so you'll have to manually do that. + + .. php:method:: primary($table) :param string $table: Table name diff --git a/user_guide_src/source/database/queries.rst b/user_guide_src/source/database/queries.rst index 43a0a30bf..d4ffd16cf 100644 --- a/user_guide_src/source/database/queries.rst +++ b/user_guide_src/source/database/queries.rst @@ -123,7 +123,13 @@ this: $search = '20% raise'; $sql = "SELECT id FROM table WHERE column LIKE '%" . - $this->db->escape_like_str($search)."%'"; + $this->db->escape_like_str($search)."%' ESCAPE '!'"; + +.. important:: The ``escape_like_str()`` method uses '!' (exclamation mark) + to escape special characters for *LIKE* conditions. Because this + method escapes partial strings that you would wrap in quotes + yourself, it cannot automatically add the ``ESCAPE '!'`` + condition for you, and so you'll have to manually do that. ************** -- cgit v1.2.3-24-g4f1b From 6f1342986a2954daa331b0a849e8a6817e5e1920 Mon Sep 17 00:00:00 2001 From: vibbow Date: Sat, 20 Feb 2016 17:30:48 +0000 Subject: Update CodeIgniter.php Declare get_instance() return type --- system/core/CodeIgniter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 84f224123..3d8ae7e87 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -359,7 +359,7 @@ if ( ! is_php('5.4')) * * Returns current CI instance object * - * @return object + * @return CI_Controller object */ function &get_instance() { -- cgit v1.2.3-24-g4f1b From 7230d5dea1e2fa6b242df2b840ad2dc54f0306b0 Mon Sep 17 00:00:00 2001 From: versalle88 Date: Tue, 23 Feb 2016 11:44:35 -0500 Subject: Changed calls to class_exists to ignore __autoload() to match other calls --- system/core/Loader.php | 2 +- system/libraries/Session/Session.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 80de804ea..62781a7bf 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -321,7 +321,7 @@ class CI_Loader { } $model = ucfirst($model); - if ( ! class_exists($model)) + if ( ! class_exists($model, FALSE)) { foreach ($this->_ci_model_paths as $mod_path) { diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index b93c00c15..c6413c102 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -231,7 +231,7 @@ class CI_Session { } } - if ( ! class_exists($prefix.$class) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) + if ( ! class_exists($prefix.$class, FAlSE) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) { require_once($file_path); if (class_exists($prefix.$class, FALSE)) -- cgit v1.2.3-24-g4f1b From 17c52eaef97a58545004b49141689ef612c9456c Mon Sep 17 00:00:00 2001 From: versalle88 Date: Tue, 23 Feb 2016 11:46:08 -0500 Subject: Changed calls to class_exists to ignore __autoload() to match other calls --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index c6413c102..77c56ae70 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -231,7 +231,7 @@ class CI_Session { } } - if ( ! class_exists($prefix.$class, FAlSE) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) + if ( ! class_exists($prefix.$class, FALSE) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) { require_once($file_path); if (class_exists($prefix.$class, FALSE)) -- cgit v1.2.3-24-g4f1b From 1e4e75421ec0fd00b75de1b34ca60d84b300e050 Mon Sep 17 00:00:00 2001 From: versalle88 Date: Tue, 23 Feb 2016 11:47:45 -0500 Subject: Removed --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 77c56ae70..b93c00c15 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -231,7 +231,7 @@ class CI_Session { } } - if ( ! class_exists($prefix.$class, FALSE) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) + if ( ! class_exists($prefix.$class) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) { require_once($file_path); if (class_exists($prefix.$class, FALSE)) -- cgit v1.2.3-24-g4f1b From 82d5c231d55aa290a2739d01055a9b8e6c8243a6 Mon Sep 17 00:00:00 2001 From: versalle88 Date: Tue, 23 Feb 2016 11:48:04 -0500 Subject: Fixed typo --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index b93c00c15..77c56ae70 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -231,7 +231,7 @@ class CI_Session { } } - if ( ! class_exists($prefix.$class) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) + if ( ! class_exists($prefix.$class, FALSE) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) { require_once($file_path); if (class_exists($prefix.$class, FALSE)) -- cgit v1.2.3-24-g4f1b From 738b9e30404a56a8e2e8053f024550232b72ea09 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 24 Feb 2016 12:14:10 +0200 Subject: Merge pull request #4480 from versalle88/develop Changed class_exists() calls to ignore __autoload() --- system/core/Loader.php | 2 +- system/libraries/Session/Session.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 80de804ea..62781a7bf 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -321,7 +321,7 @@ class CI_Loader { } $model = ucfirst($model); - if ( ! class_exists($model)) + if ( ! class_exists($model, FALSE)) { foreach ($this->_ci_model_paths as $mod_path) { diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index b93c00c15..77c56ae70 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -231,7 +231,7 @@ class CI_Session { } } - if ( ! class_exists($prefix.$class) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) + if ( ! class_exists($prefix.$class, FALSE) && file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$prefix.$class.'.php')) { require_once($file_path); if (class_exists($prefix.$class, FALSE)) -- cgit v1.2.3-24-g4f1b From fa34429e85b4bf452ba595072124a884ca3e8b89 Mon Sep 17 00:00:00 2001 From: sprakash4 Date: Fri, 26 Feb 2016 16:02:07 -0800 Subject: Downgraded log level for some pesky messages to INFO --- system/core/Config.php | 2 +- system/core/Input.php | 2 +- system/core/Output.php | 4 ++-- system/core/Utf8.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/core/Config.php b/system/core/Config.php index ca6fb3793..5c6ba2a4d 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -169,7 +169,7 @@ class CI_Config { $this->is_loaded[] = $file_path; $config = NULL; $loaded = TRUE; - log_message('debug', 'Config file loaded: '.$file_path); + log_message('info', 'Config file loaded: '.$file_path); } } diff --git a/system/core/Input.php b/system/core/Input.php index a7c9ecd0d..59b39620c 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -653,7 +653,7 @@ class CI_Input { // Sanitize PHP_SELF $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']); - log_message('debug', 'Global POST, GET and COOKIE data sanitized'); + log_message('info', 'Global POST, GET and COOKIE data sanitized'); } // -------------------------------------------------------------------- diff --git a/system/core/Output.php b/system/core/Output.php index ec9c21b91..6e0b4e724 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -492,7 +492,7 @@ class CI_Output { echo $output; log_message('info', 'Final output sent to browser'); - log_message('debug', 'Total execution time: '.$elapsed); + log_message('info', 'Total execution time: '.$elapsed); return; } @@ -529,7 +529,7 @@ class CI_Output { } log_message('info', 'Final output sent to browser'); - log_message('debug', 'Total execution time: '.$elapsed); + log_message('info', 'Total execution time: '.$elapsed); } // -------------------------------------------------------------------- diff --git a/system/core/Utf8.php b/system/core/Utf8.php index f2f42e6ca..93c611675 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -66,12 +66,12 @@ class CI_Utf8 { ) { define('UTF8_ENABLED', TRUE); - log_message('debug', 'UTF-8 Support Enabled'); + log_message('info', 'UTF-8 Support Enabled'); } else { define('UTF8_ENABLED', FALSE); - log_message('debug', 'UTF-8 Support Disabled'); + log_message('info', 'UTF-8 Support Disabled'); } log_message('info', 'Utf8 Class Initialized'); -- cgit v1.2.3-24-g4f1b From b89f5d3ddfc897f0afc4f15a0993f8f1b2b56b88 Mon Sep 17 00:00:00 2001 From: roastduck Date: Sun, 28 Feb 2016 10:18:19 +0800 Subject: clean current lock key in redis session driver set $this->_lock_key to NULL after close Signed-off-by: roastduck --- system/libraries/Session/drivers/Session_redis_driver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index dc4328644..5081bd5d4 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -278,6 +278,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->ping() === '+PONG') { isset($this->_lock_key) && $this->_redis->delete($this->_lock_key); + $this->_lock_key = NULL; if ($this->_redis->close() === $this->_failure) { return $this->_failure; -- cgit v1.2.3-24-g4f1b From 9d1c16a8ccbfe555e5646b4a08c47d26dc36a33c Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Mon, 29 Feb 2016 09:36:20 -0500 Subject: [ci skip] fix comment --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index d6f35e0df..eb9620f16 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -2342,7 +2342,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * * Escapes identifiers in WHERE and HAVING statements at execution time. * - * Required so that aliases are tracked properly, regardless of wether + * Required so that aliases are tracked properly, regardless of whether * where(), or_where(), having(), or_having are called prior to from(), * join() and dbprefix is added only if needed. * -- cgit v1.2.3-24-g4f1b From 99c17e516438843a69496046e5bc0ea627c3b0f8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Feb 2016 16:53:45 +0200 Subject: Merge pull request #4495 from galdiolo/patch-15 [ci skip] Fix a comment typo --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 6bf039ead..c862d937d 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -2350,7 +2350,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { * * Escapes identifiers in WHERE and HAVING statements at execution time. * - * Required so that aliases are tracked properly, regardless of wether + * Required so that aliases are tracked properly, regardless of whether * where(), or_where(), having(), or_having are called prior to from(), * join() and dbprefix is added only if needed. * -- cgit v1.2.3-24-g4f1b From 7f0f73ba81ad712f2553e2f7ef5d0a50f16e119e Mon Sep 17 00:00:00 2001 From: __RD Date: Mon, 29 Feb 2016 22:56:29 +0800 Subject: delete lock directly -> call _release_lock() --- system/libraries/Session/drivers/Session_redis_driver.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 5081bd5d4..3b648d183 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -277,8 +277,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle try { if ($this->_redis->ping() === '+PONG') { - isset($this->_lock_key) && $this->_redis->delete($this->_lock_key); - $this->_lock_key = NULL; + $this->_release_lock($this->_lock_key); if ($this->_redis->close() === $this->_failure) { return $this->_failure; -- cgit v1.2.3-24-g4f1b From 9a15344bc610b2c6a3a1a0a0b73db2fe0eba987a Mon Sep 17 00:00:00 2001 From: __RD Date: Mon, 29 Feb 2016 22:58:23 +0800 Subject: fix typo --- system/libraries/Session/drivers/Session_redis_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 3b648d183..c0c20a7ca 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -277,7 +277,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle try { if ($this->_redis->ping() === '+PONG') { - $this->_release_lock($this->_lock_key); + $this->_release_lock(); if ($this->_redis->close() === $this->_failure) { return $this->_failure; -- cgit v1.2.3-24-g4f1b From f06858c3df09fd33c80f9fc415b6c63b3430869c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Feb 2016 17:35:12 +0200 Subject: Merge pull request #4491 from roastduck/develop [ci skip] Clean current lock key on close() in redis session driver --- system/libraries/Session/drivers/Session_redis_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index ad95309da..7b7951f5d 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -254,7 +254,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle try { if ($this->_redis->ping() === '+PONG') { - isset($this->_lock_key) && $this->_redis->delete($this->_lock_key); + $this->_release_lock(); if ($this->_redis->close() === $this->_failure) { return $this->_failure; -- cgit v1.2.3-24-g4f1b From 215922144082eb4b613e2418ba552776d23ea1db Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Feb 2016 17:38:51 +0200 Subject: [ci skip] Apply #4491 to Memcached driver --- system/libraries/Session/drivers/Session_memcached_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 875e72255..4bd63991f 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -246,7 +246,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if (isset($this->_memcached)) { - isset($this->_lock_key) && $this->_memcached->delete($this->_lock_key); + $this->_release_lock(); if ( ! $this->_memcached->quit()) { return $this->_failure; -- cgit v1.2.3-24-g4f1b From e0b11e9a57f1fa3ef8b0d8ee7cef640aa5cc0eef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Feb 2016 17:41:19 +0200 Subject: [ci skip] Add changelog entries for PR #4491 and 215922144082eb4b613e2418ba552776d23ea1db --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6bbd7f9e9..45e891e89 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -35,6 +35,8 @@ Bug fixes for 3.0.5 - Fixed a bug where :doc:`Session Library ` didn't properly handle its locks' statuses with the 'memcached' driver. - Fixed a bug where :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'memcached' driver. - Fixed a bug (#4449) - :doc:`Query Builder ` method ``join()`` breaks conditions containing ``IS NULL``, ``IS NOT NULL``. +- Fixed a bug (#4491) - :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'redis' driver. +- Fixed a bug where :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'memcached' driver. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From e1f36e341a4ff513f8ba1f9908326f159edca4e7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Mar 2016 13:33:37 +0200 Subject: [ci skip] Move flock() call in CI_Log::write_log() immediately after fopen() --- system/core/Log.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Log.php b/system/core/Log.php index 7c81d358b..1abdaa00e 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -191,6 +191,8 @@ class CI_Log { return FALSE; } + flock($fp, LOCK_EX); + // Instantiating DateTime with microseconds appended to initial date is needed for proper support of this format if (strpos($this->_date_fmt, 'u') !== FALSE) { @@ -206,8 +208,6 @@ class CI_Log { $message .= $this->_format_line($level, $date, $msg); - flock($fp, LOCK_EX); - for ($written = 0, $length = strlen($message); $written < $length; $written += $result) { if (($result = fwrite($fp, substr($message, $written))) === FALSE) -- cgit v1.2.3-24-g4f1b From b03380c8d20f76bbc6b49c7d9d31198bb769f422 Mon Sep 17 00:00:00 2001 From: Adi Prasetyo Date: Thu, 3 Mar 2016 03:53:26 +0700 Subject: Doc , update image_lib.rst > at *the* same level *as* --- user_guide_src/source/libraries/image_lib.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index d5c24c1b0..b25d2512f 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -63,7 +63,8 @@ called *mypic.jpg* located in the source_image folder, then create a thumbnail that is 75 X 50 pixels using the GD2 image_library. Since the maintain_ratio option is enabled, the thumb will be as close to the target width and height as possible while preserving the original aspect -ratio. The thumbnail will be called *mypic_thumb.jpg* +ratio. The thumbnail will be called *mypic_thumb.jpg* and located at +the same level as *source_image*. .. note:: In order for the image class to be allowed to do any processing, the folder containing the image files must have write -- cgit v1.2.3-24-g4f1b From 858e8b704fef1378713e3a6c865dcd2b07577076 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 4 Mar 2016 15:19:24 +0200 Subject: Merge pull request #4502 from brutalcrozt/develop [ci skip] Update image_lib docs --- user_guide_src/source/libraries/image_lib.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index 27d2eb98c..22407962f 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -63,7 +63,8 @@ called *mypic.jpg* located in the source_image folder, then create a thumbnail that is 75 X 50 pixels using the GD2 image_library. Since the maintain_ratio option is enabled, the thumb will be as close to the target width and height as possible while preserving the original aspect -ratio. The thumbnail will be called *mypic_thumb.jpg* +ratio. The thumbnail will be called *mypic_thumb.jpg* and located at +the same level as *source_image*. .. note:: In order for the image class to be allowed to do any processing, the folder containing the image files must have write -- cgit v1.2.3-24-g4f1b From 1d7443acb57fa473295ecf4856a456d2c4fbe59f Mon Sep 17 00:00:00 2001 From: mixinix Date: Mon, 7 Mar 2016 05:23:38 +0700 Subject: Update calendar.rst --- user_guide_src/source/libraries/calendar.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index ea0f4d108..8fdacf1d7 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -60,10 +60,10 @@ parameter of the calendar generating function. Consider this example:: $this->load->library('calendar'); $data = array( - 3 => 'http://example.com/news/article/2006/03/', - 7 => 'http://example.com/news/article/2006/07/', - 13 => 'http://example.com/news/article/2006/13/', - 26 => 'http://example.com/news/article/2006/26/' + 3 => 'http://example.com/news/article/2006/06/03/', + 7 => 'http://example.com/news/article/2006/06/07/', + 13 => 'http://example.com/news/article/2006/06/13/', + 26 => 'http://example.com/news/article/2006/06/26/' ); echo $this->calendar->generate(2006, 6, $data); -- cgit v1.2.3-24-g4f1b From c1721f15c72fb0b062a381d89dadaf1e86f8576b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Mar 2016 10:03:58 +0200 Subject: Merge pull request #4506 from mixinix/patch-1 [ci skip] Update Calendar docs --- user_guide_src/source/libraries/calendar.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index ea0f4d108..8fdacf1d7 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -60,10 +60,10 @@ parameter of the calendar generating function. Consider this example:: $this->load->library('calendar'); $data = array( - 3 => 'http://example.com/news/article/2006/03/', - 7 => 'http://example.com/news/article/2006/07/', - 13 => 'http://example.com/news/article/2006/13/', - 26 => 'http://example.com/news/article/2006/26/' + 3 => 'http://example.com/news/article/2006/06/03/', + 7 => 'http://example.com/news/article/2006/06/07/', + 13 => 'http://example.com/news/article/2006/06/13/', + 26 => 'http://example.com/news/article/2006/06/26/' ); echo $this->calendar->generate(2006, 6, $data); -- cgit v1.2.3-24-g4f1b From 8108b612fb80327215ae66b53c75c158d6f07e62 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Mar 2016 10:10:17 +0200 Subject: [ci skip] Fix transactions for the ibase driver Reported via the forums: http://forum.codeigniter.com/thread-64559.html --- system/database/drivers/ibase/ibase_driver.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index cbc1022ff..c1055c1e6 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -126,7 +126,7 @@ class CI_DB_ibase_driver extends CI_DB { */ protected function _execute($sql) { - return ibase_query($this->conn_id, $sql); + return ibase_query(isset($this->_ibase_trans) ? $this->_ibase_trans : $this->conn_id, $sql); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 45e891e89..d963b57dc 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -37,6 +37,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4449) - :doc:`Query Builder ` method ``join()`` breaks conditions containing ``IS NULL``, ``IS NOT NULL``. - Fixed a bug (#4491) - :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'redis' driver. - Fixed a bug where :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'memcached' driver. +- Fixed a bug where :doc:`Database ` transactions didn't work with the 'ibase' driver. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 3c0d8da56b8535bb3ab563256e221c81a4a96e4a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Mar 2016 10:52:15 +0200 Subject: Fix #4475 --- system/core/Security.php | 9 ++++++++- tests/codeigniter/core/Security_test.php | 6 ++++-- user_guide_src/source/changelog.rst | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index bad511dd3..d5305d1ca 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -762,7 +762,14 @@ class CI_Security { */ public function strip_image_tags($str) { - return preg_replace(array('##', '##'), '\\1', $str); + return preg_replace( + array( + '##i', + '#`]+)).*?\>#i' + ), + '\\2', + $str + ); } // ---------------------------------------------------------------- diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 2ef822863..8328c37cb 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -299,7 +299,8 @@ class Security_test extends CI_TestCase { 'MD Logo', '', '', - '' + '', + '' ); $urls = array( @@ -310,7 +311,8 @@ class Security_test extends CI_TestCase { 'mdn-logo-sm.png', '', '', - '' + '', + 'non-quoted.attribute' ); for ($i = 0; $i < count($imgtags); $i++) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d963b57dc..12d1fc4a3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -38,6 +38,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4491) - :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'redis' driver. - Fixed a bug where :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'memcached' driver. - Fixed a bug where :doc:`Database ` transactions didn't work with the 'ibase' driver. +- Fixed a bug (#4475) - :doc:`Security Library ` method ``strip_image_tags()`` preserves only the first URL character from non-quoted *src* attributes. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From e6a5f797de7381791537b736eb83b71c6fb28b39 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Mar 2016 11:34:43 +0200 Subject: [ci skip] Fix Profiler not applying htmlspecialchars() to all inputs --- system/libraries/Profiler.php | 44 +++++++++++++++---------------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index cc7641436..cf455d3da 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -314,12 +314,14 @@ class CI_Profiler { foreach ($_GET as $key => $val) { - is_int($key) OR $key = "'".$key."'"; + is_int($key) OR $key = "'".htmlspecialchars($key, ENT_QUOTES, config_item('charset'))."'"; + $val = (is_array($val) OR is_object($val)) + ? '
'.htmlspecialchars(print_r($val, TRUE), ENT_QUOTES, config_item('charset'))
+					: htmlspecialchars($val, ENT_QUOTES, config_item('charset'));
 
 				$output .= '$_GET['
 					.$key.']   '
-					.((is_array($val) OR is_object($val)) ? '
'.htmlspecialchars(stripslashes(print_r($val, TRUE))).'
' : htmlspecialchars(stripslashes($val))) - ."\n"; + .$val."\n"; } $output .= "\n"; @@ -352,36 +354,26 @@ class CI_Profiler { foreach ($_POST as $key => $val) { - is_int($key) OR $key = "'".$key."'"; + is_int($key) OR $key = "'".htmlspecialchars($key, ENT_QUOTES, config_item('charset'))."'"; + $val = (is_array($val) OR is_object($val)) + ? '
'.htmlspecialchars(print_r($val, TRUE), ENT_QUOTES, config_item('charset'))
+					: htmlspecialchars($val, ENT_QUOTES, config_item('charset'));
 
 				$output .= '$_POST['
-					.$key.']   ';
-
-				if (is_array($val) OR is_object($val))
-				{
-					$output .= '
'.htmlspecialchars(stripslashes(print_r($val, TRUE))).'
'; - } - else - { - $output .= htmlspecialchars(stripslashes($val)); - } - - $output .= "\n"; + .$key.']   ' + .$val."\n"; } foreach ($_FILES as $key => $val) { - is_int($key) OR $key = "'".$key."'"; + is_int($key) OR $key = "'".htmlspecialchars($key, ENT_QUOTES, config_item('charset'))."'"; + $val = (is_array($val) OR is_object($val)) + ? '
'.htmlspecialchars(print_r($val, TRUE), ENT_QUOTES, config_item('charset'))
+					: htmlspecialchars($val, ENT_QUOTES, config_item('charset'));
 
 				$output .= '$_FILES['
-					.$key.']   ';
-
-				if (is_array($val) OR is_object($val))
-				{
-					$output .= '
'.htmlspecialchars(stripslashes(print_r($val, TRUE))).'
'; - } - - $output .= "\n"; + .$key.']   ' + .$val."\n"; } $output .= "\n"; @@ -465,7 +457,7 @@ class CI_Profiler { foreach (array('HTTP_ACCEPT', 'HTTP_USER_AGENT', 'HTTP_CONNECTION', 'SERVER_PORT', 'SERVER_NAME', 'REMOTE_ADDR', 'SERVER_SOFTWARE', 'HTTP_ACCEPT_LANGUAGE', 'SCRIPT_NAME', 'REQUEST_METHOD',' HTTP_HOST', 'REMOTE_HOST', 'CONTENT_TYPE', 'SERVER_PROTOCOL', 'QUERY_STRING', 'HTTP_ACCEPT_ENCODING', 'HTTP_X_FORWARDED_FOR', 'HTTP_DNT') as $header) { - $val = isset($_SERVER[$header]) ? $_SERVER[$header] : ''; + $val = isset($_SERVER[$header]) ? htmlspecialchars($_SERVER[$header], ENT_QUOTES, config_item('charset')) : ''; $output .= '' .$header.'  '.$val."\n"; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 12d1fc4a3..4f2bfc04e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -39,6 +39,7 @@ Bug fixes for 3.0.5 - Fixed a bug where :doc:`Session Library ` didn't clean-up internal variables for emulated locks with the 'memcached' driver. - Fixed a bug where :doc:`Database ` transactions didn't work with the 'ibase' driver. - Fixed a bug (#4475) - :doc:`Security Library ` method ``strip_image_tags()`` preserves only the first URL character from non-quoted *src* attributes. +- Fixed a bug where :doc:`Profiler Library ` didn't apply ``htmlspecialchars()`` to all displayed inputs. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 1b7840b58c0705cc8a78c164940a114fa0012fae Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Mar 2016 13:01:57 +0200 Subject: [ci skip] Add random_compat as a suggested package in composer.json --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 4a9e8748e..64d1be155 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,9 @@ "require": { "php": ">=5.2.4" }, + "suggest": { + "paragonie/random_compat": "Provides better randomness in PHP 5.x" + }, "require-dev": { "mikey179/vfsStream": "1.1.*" } -- cgit v1.2.3-24-g4f1b From a479ae85f21caef9d109b2e75229853e0b660cce Mon Sep 17 00:00:00 2001 From: vibbow Date: Mon, 7 Mar 2016 15:38:36 +0000 Subject: Update CodeIgniter.php --- system/core/CodeIgniter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 3d8ae7e87..d9ac7efe3 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -359,7 +359,7 @@ if ( ! is_php('5.4')) * * Returns current CI instance object * - * @return CI_Controller object + * @return CI_Controller */ function &get_instance() { -- cgit v1.2.3-24-g4f1b From 7e0bde27c8a6669b781d87c15ea51b750c91f97c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Mar 2016 17:52:26 +0200 Subject: Merge pull request #4472 from vibbow/patch-1 [ci skip] Update get_instance() return type in docblock --- system/core/CodeIgniter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 52b542654..bf41ab2a2 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -359,7 +359,7 @@ if ( ! is_php('5.4')) * * Returns current CI instance object * - * @return object + * @return CI_Controller */ function &get_instance() { -- cgit v1.2.3-24-g4f1b From a027a7fd0d770cec0d71e888d8b6f4aa1568ce9f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Mar 2016 13:59:20 +0200 Subject: Improve ext/session error messages --- system/libraries/Session/Session_driver.php | 20 ++++++++++++++++++++ .../Session/drivers/Session_database_driver.php | 21 ++++++++++----------- .../Session/drivers/Session_memcached_driver.php | 20 ++++++++++---------- .../Session/drivers/Session_redis_driver.php | 22 +++++++++++----------- user_guide_src/source/changelog.rst | 4 ++++ 5 files changed, 55 insertions(+), 32 deletions(-) diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 98fc897e3..55ddb25e0 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -168,4 +168,24 @@ abstract class CI_Session_driver implements SessionHandlerInterface { return TRUE; } + // ------------------------------------------------------------------------ + + /** + * Fail + * + * Drivers other than the 'files' one don't (need to) use the + * session.save_path INI setting, but that leads to confusing + * error messages emitted by PHP when open() or write() fail, + * as the message contains session.save_path ... + * To work around the problem, the drivers will call this method + * so that the INI is set just in time for the error message to + * be properly generated. + * + * @return mixed + */ + protected function _fail() + { + ini_set('session.save_path', config_item('sess_save_path')); + return $this->_failure; + } } diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 3ba9d3d36..da0331220 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -127,7 +127,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan { if (empty($this->_db->conn_id) && ! $this->_db->db_connect()) { - return $this->_failure; + return $this->_fail(); } return $this->_success; @@ -163,7 +163,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan $this->_db->where('ip_address', $_SERVER['REMOTE_ADDR']); } - if (($result = $this->_db->get()->row()) === NULL) + if ( ! ($result = $this->_db->get()) OR $result->row() === NULL) { // PHP7 will reuse the same SessionHandler object after // ID regeneration, so we need to explicitly set this to @@ -210,7 +210,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { - return $this->_failure; + return $this->_fail(); } $this->_row_exists = FALSE; @@ -218,7 +218,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan } elseif ($this->_lock === FALSE) { - return $this->_failure; + return $this->_fail(); } if ($this->_row_exists === FALSE) @@ -237,7 +237,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return $this->_success; } - return $this->_failure; + return $this->_fail(); } $this->_db->where('id', $session_id); @@ -260,7 +260,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return $this->_success; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -275,7 +275,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan public function close() { return ($this->_lock && ! $this->_release_lock()) - ? $this->_failure + ? $this->_fail() : $this->_success; } @@ -304,7 +304,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan if ( ! $this->_db->delete($this->_config['save_path'])) { - return $this->_failure; + return $this->_fail(); } } @@ -314,7 +314,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return $this->_success; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -334,7 +334,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return ($this->_db->delete($this->_config['save_path'], 'timestamp < '.(time() - $maxlifetime))) ? $this->_success - : $this->_failure; + : $this->_fail(); } // ------------------------------------------------------------------------ @@ -414,5 +414,4 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return parent::_release_lock(); } - } \ No newline at end of file diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 4bd63991f..88eb4b3a6 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -117,7 +117,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { $this->_memcached = NULL; log_message('error', 'Session: Invalid Memcached save path format: '.$this->_config['save_path']); - return $this->_failure; + return $this->_fail(); } foreach ($matches as $match) @@ -142,7 +142,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa if (empty($server_list)) { log_message('error', 'Session: Memcached server pool is empty.'); - return $this->_failure; + return $this->_fail(); } return $this->_success; @@ -170,7 +170,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return $session_data; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -188,14 +188,14 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if ( ! isset($this->_memcached)) { - return $this->_failure; + return $this->_fail(); } // Was the ID regenerated? elseif ($session_id !== $this->_session_id) { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { - return $this->_failure; + return $this->_fail(); } $this->_fingerprint = md5(''); @@ -218,7 +218,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return $this->_success; } - return $this->_failure; + return $this->_fail(); } if ( @@ -230,7 +230,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa } } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -249,14 +249,14 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa $this->_release_lock(); if ( ! $this->_memcached->quit()) { - return $this->_failure; + return $this->_fail(); } $this->_memcached = NULL; return $this->_success; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -278,7 +278,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return $this->_success; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 7b7951f5d..cc242dd3d 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -131,7 +131,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { if (empty($this->_config['save_path'])) { - return $this->_failure; + return $this->_fail(); } $redis = new Redis(); @@ -153,7 +153,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_success; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -183,7 +183,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $session_data; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -201,14 +201,14 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { if ( ! isset($this->_redis)) { - return $this->_failure; + return $this->_fail(); } // Was the ID regenerated? elseif ($session_id !== $this->_session_id) { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { - return $this->_failure; + return $this->_fail(); } $this->_key_exists = FALSE; @@ -227,15 +227,15 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_success; } - return $this->_failure; + return $this->_fail(); } return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) ? $this->_success - : $this->_failure; + : $this->_fail(); } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ @@ -255,9 +255,9 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->ping() === '+PONG') { $this->_release_lock(); - if ($this->_redis->close() === $this->_failure) + if ($this->_redis->close() === $this->_fail()) { - return $this->_failure; + return $this->_fail(); } } } @@ -296,7 +296,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle return $this->_success; } - return $this->_failure; + return $this->_fail(); } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4f2bfc04e..888ae5f82 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,10 @@ Release Date: Not Released - Changed :doc:`Loader Library ` to allow ``$autoload['drivers']`` assigning with custom property names. +- General Changes + + - Updated the :doc:`Session Library ` to produce friendlier error messages on failures with drivers other than 'files'. + - :doc:`Query Builder ` - Added a ``$batch_size`` parameter to the ``insert_batch()`` method (defaults to 100). -- cgit v1.2.3-24-g4f1b From 7bdd4950da2226859b00042ce9e8b2b9797129a7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Mar 2016 14:01:09 +0200 Subject: Fix a logical error from last commit --- system/libraries/Session/drivers/Session_database_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index da0331220..317bd7d4d 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -163,7 +163,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan $this->_db->where('ip_address', $_SERVER['REMOTE_ADDR']); } - if ( ! ($result = $this->_db->get()) OR $result->row() === NULL) + if ( ! ($result = $this->_db->get()) OR ($result = $result->row()) === NULL) { // PHP7 will reuse the same SessionHandler object after // ID regeneration, so we need to explicitly set this to -- cgit v1.2.3-24-g4f1b From f56068bfd34e3ebc1325b049bf33901d855c7321 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 11:11:53 +0200 Subject: Revert an unintended change from a027a7fd0d770cec0d71e888d8b6f4aa1568ce9f --- system/libraries/Session/drivers/Session_redis_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index cc242dd3d..e4e09fe0d 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -255,7 +255,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->ping() === '+PONG') { $this->_release_lock(); - if ($this->_redis->close() === $this->_fail()) + if ($this->_redis->close() === $this->_failure) { return $this->_fail(); } -- cgit v1.2.3-24-g4f1b From 1be8987176ad422ae6bc8af5c8f148eba9b5dff1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 18:12:57 +0200 Subject: Fix a number of CI_Cache bugs Fixes #4277 Supersedes #4474 Really fixes #4066 --- system/libraries/Cache/drivers/Cache_apc.php | 27 +++++++++++++++------- system/libraries/Cache/drivers/Cache_memcached.php | 1 + system/libraries/Cache/drivers/Cache_redis.php | 6 +++++ system/libraries/Cache/drivers/Cache_wincache.php | 27 +++++++++++++++------- user_guide_src/source/changelog.rst | 2 ++ 5 files changed, 47 insertions(+), 16 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index dd18e7bc8..07ea8f474 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -48,6 +48,24 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_Cache_apc extends CI_Driver { + /** + * Class constructor + * + * Only present so that an error message is logged + * if APC is not available. + * + * @return void + */ + public function __construct() + { + if ( ! $this->is_supported()) + { + log_message('error', 'Cache: Failed to initialize APC; extension not loaded/enabled?'); + } + } + + // ------------------------------------------------------------------------ + /** * Get * @@ -198,13 +216,6 @@ class CI_Cache_apc extends CI_Driver { */ public function is_supported() { - if ( ! extension_loaded('apc') OR ! ini_get('apc.enabled')) - { - log_message('debug', 'The APC PHP extension must be loaded to use APC Cache.'); - return FALSE; - } - - return TRUE; + return (extension_loaded('apc') && ini_get('apc.enabled')); } - } diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index c44958b97..7e67fc40f 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -107,6 +107,7 @@ class CI_Cache_memcached extends CI_Driver { else { log_message('error', 'Cache: Failed to create Memcache(d) object; extension not loaded?'); + return; } foreach ($this->_memcache_conf as $cache_server) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 81b49e2fc..e9194a499 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -91,6 +91,12 @@ class CI_Cache_redis extends CI_Driver */ public function __construct() { + if ( ! $this->is_supported()) + { + log_message('error', 'Cache: Failed to create Redis object; extension not loaded?'); + return; + } + $config = array(); $CI =& get_instance(); diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index f66080514..d6a0d4fb6 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -51,6 +51,24 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_Cache_wincache extends CI_Driver { + /** + * Class constructor + * + * Only present so that an error message is logged + * if APC is not available. + * + * @return void + */ + public function __construct() + { + if ( ! $this->is_supported()) + { + log_message('error', 'Cache: Failed to initialize Wincache; extension not loaded/enabled?'); + } + } + + // ------------------------------------------------------------------------ + /** * Get * @@ -194,13 +212,6 @@ class CI_Cache_wincache extends CI_Driver { */ public function is_supported() { - if ( ! extension_loaded('wincache') OR ! ini_get('wincache.ucenabled')) - { - log_message('debug', 'The Wincache PHP extension must be loaded to use Wincache Cache.'); - return FALSE; - } - - return TRUE; + return (extension_loaded('wincache') && ini_get('wincache.ucenabled')); } - } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 888ae5f82..52e8d13d6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -44,6 +44,8 @@ Bug fixes for 3.0.5 - Fixed a bug where :doc:`Database ` transactions didn't work with the 'ibase' driver. - Fixed a bug (#4475) - :doc:`Security Library ` method ``strip_image_tags()`` preserves only the first URL character from non-quoted *src* attributes. - Fixed a bug where :doc:`Profiler Library ` didn't apply ``htmlspecialchars()`` to all displayed inputs. +- Fixed a bug (#4277) - :doc:`Cache Library ` triggered fatal errors if accessing the Memcache(d) and/or Redis driver and they are not available on the system. +- Fixed a bug where :doc:`Cache Library ` method ``is_supported()`` logged an error message on when it returns ``FALSE`` for the APC and Wincache drivers. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 92d1cc05362998ceabe39c4023f41fd939c1f5b2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 18:19:23 +0200 Subject: Add a defensive check in CI_Loader::_ci_load() Prevents possible internal variable overwrites when loading views --- system/core/Loader.php | 8 ++++++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 9 insertions(+) diff --git a/system/core/Loader.php b/system/core/Loader.php index 62781a7bf..c742ae71a 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -936,6 +936,14 @@ class CI_Loader { */ if (is_array($_ci_vars)) { + foreach (array_keys($_ci_vars) as $key) + { + if (strncmp($key, '_ci_', 4) === 0) + { + unset($_ci_vars[$key]); + } + } + $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars); } extract($this->_ci_cached_vars); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 52e8d13d6..11d7918e7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - Core - Changed :doc:`Loader Library ` to allow ``$autoload['drivers']`` assigning with custom property names. + - Changed :doc:`Loader Library ` to ignore variables prefixed with '_ci_' when loading views. - General Changes -- cgit v1.2.3-24-g4f1b From 59bcd1810f6c18e6dd4158003f122f750536d22e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 18:23:27 +0200 Subject: [ci skip] Prepare for 3.0.5 release --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index bf41ab2a2..94d34c3fd 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.5-dev'); + define('CI_VERSION', '3.0.5'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 11d7918e7..efb5c111c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.0.5 ============= -Release Date: Not Released +Release Date: March 11, 2016 - Core diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 12339eb91..6c263d7ff 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.0.5-dev' +version = '3.0.5' # The full version, including alpha/beta/rc tags. -release = '3.0.5-dev' +release = '3.0.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index c7db54cd8..598bc5a9a 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.0.5-dev (Current version) `_ +- `CodeIgniter v3.0.5 (Current version) `_ - `CodeIgniter v3.0.4 `_ - `CodeIgniter v3.0.3 `_ - `CodeIgniter v3.0.2 `_ -- cgit v1.2.3-24-g4f1b From aac958210f862ed74f85f1ba8963775bca2d6402 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 18:25:37 +0200 Subject: [ci skip] Fix a wrong page link in the changelog --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index efb5c111c..c689017f6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -32,7 +32,7 @@ Bug fixes for 3.0.5 - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). -- Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. +- Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. - Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. - Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. -- cgit v1.2.3-24-g4f1b From 4f9b20ae507dda7379d392386fb7ce5702626a91 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 18:35:58 +0200 Subject: [ci skip] Mark the start of 3.0.6 development --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 ++++++ user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_306.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_306.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 94d34c3fd..f0d7c8f53 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.5'); + define('CI_VERSION', '3.0.6-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c689017f6..71e9673ab 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,12 @@ Change Log ########## +Version 3.0.6 +============= + +Release Date: Not Released + + Version 3.0.5 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 6c263d7ff..e4d14d100 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.0.5' +version = '3.0.6-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.5' +release = '3.0.6-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 598bc5a9a..be33a1dc9 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.0.5 (Current version) `_ +- `CodeIgniter v3.0.6-dev (Current version) `_ +- `CodeIgniter v3.0.5 `_ - `CodeIgniter v3.0.4 `_ - `CodeIgniter v3.0.3 `_ - `CodeIgniter v3.0.2 `_ diff --git a/user_guide_src/source/installation/upgrade_306.rst b/user_guide_src/source/installation/upgrade_306.rst new file mode 100644 index 000000000..e9c4bdd79 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_306.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.5 to 3.0.6 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 102f20abf..040c72832 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.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 Upgrading from 3.0.2 to 3.0.3 -- cgit v1.2.3-24-g4f1b From 1719223f936c1f202b176ebeba7718f6b24e4886 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Mar 2016 22:09:53 +0200 Subject: [ci skip] Fix a changelog message typo --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 71e9673ab..1492b3011 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -52,7 +52,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4475) - :doc:`Security Library ` method ``strip_image_tags()`` preserves only the first URL character from non-quoted *src* attributes. - Fixed a bug where :doc:`Profiler Library ` didn't apply ``htmlspecialchars()`` to all displayed inputs. - Fixed a bug (#4277) - :doc:`Cache Library ` triggered fatal errors if accessing the Memcache(d) and/or Redis driver and they are not available on the system. -- Fixed a bug where :doc:`Cache Library ` method ``is_supported()`` logged an error message on when it returns ``FALSE`` for the APC and Wincache drivers. +- Fixed a bug where :doc:`Cache Library ` method ``is_supported()`` logged an error message when it returns ``FALSE`` for the APC and Wincache drivers. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From fb78f8576816133973ee9586c523a72cdcaeac35 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 10:49:41 +0500 Subject: Added variables to Docblocks where they are skipped --- system/libraries/Cache/drivers/Cache_redis.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 81b49e2fc..a9a9e09cb 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -138,7 +138,7 @@ class CI_Cache_redis extends CI_Driver /** * Get cache * - * @param string Cache ID + * @param string $key Cache ID * @return mixed */ public function get($key) @@ -190,7 +190,7 @@ class CI_Cache_redis extends CI_Driver /** * Delete from cache * - * @param string Cache key + * @param string $key Cache key * @return bool */ public function delete($key) @@ -255,7 +255,7 @@ class CI_Cache_redis extends CI_Driver /** * Get cache driver info * - * @param string Not supported in Redis. + * @param string $type Not supported in Redis. * Only included in order to offer a * consistent cache API. * @return array @@ -271,7 +271,7 @@ class CI_Cache_redis extends CI_Driver /** * Get cache metadata * - * @param string Cache key + * @param string $key Cache key * @return array */ public function get_metadata($key) -- cgit v1.2.3-24-g4f1b From bbfa3ffdb8096e9d20b800ebbc8de672caf98d9e Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:12:58 +0500 Subject: Added the destructor (disconnect from memcache(d)) --- system/libraries/Cache/drivers/Cache_memcached.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index c44958b97..91ad4d243 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -286,4 +286,25 @@ class CI_Cache_memcached extends CI_Driver { { return (extension_loaded('memcached') OR extension_loaded('memcache')); } + + // ------------------------------------------------------------------------ + + /** + * Class destructor + * + * Closes the connection to Memcache(d) if present. + * + * @return void + */ + public function __destruct() + { + if ($this->_memcached instanceof Memcache) + { + $this->_memcached->close(); + } + elseif ($this->_memcached instanceof Memcached) + { + $this->_memcached->quit(); + } + } } -- cgit v1.2.3-24-g4f1b From ae340cc7fca696b9d71588f724c6f35924d24dc4 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:19:25 +0500 Subject: Added variables to Docblocks (memcached) --- system/libraries/Cache/drivers/Cache_memcached.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index c44958b97..16684fbb1 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -186,7 +186,7 @@ class CI_Cache_memcached extends CI_Driver { /** * Delete from Cache * - * @param mixed key to be deleted. + * @param mixed $id key to be deleted. * @return bool true on success, false on failure */ public function delete($id) @@ -251,7 +251,7 @@ class CI_Cache_memcached extends CI_Driver { /** * Get Cache Metadata * - * @param mixed key to get cache metadata on + * @param mixed $id key to get cache metadata on * @return mixed FALSE on failure, array on success. */ public function get_metadata($id) -- cgit v1.2.3-24-g4f1b From 4933c16efd7bad7353877910b7d43d0b5a87735e Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:26:28 +0500 Subject: Renamed $this->_memcache_conf to $this->_config --- system/libraries/Cache/drivers/Cache_memcached.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index c44958b97..09dc7b0de 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -60,7 +60,7 @@ class CI_Cache_memcached extends CI_Driver { * * @var array */ - protected $_memcache_conf = array( + protected $_config = array( 'default' => array( 'host' => '127.0.0.1', 'port' => 11211, @@ -81,17 +81,17 @@ class CI_Cache_memcached extends CI_Driver { { // Try to load memcached server info from the config file. $CI =& get_instance(); - $defaults = $this->_memcache_conf['default']; + $defaults = $this->_config['default']; if ($CI->config->load('memcached', TRUE, TRUE)) { if (is_array($CI->config->config['memcached'])) { - $this->_memcache_conf = array(); + $this->_config = array(); foreach ($CI->config->config['memcached'] as $name => $conf) { - $this->_memcache_conf[$name] = $conf; + $this->_config[$name] = $conf; } } } @@ -109,7 +109,7 @@ class CI_Cache_memcached extends CI_Driver { log_message('error', 'Cache: Failed to create Memcache(d) object; extension not loaded?'); } - foreach ($this->_memcache_conf as $cache_server) + foreach ($this->_config as $cache_server) { isset($cache_server['hostname']) OR $cache_server['hostname'] = $defaults['host']; isset($cache_server['port']) OR $cache_server['port'] = $defaults['port']; -- cgit v1.2.3-24-g4f1b From 2f10aebf8ca7d650ecf7614e8d5e3455c88f96d9 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:28:57 +0500 Subject: Reduction of constructions --- system/libraries/Cache/drivers/Cache_memcached.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 09dc7b0de..7a3267a1e 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -87,12 +87,7 @@ class CI_Cache_memcached extends CI_Driver { { if (is_array($CI->config->config['memcached'])) { - $this->_config = array(); - - foreach ($CI->config->config['memcached'] as $name => $conf) - { - $this->_config[$name] = $conf; - } + $this->_config = $CI->config->config['memcached']; } } -- cgit v1.2.3-24-g4f1b From d03832c6ee27ac1dcf3c5bff3831fcfdd35765f6 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:31:16 +0500 Subject: Combined two "if" conditions to one --- system/libraries/Cache/drivers/Cache_memcached.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 7a3267a1e..02b2d438e 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -83,12 +83,9 @@ class CI_Cache_memcached extends CI_Driver { $CI =& get_instance(); $defaults = $this->_config['default']; - if ($CI->config->load('memcached', TRUE, TRUE)) + if ($CI->config->load('memcached', TRUE, TRUE) && is_array($CI->config->config['memcached'])) { - if (is_array($CI->config->config['memcached'])) - { - $this->_config = $CI->config->config['memcached']; - } + $this->_config = $CI->config->config['memcached']; } if (class_exists('Memcached', FALSE)) -- cgit v1.2.3-24-g4f1b From db91d5b1b3ed2cfd8e1ad0ba59906ad527ef8786 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:37:27 +0500 Subject: The "get_class($A) == B" replaced by "$A instanceof B" --- system/libraries/Cache/drivers/Cache_memcached.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index c44958b97..ae90b9858 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -115,7 +115,7 @@ class CI_Cache_memcached extends CI_Driver { isset($cache_server['port']) OR $cache_server['port'] = $defaults['port']; isset($cache_server['weight']) OR $cache_server['weight'] = $defaults['weight']; - if (get_class($this->_memcached) === 'Memcache') + if ($this->_memcached instanceof Memcache) { // Third parameter is persistance and defaults to TRUE. $this->_memcached->addServer( @@ -169,11 +169,11 @@ class CI_Cache_memcached extends CI_Driver { $data = array($data, time(), $ttl); } - if (get_class($this->_memcached) === 'Memcached') + if ($this->_memcached instanceof Memcached) { return $this->_memcached->set($id, $data, $ttl); } - elseif (get_class($this->_memcached) === 'Memcache') + elseif ($this->_memcached instanceof Memcache) { return $this->_memcached->set($id, $data, 0, $ttl); } -- cgit v1.2.3-24-g4f1b From 35d9f36538be2acc86beb060fb54d93f268cf307 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:38:47 +0500 Subject: Added a second check "instanceof" --- system/libraries/Cache/drivers/Cache_memcached.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index ae90b9858..c22a36f4c 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -125,7 +125,7 @@ class CI_Cache_memcached extends CI_Driver { $cache_server['weight'] ); } - else + elseif ($this->_memcached instanceof Memcached) { $this->_memcached->addServer( $cache_server['hostname'], -- cgit v1.2.3-24-g4f1b From e5102e1fa8adaa7317f8d3da773f8b77d6f7a2c1 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 12:32:49 +0500 Subject: Changed the methods of working with serializable values --- system/libraries/Cache/drivers/Cache_redis.php | 47 ++++++++++---------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 81b49e2fc..c50da1303 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -143,14 +143,21 @@ class CI_Cache_redis extends CI_Driver */ public function get($key) { - $value = $this->_redis->get($key); + $value = $this->_redis->hMGet($key, array('serialized', 'data')); - if ($value !== FALSE && isset($this->_serialized[$key])) + if ( ! is_array($value)) { - return unserialize($value); + return FALSE; } - return $value; + if ( ! empty($value['serialized'])) + { + return unserialize($value['data']); + } + else + { + return $value['data']; + } } // ------------------------------------------------------------------------ @@ -168,21 +175,12 @@ class CI_Cache_redis extends CI_Driver { if (is_array($data) OR is_object($data)) { - if ( ! $this->_redis->sIsMember('_ci_redis_serialized', $id) && ! $this->_redis->sAdd('_ci_redis_serialized', $id)) - { - return FALSE; - } - - isset($this->_serialized[$id]) OR $this->_serialized[$id] = TRUE; - $data = serialize($data); + return $this->_redis->hMSet($id, array('serialized' => TRUE, 'data' => serialize($data))); } - elseif (isset($this->_serialized[$id])) + else { - $this->_serialized[$id] = NULL; - $this->_redis->sRemove('_ci_redis_serialized', $id); + return $this->_redis->hMSet($id, array('serialized' => FALSE, 'data' => $data)); } - - return $this->_redis->set($id, $data, $ttl); } // ------------------------------------------------------------------------ @@ -195,18 +193,7 @@ class CI_Cache_redis extends CI_Driver */ public function delete($key) { - if ($this->_redis->delete($key) !== 1) - { - return FALSE; - } - - if (isset($this->_serialized[$key])) - { - $this->_serialized[$key] = NULL; - $this->_redis->sRemove('_ci_redis_serialized', $key); - } - - return TRUE; + return ($this->_redis->delete($key) === 1); } // ------------------------------------------------------------------------ @@ -220,7 +207,7 @@ class CI_Cache_redis extends CI_Driver */ public function increment($id, $offset = 1) { - return $this->_redis->incr($id, $offset); + return $this->_redis->hIncrBy($id, 'data', $offset); } // ------------------------------------------------------------------------ @@ -234,7 +221,7 @@ class CI_Cache_redis extends CI_Driver */ public function decrement($id, $offset = 1) { - return $this->_redis->decr($id, $offset); + return $this->_redis->hIncrBy($id, 'data', -$offset); } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From 25da4ec2e02d7ec258f11916d1b9b40c10b97ace Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 12:40:07 +0500 Subject: Fixed the index existence error --- system/libraries/Cache/drivers/Cache_redis.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index c50da1303..a302609a2 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -145,12 +145,12 @@ class CI_Cache_redis extends CI_Driver { $value = $this->_redis->hMGet($key, array('serialized', 'data')); - if ( ! is_array($value)) + if ( ! is_array($value) OR ! isset($value['serialized'], $value['data'])) { return FALSE; } - if ( ! empty($value['serialized'])) + if ($value['serialized']) { return unserialize($value['data']); } -- cgit v1.2.3-24-g4f1b From 12c3d1474e43cdd6e76245e89f11440793a5d8f0 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 12:51:46 +0500 Subject: Setup the data defining for stored data --- system/libraries/Cache/drivers/Cache_redis.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index a302609a2..c334afb0d 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -143,19 +143,20 @@ class CI_Cache_redis extends CI_Driver */ public function get($key) { - $value = $this->_redis->hMGet($key, array('serialized', 'data')); + $value = $this->_redis->hMGet($key, array('type', 'data')); - if ( ! is_array($value) OR ! isset($value['serialized'], $value['data'])) + if ( ! is_array($value) OR ! isset($value['type'], $value['data'])) { return FALSE; } - if ($value['serialized']) + if ($value['type'] === 'array' OR $value['type'] === 'object') { return unserialize($value['data']); } else { + settype($value['data'], $value['type']); return $value['data']; } } @@ -175,11 +176,11 @@ class CI_Cache_redis extends CI_Driver { if (is_array($data) OR is_object($data)) { - return $this->_redis->hMSet($id, array('serialized' => TRUE, 'data' => serialize($data))); + return $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => serialize($data))); } else { - return $this->_redis->hMSet($id, array('serialized' => FALSE, 'data' => $data)); + return $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => $data)); } } -- cgit v1.2.3-24-g4f1b From 7243d0b9019eec108255fae5b7eaf08a14a8092e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 11:40:34 +0200 Subject: Fix #4516 --- system/libraries/Form_validation.php | 5 ++++- tests/codeigniter/libraries/Form_validation_test.php | 10 ++++++++++ user_guide_src/source/changelog.rst | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 296ddb92a..09d6c9a97 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -583,7 +583,10 @@ class CI_Form_validation { protected function _execute($row, $rules, $postdata = NULL, $cycles = 0) { // If the $_POST data is an array we will run a recursive call - if (is_array($postdata)) + // + // Note: We MUST check if the array is empty or not! + // Otherwise empty arrays will always pass validation. + if (is_array($postdata) && ! empty($postdata)) { foreach ($postdata as $key => $val) { diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index f455b9146..3537eb355 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -28,6 +28,16 @@ class Form_validation_test extends CI_TestCase { $this->form_validation = new CI_Form_validation(); } + public function test_empty_array_input() + { + $this->assertFalse( + $this->run_rules( + array(array('field' => 'foo', 'label' => 'Foo Label', 'rules' => 'required')), + array('foo' => array()) + ) + ); + } + public function test_rule_required() { $rules = array(array('field' => 'foo', 'label' => 'foo_label', 'rules' => 'required')); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1492b3011..227841250 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.0.6 Release Date: Not Released +Bug fixes for 3.0.6 +------------------- + +- Fixed a bug (#4516) - :doc:`Form Validation Library ` always accepted empty array inputs. Version 3.0.5 ============= -- cgit v1.2.3-24-g4f1b From 522c3f32c0fe3113ce6ffc7d79c0e698dfc0bcc1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 12:13:43 +0200 Subject: Merge pull request #4522 from masterklavi/memcached_destruct Added destructor to Cache_memcached --- system/libraries/Cache/drivers/Cache_memcached.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 7e67fc40f..8bb4a5696 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -287,4 +287,25 @@ class CI_Cache_memcached extends CI_Driver { { return (extension_loaded('memcached') OR extension_loaded('memcache')); } + + // ------------------------------------------------------------------------ + + /** + * Class destructor + * + * Closes the connection to Memcache(d) if present. + * + * @return void + */ + public function __destruct() + { + if ($this->_memcached instanceof Memcache) + { + $this->_memcached->close(); + } + elseif ($this->_memcached instanceof Memcached) + { + $this->_memcached->quit(); + } + } } -- cgit v1.2.3-24-g4f1b From fab0d4fe1315ef8114e9755e4a3a94abf47825f8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 12:16:49 +0200 Subject: [ci skip] Add changelog entry for PR #4522 --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 227841250..de488a995 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.0.6 Release Date: Not Released +- General Changes + + - Added a destructor to :doc:`Cache Library ` 'memcached' driver to ensure that Memcache(d) connections are properly closed. + Bug fixes for 3.0.6 ------------------- -- cgit v1.2.3-24-g4f1b From 364ba6fb407f281a4ba9e5ace070025f507faf69 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 12:18:36 +0200 Subject: Merge pull request #4523 from masterklavi/memcached_docblock [ci skip] Added missing variable names to Cache_memcached docblocks --- system/libraries/Cache/drivers/Cache_memcached.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 8bb4a5696..56ab5b85b 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -187,7 +187,7 @@ class CI_Cache_memcached extends CI_Driver { /** * Delete from Cache * - * @param mixed key to be deleted. + * @param mixed $id key to be deleted. * @return bool true on success, false on failure */ public function delete($id) @@ -252,7 +252,7 @@ class CI_Cache_memcached extends CI_Driver { /** * Get Cache Metadata * - * @param mixed key to get cache metadata on + * @param mixed $id key to get cache metadata on * @return mixed FALSE on failure, array on success. */ public function get_metadata($id) -- cgit v1.2.3-24-g4f1b From 5ea30f85f964b6b207a27c2700c65df89736d0e9 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 15:21:29 +0500 Subject: Fixed an indent of description --- system/libraries/Cache/drivers/Cache_redis.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index a9a9e09cb..9d48da8f9 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -256,8 +256,8 @@ class CI_Cache_redis extends CI_Driver * Get cache driver info * * @param string $type Not supported in Redis. - * Only included in order to offer a - * consistent cache API. + * Only included in order to offer a + * consistent cache API. * @return array * @see Redis::info() */ -- cgit v1.2.3-24-g4f1b From a604554c592c090334b3a57d41e498d6f03fd1e4 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 15:27:58 +0500 Subject: Removed an unnecessary is_array() check. --- system/libraries/Cache/drivers/Cache_memcached.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 02b2d438e..2d6236a6f 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -83,7 +83,7 @@ class CI_Cache_memcached extends CI_Driver { $CI =& get_instance(); $defaults = $this->_config['default']; - if ($CI->config->load('memcached', TRUE, TRUE) && is_array($CI->config->config['memcached'])) + if ($CI->config->load('memcached', TRUE, TRUE)) { $this->_config = $CI->config->config['memcached']; } -- cgit v1.2.3-24-g4f1b From 51f00ca8f3ba297ac0eec04071bd6aa85968d2ca Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 12:27:14 +0200 Subject: Merge pull request #4521 from masterklavi/redis_docblock [ci skip] Added missing variable names to Cache_redis docblocks --- system/libraries/Cache/drivers/Cache_redis.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index e9194a499..a58aaef4e 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -144,7 +144,7 @@ class CI_Cache_redis extends CI_Driver /** * Get cache * - * @param string Cache ID + * @param string $key Cache ID * @return mixed */ public function get($key) @@ -196,7 +196,7 @@ class CI_Cache_redis extends CI_Driver /** * Delete from cache * - * @param string Cache key + * @param string $key Cache key * @return bool */ public function delete($key) @@ -261,9 +261,9 @@ class CI_Cache_redis extends CI_Driver /** * Get cache driver info * - * @param string Not supported in Redis. - * Only included in order to offer a - * consistent cache API. + * @param string $type Not supported in Redis. + * Only included in order to offer a + * consistent cache API. * @return array * @see Redis::info() */ @@ -277,7 +277,7 @@ class CI_Cache_redis extends CI_Driver /** * Get cache metadata * - * @param string Cache key + * @param string $key Cache key * @return array */ public function get_metadata($key) -- cgit v1.2.3-24-g4f1b From c13b4a6bfe45fc3eeb71aeb27ae0d69ef09580a5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 12:30:21 +0200 Subject: Merge pull request #4525 from masterklavi/memcached_instanceof Use instanceof instead of get_class() in Cache_memcached --- system/libraries/Cache/drivers/Cache_memcached.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 56ab5b85b..df02ca2d0 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -116,7 +116,7 @@ class CI_Cache_memcached extends CI_Driver { isset($cache_server['port']) OR $cache_server['port'] = $defaults['port']; isset($cache_server['weight']) OR $cache_server['weight'] = $defaults['weight']; - if (get_class($this->_memcached) === 'Memcache') + if ($this->_memcached instanceof Memcache) { // Third parameter is persistance and defaults to TRUE. $this->_memcached->addServer( @@ -126,7 +126,7 @@ class CI_Cache_memcached extends CI_Driver { $cache_server['weight'] ); } - else + elseif ($this->_memcached instanceof Memcached) { $this->_memcached->addServer( $cache_server['hostname'], @@ -170,11 +170,11 @@ class CI_Cache_memcached extends CI_Driver { $data = array($data, time(), $ttl); } - if (get_class($this->_memcached) === 'Memcached') + if ($this->_memcached instanceof Memcached) { return $this->_memcached->set($id, $data, $ttl); } - elseif (get_class($this->_memcached) === 'Memcache') + elseif ($this->_memcached instanceof Memcache) { return $this->_memcached->set($id, $data, 0, $ttl); } -- cgit v1.2.3-24-g4f1b From 9c948aa715a539aa4dcdd1647156436700411dd1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 12:33:07 +0200 Subject: Merge pull request #4524 from masterklavi/memcached_refactoring Cache_memcached configuration refactoring --- system/libraries/Cache/drivers/Cache_memcached.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index df02ca2d0..6dee1e8e4 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -60,7 +60,7 @@ class CI_Cache_memcached extends CI_Driver { * * @var array */ - protected $_memcache_conf = array( + protected $_config = array( 'default' => array( 'host' => '127.0.0.1', 'port' => 11211, @@ -81,19 +81,11 @@ class CI_Cache_memcached extends CI_Driver { { // Try to load memcached server info from the config file. $CI =& get_instance(); - $defaults = $this->_memcache_conf['default']; + $defaults = $this->_config['default']; if ($CI->config->load('memcached', TRUE, TRUE)) { - if (is_array($CI->config->config['memcached'])) - { - $this->_memcache_conf = array(); - - foreach ($CI->config->config['memcached'] as $name => $conf) - { - $this->_memcache_conf[$name] = $conf; - } - } + $this->_config = $CI->config->config['memcached']; } if (class_exists('Memcached', FALSE)) @@ -110,7 +102,7 @@ class CI_Cache_memcached extends CI_Driver { return; } - foreach ($this->_memcache_conf as $cache_server) + foreach ($this->_config as $cache_server) { isset($cache_server['hostname']) OR $cache_server['hostname'] = $defaults['host']; isset($cache_server['port']) OR $cache_server['port'] = $defaults['port']; -- cgit v1.2.3-24-g4f1b From b13604287adcd1b70a624c83be67b8e2f35835c5 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 11:59:54 +0500 Subject: The "$config" variable is moved to "if" condition --- system/libraries/Cache/drivers/Cache_redis.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index a58aaef4e..27107b332 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -102,10 +102,13 @@ class CI_Cache_redis extends CI_Driver if ($CI->config->load('redis', TRUE, TRUE)) { - $config = $CI->config->item('redis'); + $config = array_merge(self::$_default_config, $CI->config->item('redis')); + } + else + { + $config = self::$_default_config; } - $config = array_merge(self::$_default_config, $config); $this->_redis = new Redis(); try -- cgit v1.2.3-24-g4f1b From 12798c426d6232eb4ad2930af4d58d18692d077f Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 15:55:51 +0500 Subject: Removed an unnecessary array() initialization --- system/libraries/Cache/drivers/Cache_redis.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 27107b332..d4d95ebb1 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -97,7 +97,6 @@ class CI_Cache_redis extends CI_Driver return; } - $config = array(); $CI =& get_instance(); if ($CI->config->load('redis', TRUE, TRUE)) -- cgit v1.2.3-24-g4f1b From a0556f128417467faaa7048bb1bf8da154e79582 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 13:05:38 +0200 Subject: Merge pull request #4526 from masterklavi/redis_refactor Remove an unnecessary assignment from Cache_redis configuration --- system/libraries/Cache/drivers/Cache_redis.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index a58aaef4e..d4d95ebb1 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -97,15 +97,17 @@ class CI_Cache_redis extends CI_Driver return; } - $config = array(); $CI =& get_instance(); if ($CI->config->load('redis', TRUE, TRUE)) { - $config = $CI->config->item('redis'); + $config = array_merge(self::$_default_config, $CI->config->item('redis')); + } + else + { + $config = self::$_default_config; } - $config = array_merge(self::$_default_config, $config); $this->_redis = new Redis(); try -- cgit v1.2.3-24-g4f1b From 0c70b8ab83998c3771bbda3a9717da574f421357 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 16:15:30 +0500 Subject: Fixed a condition in the get method --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index c334afb0d..a50eb22ac 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -145,7 +145,7 @@ class CI_Cache_redis extends CI_Driver { $value = $this->_redis->hMGet($key, array('type', 'data')); - if ( ! is_array($value) OR ! isset($value['type'], $value['data'])) + if ($value === FALSE OR $value['type'] === FALSE) { return FALSE; } -- cgit v1.2.3-24-g4f1b From f26a876acf4cca26329dfbe3d0eee1aa0c05ace0 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 16:25:56 +0500 Subject: Removed an extra space char --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index a50eb22ac..e29551089 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -145,7 +145,7 @@ class CI_Cache_redis extends CI_Driver { $value = $this->_redis->hMGet($key, array('type', 'data')); - if ($value === FALSE OR $value['type'] === FALSE) + if ($value === FALSE OR $value['type'] === FALSE) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 0abb9777fd45cf87dc3e0e4780ae2292b2822407 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 16:32:13 +0500 Subject: Changed a condition in the get method to empty() --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index e29551089..88f1815a7 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -145,7 +145,7 @@ class CI_Cache_redis extends CI_Driver { $value = $this->_redis->hMGet($key, array('type', 'data')); - if ($value === FALSE OR $value['type'] === FALSE) + if (empty($value['type'])) { return FALSE; } -- cgit v1.2.3-24-g4f1b From fb722b6eacc574975de223a05e619f9c90aa8d99 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 17:32:12 +0500 Subject: Added the expiration to save() method --- system/libraries/Cache/drivers/Cache_redis.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 6da86728c..fa318403e 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -184,12 +184,19 @@ class CI_Cache_redis extends CI_Driver { if (is_array($data) OR is_object($data)) { - return $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => serialize($data))); + $success = $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => serialize($data))); } else { - return $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => $data)); + $success = $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => $data)); } + + if ($success && $ttl) + { + $this->_redis->expireAt($id, time() + $ttl); + } + + return $success; } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From 44ce8f4545c8a0c0de97e93ceb9b2b9f751bc474 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 14:52:22 +0200 Subject: Add changelog entries for and polish changes from PRs #4528, #4530 --- system/libraries/Cache/drivers/Cache_redis.php | 52 ++++++++++++++++++-------- user_guide_src/source/changelog.rst | 6 +++ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index fa318403e..49385dffa 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -151,21 +151,29 @@ class CI_Cache_redis extends CI_Driver */ public function get($key) { - $value = $this->_redis->hMGet($key, array('type', 'data')); + $data = $this->_redis->hMGet($key, array('__ci_type', '__ci_value')); - if (empty($value['type'])) + if ( ! isset($data['__ci_type'], $data['__ci_value']) OR $data['__ci_value'] === FALSE) { return FALSE; } - if ($value['type'] === 'array' OR $value['type'] === 'object') + switch ($data['__ci_type']) { - return unserialize($value['data']); - } - else - { - settype($value['data'], $value['type']); - return $value['data']; + case 'array': + case 'object': + return unserialize($data['__ci_value']); + case 'boolean': + case 'integer': + case 'double': // Yes, 'double' is returned and NOT 'float' + case 'string': + case 'NULL': + return settype($data['__ci_value'], $data['__ci_type']) + ? $data['__ci_value'] + : FALSE; + case 'resource': + default: + return FALSE; } } @@ -182,21 +190,33 @@ class CI_Cache_redis extends CI_Driver */ public function save($id, $data, $ttl = 60, $raw = FALSE) { - if (is_array($data) OR is_object($data)) + switch ($data_type = gettype($data)) { - $success = $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => serialize($data))); + case 'array': + case 'object': + $data = serialize($data); + break; + case 'boolean': + case 'integer': + case 'double': // Yes, 'double' is returned and NOT 'float' + case 'string': + case 'NULL': + break; + case 'resource': + default: + return FALSE; } - else + + if ( ! $this->_redis->hMSet($id, array('__ci_type' => $data_type, '__ci_value' => $data))) { - $success = $this->_redis->hMSet($id, array('type' => gettype($data), 'data' => $data)); + return FALSE; } - - if ($success && $ttl) + elseif ($ttl) { $this->_redis->expireAt($id, time() + $ttl); } - return $success; + return TRUE; } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2a9ccd57a..3bb7e48f5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Release Date: Not Released - Libraries - Added UNIX socket connection support to :doc:`Session Library ` 'redis' driver. + - Changed data serialization logic in :doc:`Cache Library ` 'redis' driver for better performance. - Database @@ -26,6 +27,11 @@ Release Date: Not Released - Updated :doc:`HTML Helper ` function :php:func:`meta()` with support for "charset" and "property" properties. - Changed :doc:`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 ` stored all scalar values as strings with the 'redis' driver. + Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 16436e3c037ba4688954cffab2316d44115b2eff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 15:00:43 +0200 Subject: [ci skip] Removed leftovers from the old serialization logic in Cache_redis --- system/libraries/Cache/drivers/Cache_redis.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 49385dffa..7d1b4f39a 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -69,13 +69,6 @@ class CI_Cache_redis extends CI_Driver */ protected $_redis; - /** - * An internal cache for storing keys of serialized values. - * - * @var array - */ - protected $_serialized = array(); - // ------------------------------------------------------------------------ /** @@ -135,10 +128,6 @@ class CI_Cache_redis extends CI_Driver { log_message('error', 'Cache: Redis connection refused ('.$e->getMessage().')'); } - - // Initialize the index of serialized values. - $serialized = $this->_redis->sMembers('_ci_redis_serialized'); - empty($serialized) OR $this->_serialized = array_flip($serialized); } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From 55a40b769b5e3350d07b63264b332fce5e1341d2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 15:43:22 +0200 Subject: A small memory optimization to CI_Form_validation --- system/libraries/Form_validation.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 09d6c9a97..9fb686892 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -450,7 +450,7 @@ class CI_Form_validation { $this->CI->lang->load('form_validation'); // Cycle through the rules for each field and match the corresponding $validation_data item - foreach ($this->_field_data as $field => $row) + foreach ($this->_field_data as $field => &$row) { // Fetch the data from the validation_data array item and cache it in the _field_data array. // Depending on whether the field name is an array or a string will determine where we get it from. @@ -467,7 +467,7 @@ class CI_Form_validation { // Execute validation rules // Note: A second foreach (for now) is required in order to avoid false-positives // for rules like 'matches', which correlate to other validation fields. - foreach ($this->_field_data as $field => $row) + foreach ($this->_field_data as $field => &$row) { // Don't try to validate if we have no rules set if (empty($row['rules'])) @@ -475,7 +475,7 @@ class CI_Form_validation { continue; } - $this->_execute($row, $row['rules'], $this->_field_data[$field]['postdata']); + $this->_execute($row, $row['rules'], $row['postdata']); } // Did we end up with any errors? -- cgit v1.2.3-24-g4f1b From 9cc1618502a147d973e5917d6b305642437e7e8c Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sat, 12 Mar 2016 19:05:47 +0500 Subject: Removed the second condition for unix sockets --- system/libraries/Cache/drivers/Cache_redis.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 7d1b4f39a..29f43ba6f 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -55,7 +55,6 @@ class CI_Cache_redis extends CI_Driver * @var array */ protected static $_default_config = array( - 'socket_type' => 'tcp', 'host' => '127.0.0.1', 'password' => NULL, 'port' => 6379, @@ -105,16 +104,7 @@ class CI_Cache_redis extends CI_Driver try { - if ($config['socket_type'] === 'unix') - { - $success = $this->_redis->connect($config['socket']); - } - else // tcp socket - { - $success = $this->_redis->connect($config['host'], $config['port'], $config['timeout']); - } - - if ( ! $success) + if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout'])) { log_message('error', 'Cache: Redis connection failed. Check your configuration.'); } -- cgit v1.2.3-24-g4f1b From 7e5ed70625180c416a1b7d784c3fae7fe9ff6cea Mon Sep 17 00:00:00 2001 From: Goran Grbic Date: Sat, 12 Mar 2016 15:26:50 +0100 Subject: Removing character Removing forward slash since `APPPATH` ends with `DIRECTORY_SEPARATOR`. --- user_guide_src/source/tutorial/static_pages.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 569287c98..5daaa958f 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -97,7 +97,7 @@ page actually exists: public function view($page = 'home') { - if ( ! file_exists(APPPATH.'/views/pages/'.$page.'.php')) + if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php')) { // Whoops, we don't have a page for that! show_404(); -- cgit v1.2.3-24-g4f1b From b5a5d76d0733780c846963592ff813f867beaf97 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 16:34:30 +0200 Subject: Merge pull request #4532 from Tpojka/develop [ci skip] Remove an unnecessary slash from a documentation example --- user_guide_src/source/tutorial/static_pages.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 569287c98..5daaa958f 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -97,7 +97,7 @@ page actually exists: public function view($page = 'home') { - if ( ! file_exists(APPPATH.'/views/pages/'.$page.'.php')) + if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php')) { // Whoops, we don't have a page for that! show_404(); -- cgit v1.2.3-24-g4f1b From 4f555079a6d85abd11403c72b9dbaa8823dc2e6d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 17:21:55 +0200 Subject: [ci skip] Deprecate prep_for_form() in Form_validation --- system/libraries/Form_validation.php | 7 ++++--- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/installation/upgrade_306.rst | 19 +++++++++++++++++++ user_guide_src/source/libraries/form_validation.rst | 8 ++++---- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 9fb686892..6be593add 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1515,10 +1515,11 @@ class CI_Form_validation { * This function allows HTML to be safely shown in a form. * Special characters are converted. * - * @param string - * @return string + * @deprecated 3.0.6 Not used anywhere within the framework and pretty much useless + * @param mixed $data Input data + * @return mixed */ - public function prep_for_form($data = '') + public function prep_for_form($data) { if ($this->_safe_form_data === FALSE OR empty($data)) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index de488a995..e88b68f85 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - General Changes - Added a destructor to :doc:`Cache Library ` 'memcached' driver to ensure that Memcache(d) connections are properly closed. + - Deprecated :doc:`Form Validation Library ` method ``prep_for_form()``. Bug fixes for 3.0.6 ------------------- diff --git a/user_guide_src/source/installation/upgrade_306.rst b/user_guide_src/source/installation/upgrade_306.rst index e9c4bdd79..f6d2f13d4 100644 --- a/user_guide_src/source/installation/upgrade_306.rst +++ b/user_guide_src/source/installation/upgrade_306.rst @@ -12,3 +12,22 @@ 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: Remove 'prep_for_form' usage (deprecation) +================================================== + +The :doc:`Form Validation Library <../libraries/form_validation>` has a +``prep_for_form()`` method, which is/can also be used as a rule in +``set_rules()`` to automatically perform HTML encoding on input data. + +Automatically encoding input (instead of output) data is a bad practice in +the first place, and CodeIgniter and PHP itself offer other alternatives +to this method anyway. +For example, :doc:`Form Helper <../helpers/form_helper>` functions will +automatically perform HTML escaping when necessary. + +Therefore, the *prep_for_form* method/rule is pretty much useless and is now +deprecated and scheduled for removal in 3.1+. + +.. note:: The method is still available, but you're strongly encouraged to + remove its usage sooner rather than later. diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 9189d082e..44adfd715 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1007,14 +1007,14 @@ Prepping Reference The following is a list of all the prepping methods that are available to use: -==================== ========= ======================================================================================================= +==================== ========= ============================================================================================================== Name Parameter Description -==================== ========= ======================================================================================================= -**prep_for_form** No Converts special characters so that HTML data can be shown in a form field without breaking it. +==================== ========= ============================================================================================================== +**prep_for_form** No DEPRECATED: Converts special characters so that HTML data can be shown in a form field without breaking it. **prep_url** No Adds "\http://" to URLs if missing. **strip_image_tags** No Strips the HTML from image tags leaving the raw URL. **encode_php_tags** No Converts PHP tags to entities. -==================== ========= ======================================================================================================= +==================== ========= ============================================================================================================== .. note:: You can also use any native PHP functions that permits one parameter, like ``trim()``, ``htmlspecialchars()``, ``urldecode()``, -- cgit v1.2.3-24-g4f1b From 2961883c06ba963a67a68c34ef90a57ff5c38646 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 20:01:57 +0200 Subject: [ci skip] Update the index.php file - Use DIRECTORY_SEPARATOR instead of a hard-coded forward-slash - Use more proper terminology in comment descriptions - Small tweaks to directory detection logic --- index.php | 125 ++++++++++++--------- user_guide_src/source/installation/upgrade_306.rst | 17 ++- 2 files changed, 90 insertions(+), 52 deletions(-) diff --git a/index.php b/index.php index 5cc37108a..6986e1e5d 100755 --- a/index.php +++ b/index.php @@ -91,24 +91,25 @@ switch (ENVIRONMENT) /* *--------------------------------------------------------------- - * SYSTEM FOLDER NAME + * SYSTEM DIRCTORY NAME *--------------------------------------------------------------- * - * This variable must contain the name of your "system" folder. - * Include the path if the folder is not in the same directory - * as this file. + * This variable must contain the name of your "system" directory. + * Set the path if it is not in the same directory as this file. */ $system_path = 'system'; /* *--------------------------------------------------------------- - * APPLICATION FOLDER NAME + * APPLICATION DIRECTORY NAME *--------------------------------------------------------------- * * If you want this front controller to use a different "application" - * folder than the default one you can set its name here. The folder - * can also be renamed or relocated anywhere on your server. If - * you do, use a full server path. For more info please see the user guide: + * directory than the default one you can set its name here. The directory + * can also be renamed or relocated anywhere on your server. If you do, + * use an absolute (full) server path. + * For more info please see the user guide: + * * https://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! @@ -117,14 +118,14 @@ switch (ENVIRONMENT) /* *--------------------------------------------------------------- - * VIEW FOLDER NAME + * VIEW DIRECTORY NAME *--------------------------------------------------------------- * - * If you want to move the view folder out of the application - * folder set the path to the folder here. The folder can be renamed + * If you want to move the view directory out of the application + * directory, set the path to it here. The directory can be renamed * and relocated anywhere on your server. If blank, it will default - * to the standard location inside your application folder. If you - * do move this, use the full server path to this folder. + * to the standard location inside your application directory. + * If you do move this, use an absolute (full) server path. * * NO TRAILING SLASH! */ @@ -150,8 +151,8 @@ switch (ENVIRONMENT) * * Un-comment the $routing array below to use this feature */ - // The directory name, relative to the "controllers" folder. Leave blank - // if your controller is not in a sub-folder within the "controllers" folder + // The directory name, relative to the "controllers" directory. Leave blank + // if your controller is not in a sub-directory within the "controllers" one // $routing['directory'] = ''; // The controller class file name. Example: mycontroller @@ -197,12 +198,16 @@ switch (ENVIRONMENT) if (($_temp = realpath($system_path)) !== FALSE) { - $system_path = $_temp.'/'; + $system_path = $_temp.DIRECTORY_SEPARATOR; } else { // Ensure there's a trailing slash - $system_path = rtrim($system_path, '/').'/'; + $system_path = strtr( + rtrim($system_path, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ).DIRECTORY_SEPARATOR; } // Is the system path correct? @@ -221,66 +226,84 @@ switch (ENVIRONMENT) // The name of THIS file define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); - // Path to the system folder - define('BASEPATH', str_replace('\\', '/', $system_path)); + // Path to the system directory + define('BASEPATH', $system_path); - // Path to the front controller (this file) - define('FCPATH', dirname(__FILE__).'/'); + // Path to the front controller (this file) directory + define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR); - // Name of the "system folder" - define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); + // Name of the "system" directory + define('SYSDIR', basename(BASEPATH)); - // The path to the "application" folder + // The path to the "application" directory if (is_dir($application_folder)) { if (($_temp = realpath($application_folder)) !== FALSE) { - $application_folder = $_temp; + $application_folder = $_temp.DIRECTORY_SEPARATOR; + } + else + { + $application_folder = strtr( + rtrim($application_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } - - define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); + } + elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) + { + $application_folder = BASEPATH.strtr( + trim($application_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } else { - if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) - { - header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; - exit(3); // EXIT_CONFIG - } - - define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR); + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); + echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; + exit(3); // EXIT_CONFIG } - // The path to the "views" folder - if ( ! is_dir($view_folder)) + define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); + + // The path to the "views" directory + if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) { - if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) - { - $view_folder = APPPATH.$view_folder; - } - elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) + $view_folder = APPPATH.'views'; + } + elseif (is_dir($view_folder)) + { + if (($_temp = realpath($view_folder)) !== FALSE) { - header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; - exit(3); // EXIT_CONFIG + $view_folder = $_temp; } else { - $view_folder = APPPATH.'views'; + $view_folder = strtr( + rtrim($view_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } } - - if (($_temp = realpath($view_folder)) !== FALSE) + elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) { - $view_folder = $_temp.DIRECTORY_SEPARATOR; + $view_folder = APPPATH.strtr( + trim($view_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } else { - $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); + echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; + exit(3); // EXIT_CONFIG } - define('VIEWPATH', $view_folder); + define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR); /* * -------------------------------------------------------------------- diff --git a/user_guide_src/source/installation/upgrade_306.rst b/user_guide_src/source/installation/upgrade_306.rst index f6d2f13d4..3863e0afa 100644 --- a/user_guide_src/source/installation/upgrade_306.rst +++ b/user_guide_src/source/installation/upgrade_306.rst @@ -13,7 +13,22 @@ 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: Remove 'prep_for_form' usage (deprecation) +Step 2: Update your index.php file (optional) +============================================= + +We've made some tweaks to the index.php file, mostly related to proper +usage of directory separators (i.e. use the ``DIRECTORY_SEPARATOR`` +constant instead of a hard coded forward slash "/"). + +Nothing will break if you skip this step, but if you're running Windows +or just want to be up to date with every change - we do recommend that +you update your index.php file. + +*Tip: Just copy the ``ENVIRONMENT``, ``$system_path``, ``$application_folder`` +and ``$view_folder`` declarations from the old file and put them into the +new one, replacing the defaults.* + +Step 3: Remove 'prep_for_form' usage (deprecation) ================================================== The :doc:`Form Validation Library <../libraries/form_validation>` has a -- cgit v1.2.3-24-g4f1b From ca956162f5793527d7151bddd1fb223edbfed46b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 20:04:08 +0200 Subject: [ci skip] Revert an unnecessary change from last commit --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 6986e1e5d..7f9a777b5 100755 --- a/index.php +++ b/index.php @@ -240,7 +240,7 @@ switch (ENVIRONMENT) { if (($_temp = realpath($application_folder)) !== FALSE) { - $application_folder = $_temp.DIRECTORY_SEPARATOR; + $application_folder = $_temp; } else { -- cgit v1.2.3-24-g4f1b From a990a8d195a13dd38bdd1620391a4e1b40770952 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 13 Mar 2016 15:44:01 +0200 Subject: [ci skip] Fix a comment typo --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 7f9a777b5..d02b6bb38 100755 --- a/index.php +++ b/index.php @@ -91,7 +91,7 @@ switch (ENVIRONMENT) /* *--------------------------------------------------------------- - * SYSTEM DIRCTORY NAME + * SYSTEM DIRECTORY NAME *--------------------------------------------------------------- * * This variable must contain the name of your "system" directory. -- cgit v1.2.3-24-g4f1b From 6047ec16b2a99b3c19d452b07b81be9df8d2ad78 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Mon, 14 Mar 2016 13:08:22 +0500 Subject: Removed socket_type and socket parameters from the user guide --- user_guide_src/source/libraries/caching.rst | 2 -- 1 file changed, 2 deletions(-) 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 Date: Mon, 14 Mar 2016 13:18:39 +0500 Subject: UNIX socket check --- system/libraries/Cache/drivers/Cache_redis.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 29f43ba6f..b55d8bf25 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -104,6 +104,11 @@ class CI_Cache_redis extends CI_Driver try { + if ($config['host']{0} === '/') + { + $config['port'] = 0; // for unix domain socket + } + if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout'])) { log_message('error', 'Cache: Redis connection failed. Check your configuration.'); -- cgit v1.2.3-24-g4f1b From 7755322d9457b1ba73f27e46e1d1fcfa62b46830 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Mon, 14 Mar 2016 13:36:15 +0500 Subject: Fixed brackets --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index b55d8bf25..bae46bab4 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -104,7 +104,7 @@ class CI_Cache_redis extends CI_Driver try { - if ($config['host']{0} === '/') + if ($config['host'][0] === '/') { $config['port'] = 0; // for unix domain socket } -- cgit v1.2.3-24-g4f1b From d3029505bc703c439d17dc902ad208574ba788b4 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Mon, 14 Mar 2016 13:38:58 +0500 Subject: Added the timeout value for the UNIX socket check --- system/libraries/Cache/drivers/Cache_redis.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index bae46bab4..1c12a0a22 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -104,9 +104,11 @@ class CI_Cache_redis extends CI_Driver try { + // for unix domain socket if ($config['host'][0] === '/') { - $config['port'] = 0; // for unix domain socket + $config['port'] = 0; + $config['timeout'] = 0; } if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout'])) -- cgit v1.2.3-24-g4f1b From 49f440a12974ea0af37b3e306cd3a26aa557f469 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Mon, 14 Mar 2016 13:40:01 +0500 Subject: Removed a space char --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 1c12a0a22..475dd4420 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -104,7 +104,7 @@ class CI_Cache_redis extends CI_Driver try { - // for unix domain socket + // for unix domain socket if ($config['host'][0] === '/') { $config['port'] = 0; -- cgit v1.2.3-24-g4f1b From d327a4fc32b507a44e418cdd4b6e2c63690bc5cc Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Mon, 14 Mar 2016 14:05:12 +0500 Subject: Unix socket check in one long line --- system/libraries/Cache/drivers/Cache_redis.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 475dd4420..ec4432437 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -104,14 +104,7 @@ class CI_Cache_redis extends CI_Driver try { - // for unix domain socket - if ($config['host'][0] === '/') - { - $config['port'] = 0; - $config['timeout'] = 0; - } - - if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout'])) + if ( ! $this->_redis->connect($config['host'], ($config['host'][0] === '/' ? 0 : $config['port']), $config['timeout'])) { log_message('error', 'Cache: Redis connection failed. Check your configuration.'); } -- cgit v1.2.3-24-g4f1b From 2c10f60586faf59b9380608c5a9bf01ff2522483 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 15 Mar 2016 14:39:02 +0200 Subject: Add __isset() to CI_Session --- system/libraries/Session/Session.php | 18 ++++++++++++++++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 19 insertions(+) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 77c56ae70..c9d2e8adc 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -583,6 +583,24 @@ class CI_Session { // ------------------------------------------------------------------------ + /** + * __isset() + * + * @param string $key 'session_id' or a session data key + * @return bool + */ + public function __isset($key) + { + if ($key === 'session_id') + { + return (session_status() === PHP_SESSION_ACTIVE); + } + + return isset($_SESSION[$key]); + } + + // ------------------------------------------------------------------------ + /** * __set() * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e88b68f85..e235d2e6a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.0.6 ------------------- - Fixed a bug (#4516) - :doc:`Form Validation Library ` always accepted empty array inputs. +- Fixed a bug where :doc:`Session Library ` allowed accessing ``$_SESSION`` values as class properties but ``isset()`` didn't work on them. Version 3.0.5 ============= -- cgit v1.2.3-24-g4f1b From 5576d2ca40666ada969fb2cb951fbddf8ca4ad8e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 12:16:45 +0200 Subject: Simplify a bit of internal code in CI_Form_validation --- system/libraries/Form_validation.php | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 6be593add..ed4b9bccb 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -527,10 +527,7 @@ class CI_Form_validation { { if ($row['is_array'] === FALSE) { - if (isset($_POST[$row['field']])) - { - $_POST[$row['field']] = $row['postdata']; - } + isset($_POST[$field]) && $_POST[$field] = $row['postdata']; } else { @@ -550,20 +547,7 @@ class CI_Form_validation { } } - if (is_array($row['postdata'])) - { - $array = array(); - foreach ($row['postdata'] as $k => $v) - { - $array[$k] = $v; - } - - $post_ref = $array; - } - else - { - $post_ref = $row['postdata']; - } + $post_ref = $row['postdata']; } } } -- cgit v1.2.3-24-g4f1b From 02ac187ce4789c5ab122a41e3b064ca923d98a82 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 12:19:34 +0200 Subject: Fix a Form_validation bug that unnecessarily modifes $_POST --- system/libraries/Form_validation.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index ed4b9bccb..e4a518957 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -486,7 +486,7 @@ class CI_Form_validation { } // Now we need to re-set the POST data with the new, processed data - $this->_reset_post_array(); + empty($this->validation_data) && $this->_reset_post_array(); return ($total_errors === 0); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e235d2e6a..8203aba41 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.0.6 - Fixed a bug (#4516) - :doc:`Form Validation Library ` always accepted empty array inputs. - Fixed a bug where :doc:`Session Library ` allowed accessing ``$_SESSION`` values as class properties but ``isset()`` didn't work on them. +- Fixed a bug where :doc:`Form Validation Library ` modified the ``$_POST`` array when the data being validated was actually provided via ``set_data()``. Version 3.0.5 ============= -- cgit v1.2.3-24-g4f1b From 7df9453c0797b3e9f8af2b2a03413282890a677b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 12:39:52 +0200 Subject: [ci skip] Add (detection-based) UNIX sockets support to Cache_memcached --- system/libraries/Cache/drivers/Cache_memcached.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 6dee1e8e4..ca3997ad5 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -102,10 +102,22 @@ class CI_Cache_memcached extends CI_Driver { return; } - foreach ($this->_config as $cache_server) + foreach ($this->_config as $cache_name => $cache_server) { - isset($cache_server['hostname']) OR $cache_server['hostname'] = $defaults['host']; - isset($cache_server['port']) OR $cache_server['port'] = $defaults['port']; + if ( ! isset($cache_server['hostname'])) + { + log_message('debug', 'Cache: Memcache(d) configuration "'.$cache_name.'" doesn\'t include a hostname; ignoring.'); + continue; + } + elseif ($cache_server['hostname'][0] === '/') + { + $cache_server['port'] = 0; + } + elseif (empty($cache_server['port'])) + { + $cache_server['port'] = $defaults['port']; + } + isset($cache_server['weight']) OR $cache_server['weight'] = $defaults['weight']; if ($this->_memcached instanceof Memcache) -- cgit v1.2.3-24-g4f1b From 35e91f609d7d4d5944d13d1048c61e407b537c9e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 12:40:24 +0200 Subject: [ci skip] Add changelog entries for recent CI_Cache changes to redis, memcached --- user_guide_src/source/changelog.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3bb7e48f5..a9614cf84 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,7 +14,13 @@ Release Date: Not Released - Libraries - Added UNIX socket connection support to :doc:`Session Library ` 'redis' driver. - - Changed data serialization logic in :doc:`Cache Library ` 'redis' driver for better performance. + + - :doc:`Cache Library ` 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 -- cgit v1.2.3-24-g4f1b From fa91f30c144c041ad19925e55fe06c4065337896 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 14:33:15 +0200 Subject: [ci skip] Add upgrade instructions for CI_Cache changes --- user_guide_src/source/installation/upgrade_310.rst | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index a6e6bae7e..36f69d01b 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -62,7 +62,7 @@ Step 3: Check logic related to URI parsing of CLI requests ========================================================== When running a CodeIgniter application from the CLI, the -:doc:`URI Library ` will now ignore the +:doc:`URI Library <../libraries/uri>` will now ignore the ``$config['url_suffix']`` and ``$config['permitted_uri_chars']`` configuration settings. @@ -71,7 +71,34 @@ 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 usage of doctype() HTML helper +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 -- cgit v1.2.3-24-g4f1b From f8490b994c959de3e1eabba27d8d919433e3fc70 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 16:22:14 +0200 Subject: Fix #4539 --- system/libraries/Migration.php | 97 ++++++++++++++++++++++++------------- user_guide_src/source/changelog.rst | 2 + 2 files changed, 65 insertions(+), 34 deletions(-) diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 7aefb6c23..74bec3d60 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -96,9 +96,9 @@ class CI_Migration { /** * Migration basename regex * - * @var bool + * @var string */ - protected $_migration_regex = NULL; + protected $_migration_regex; /** * Error message @@ -217,31 +217,61 @@ class CI_Migration { if ($target_version > $current_version) { - // Moving Up $method = 'up'; } else { - // Moving Down, apply in reverse order $method = 'down'; + // We need this so that migrations are applied in reverse order krsort($migrations); } - if (empty($migrations)) - { - return TRUE; - } - - $previous = FALSE; - - // Validate all available migrations, and run the ones within our target range + // Validate all available migrations within our target range. + // + // Unfortunately, we'll have to use another loop to run them + // in order to avoid leaving the procedure in a broken state. + // + // See https://github.com/bcit-ci/CodeIgniter/issues/4539 + $pending = array(); foreach ($migrations as $number => $file) { + // Ignore versions out of our range. + // + // Because we've previously sorted the $migrations array depending on the direction, + // we can safely break the loop once we reach $target_version ... + if ($method === 'up') + { + if ($number <= $current_version) + { + continue; + } + elseif ($number > $target_version) + { + break; + } + } + else + { + if ($number > $current_version) + { + continue; + } + elseif ($number <= $target_version) + { + break; + } + } + // Check for sequence gaps - if ($this->_migration_type === 'sequential' && $previous !== FALSE && abs($number - $previous) > 1) + if ($this->_migration_type === 'sequential') { - $this->_error_string = sprintf($this->lang->line('migration_sequence_gap'), $number); - return FALSE; + if (isset($previous) && abs($number - $previous) > 1) + { + $this->_error_string = sprintf($this->lang->line('migration_sequence_gap'), $number); + return FALSE; + } + + $previous = $number; } include_once($file); @@ -253,27 +283,27 @@ class CI_Migration { $this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class); return FALSE; } + // method_exists() returns true for non-public methods, + // while is_callable() can't be used without instantiating. + // Only get_class_methods() satisfies both conditions. + elseif ( ! in_array($method, array_map('strtolower', get_class_methods($class)))) + { + $this->_error_string = sprintf($this->lang->line('migration_missing_'.$method.'_method'), $class); + return FALSE; + } - $previous = $number; + $pending[$number] = array($class, $method); + } - // Run migrations that are inside the target range - if ( - ($method === 'up' && $number > $current_version && $number <= $target_version) OR - ($method === 'down' && $number <= $current_version && $number > $target_version) - ) - { - $instance = new $class(); - if ( ! is_callable(array($instance, $method))) - { - $this->_error_string = sprintf($this->lang->line('migration_missing_'.$method.'_method'), $class); - return FALSE; - } + // Now just run the necessary migrations + foreach ($pending as $number => $migration) + { + log_message('debug', 'Migrating '.$method.' from version '.$current_version.' to version '.$number); - log_message('debug', 'Migrating '.$method.' from version '.$current_version.' to version '.$number); - call_user_func(array($instance, $method)); - $current_version = $number; - $this->_update_version($current_version); - } + $migration[0] = new $migration[0]; + call_user_func($migration); + $current_version = $number; + $this->_update_version($current_version); } // This is necessary when moving down, since the the last migration applied @@ -285,7 +315,6 @@ class CI_Migration { } log_message('debug', 'Finished migrating to '.$current_version); - return $current_version; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8203aba41..b6d64fb8f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,8 @@ Bug fixes for 3.0.6 - Fixed a bug (#4516) - :doc:`Form Validation Library ` always accepted empty array inputs. - Fixed a bug where :doc:`Session Library ` allowed accessing ``$_SESSION`` values as class properties but ``isset()`` didn't work on them. - Fixed a bug where :doc:`Form Validation Library ` modified the ``$_POST`` array when the data being validated was actually provided via ``set_data()``. +- Fixed a bug (#4539) - :doc:`Migration Library ` applied migrations before validating that all migrations within the requested version range are valid. +- Fixed a bug (#4539) - :doc:`Migration Library ` triggered failures for migrations that are out of the requested version range. Version 3.0.5 ============= -- cgit v1.2.3-24-g4f1b From 3df07729b8018acd764a7a8a08f34f1579c43e5e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Mar 2016 21:15:52 +0200 Subject: A small Migrations tweak --- system/libraries/Migration.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 74bec3d60..316c94ae3 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -219,12 +219,17 @@ class CI_Migration { { $method = 'up'; } - else + elseif ($target_version < $current_version) { $method = 'down'; // We need this so that migrations are applied in reverse order krsort($migrations); } + else + { + // Well, there's nothing to migrate then ... + return TRUE; + } // Validate all available migrations within our target range. // -- cgit v1.2.3-24-g4f1b From 51ee810a6463d05730da61893a76b122e0acc993 Mon Sep 17 00:00:00 2001 From: FĂĽlöp Márk Date: Thu, 17 Mar 2016 13:58:40 +0100 Subject: adding code format on line 29 --- user_guide_src/source/libraries/zip.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/zip.rst b/user_guide_src/source/libraries/zip.rst index 816f49ca1..9704d5b1d 100644 --- a/user_guide_src/source/libraries/zip.rst +++ b/user_guide_src/source/libraries/zip.rst @@ -24,7 +24,7 @@ your controller using the $this->load->library function:: $this->load->library('zip'); -Once loaded, the Zip library object will be available using: +Once loaded, the Zip library object will be available using:: $this->zip -- cgit v1.2.3-24-g4f1b From 83dfab90b351ad575fb8b8b7c6ff4b2c287d1e9b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 Mar 2016 18:09:50 +0200 Subject: Merge pull request #4544 from fulopm/develop [ci skip] Fix codeblock formatting in Zip library docs --- user_guide_src/source/libraries/zip.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/zip.rst b/user_guide_src/source/libraries/zip.rst index 816f49ca1..9704d5b1d 100644 --- a/user_guide_src/source/libraries/zip.rst +++ b/user_guide_src/source/libraries/zip.rst @@ -24,7 +24,7 @@ your controller using the $this->load->library function:: $this->load->library('zip'); -Once loaded, the Zip library object will be available using: +Once loaded, the Zip library object will be available using:: $this->zip -- cgit v1.2.3-24-g4f1b From 9de0f0b3a65bea6adff9999977ea6b717099e194 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Mar 2016 18:22:33 +0200 Subject: [ci skip] Prepare for 3.0.6 release --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index f0d7c8f53..3eb3e0573 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.6-dev'); + define('CI_VERSION', '3.0.6'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b6d64fb8f..86f51ca58 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.0.6 ============= -Release Date: Not Released +Release Date: March 21, 2016 - General Changes diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index e4d14d100..4fa2f01ba 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.0.6-dev' +version = '3.0.6' # The full version, including alpha/beta/rc tags. -release = '3.0.6-dev' +release = '3.0.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index be33a1dc9..979e4c20f 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.0.6-dev (Current version) `_ +- `CodeIgniter v3.0.6 (Current version) `_ - `CodeIgniter v3.0.5 `_ - `CodeIgniter v3.0.4 `_ - `CodeIgniter v3.0.3 `_ -- cgit v1.2.3-24-g4f1b From eb373a1abb348515001123ecbaca5e5384e69d19 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Mar 2016 18:30:06 +0200 Subject: [ci skip] Mark the start of 3.0.7 development --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 ++++++ user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_307.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_307.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 3eb3e0573..f0d7c8f53 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.6'); + define('CI_VERSION', '3.0.6-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 86f51ca58..341415f14 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,12 @@ Change Log ########## +Version 3.0.7 +============= + +Release Date: Not Released + + Version 3.0.6 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 4fa2f01ba..26f854d85 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.0.6' +version = '3.0.7-dev' # The full version, including alpha/beta/rc tags. -release = '3.0.6' +release = '3.0.7-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 979e4c20f..22c63b873 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.0.6 (Current version) `_ +- `CodeIgniter v3.0.7-dev (Current version) `_ +- `CodeIgniter v3.0.6 `_ - `CodeIgniter v3.0.5 `_ - `CodeIgniter v3.0.4 `_ - `CodeIgniter v3.0.3 `_ diff --git a/user_guide_src/source/installation/upgrade_307.rst b/user_guide_src/source/installation/upgrade_307.rst new file mode 100644 index 000000000..ee957aabf --- /dev/null +++ b/user_guide_src/source/installation/upgrade_307.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.0.6 to 3.0.7 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 040c72832..5beca6586 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.0.6 to 3.0.7 Upgrading from 3.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 -- cgit v1.2.3-24-g4f1b From 951a4d5c76a5b6403b40bcaff326cf8dbedcbca6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Mar 2016 11:08:54 +0200 Subject: [ci skip] Fix CI_VERSION --- system/core/CodeIgniter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index f0d7c8f53..aef0d3a5d 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.0.6-dev'); + define('CI_VERSION', '3.0.7-dev'); /* * ------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From eac4adfc24d1ad60af2bc3e08222ee7e5858f638 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Mar 2016 11:24:14 +0200 Subject: [ci skip] Validate width, height config values --- system/libraries/Image_lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index f594b7125..edd13372d 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -456,7 +456,7 @@ class CI_Image_lib { { if (property_exists($this, $key)) { - if (in_array($key, array('wm_font_color', 'wm_shadow_color'))) + if (in_array($key, array('wm_font_color', 'wm_shadow_color'), TRUE)) { if (preg_match('/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i', $val, $matches)) { @@ -478,6 +478,10 @@ class CI_Image_lib { continue; } } + elseif (in_array($key, array('width', 'height'), TRUE) && ! ctype_digit((string) $val)) + { + continue; + } $this->$key = $val; } -- cgit v1.2.3-24-g4f1b From b3f6934cb870f2da9c9891968e6f4d98effa741e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Mar 2016 11:31:58 +0200 Subject: [ci skip] Escape image paths passed as shell arguments to imagemagick --- system/libraries/Image_lib.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index edd13372d..24fe8c68d 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -866,27 +866,28 @@ class CI_Image_lib { if ($action === 'crop') { - $cmd .= ' -crop '.$this->width.'x'.$this->height.'+'.$this->x_axis.'+'.$this->y_axis.' "'.$this->full_src_path.'" "'.$this->full_dst_path .'" 2>&1'; + $cmd .= ' -crop '.$this->width.'x'.$this->height.'+'.$this->x_axis.'+'.$this->y_axis; } elseif ($action === 'rotate') { - $angle = ($this->rotation_angle === 'hor' OR $this->rotation_angle === 'vrt') - ? '-flop' : '-rotate '.$this->rotation_angle; - - $cmd .= ' '.$angle.' "'.$this->full_src_path.'" "'.$this->full_dst_path.'" 2>&1'; + $cmd .= ($this->rotation_angle === 'hor' OR $this->rotation_angle === 'vrt') + ? ' -flop' + : ' -rotate '.$this->rotation_angle; } else // Resize { if($this->maintain_ratio === TRUE) { - $cmd .= ' -resize '.$this->width.'x'.$this->height.' "'.$this->full_src_path.'" "'.$this->full_dst_path.'" 2>&1'; + $cmd .= ' -resize '.$this->width.'x'.$this->height; } else { - $cmd .= ' -resize '.$this->width.'x'.$this->height.'\! "'.$this->full_src_path.'" "'.$this->full_dst_path.'" 2>&1'; + $cmd .= ' -resize '.$this->width.'x'.$this->height.'\!'; } } + $cmd .= ' "'.escapeshellarg($this->full_src_path).'" "'.escapeshellarg($this->full_dst_path).'" 2>&1'; + $retval = 1; // exec() might be disabled if (function_usable('exec')) -- cgit v1.2.3-24-g4f1b From 86758e1003e6ce44b205d2eb104318a309fd92ab Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Mar 2016 11:39:41 +0200 Subject: [ci skip] Add changelog entries for last two commits --- user_guide_src/source/changelog.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 341415f14..88b797b91 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,14 @@ Version 3.0.7 Release Date: Not Released +- General Changes + + - Updated :doc:`Image Manipulation Library ` to validate *width* and *height* configuration values. + +Bug fixes for 3.0.7 +------------------- + +- Fixed a bug where :doc:`Image Manipulation Library ` didn't escape image source paths passed to ImageMagick as shell arguments. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 4d2628e8aab6d0673ac0a010acbfaa9d76b7d568 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Mar 2016 13:42:03 +0200 Subject: random_bytes()-related improvements See #4260 --- system/core/compat/password.php | 26 ++++++++++++++++++++++---- system/libraries/Encryption.php | 26 ++++++++++++++++++++------ user_guide_src/source/changelog.rst | 7 +++++++ 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/system/core/compat/password.php b/system/core/compat/password.php index f0c22c780..76dd2cf0a 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -116,13 +116,21 @@ if ( ! function_exists('password_hash')) } elseif ( ! isset($options['salt'])) { - if (defined('MCRYPT_DEV_URANDOM')) + if (function_exists('random_bytes')) { - $options['salt'] = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM); + try + { + $options['salt'] = random_bytes(16); + } + catch (Exception $e) + { + log_message('error', 'compat/password: Error while trying to use random_bytes(): '.$e->getMessage()); + return FALSE; + } } - elseif (function_exists('openssl_random_pseudo_bytes')) + elseif (defined('MCRYPT_DEV_URANDOM')) { - $options['salt'] = openssl_random_pseudo_bytes(16); + $options['salt'] = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM); } elseif (DIRECTORY_SEPARATOR === '/' && (is_readable($dev = '/dev/arandom') OR is_readable($dev = '/dev/urandom'))) { @@ -148,6 +156,16 @@ if ( ! function_exists('password_hash')) fclose($fp); } + elseif (function_exists('openssl_random_pseudo_bytes')) + { + $is_secure = NULL; + $options['salt'] = openssl_random_pseudo_bytes(16, $is_secure); + if ($is_secure !== TRUE) + { + log_message('error', 'compat/password: openssl_random_pseudo_bytes() set the $cryto_strong flag to FALSE'); + return FALSE; + } + } else { log_message('error', 'compat/password: No CSPRNG available.'); diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index 92c38a0ed..a10a5c20c 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -339,12 +339,26 @@ class CI_Encryption { { if (function_exists('random_bytes')) { - return random_bytes((int) $length); + try + { + return random_bytes((int) $length); + } + catch (Exception $e) + { + log_message('error', $e->getMessage()); + return FALSE; + } + } + elseif (defined('MCRYPT_DEV_URANDOM')) + { + return mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); } - return ($this->_driver === 'mcrypt') - ? mcrypt_create_iv($length, MCRYPT_DEV_URANDOM) - : openssl_random_pseudo_bytes($length); + $is_secure = NULL; + $key = openssl_random_pseudo_bytes($length, $is_secure); + return ($is_secure === TRUE) + ? $key + : FALSE; } // -------------------------------------------------------------------- @@ -400,7 +414,7 @@ class CI_Encryption { // The greater-than-1 comparison is mostly a work-around for a bug, // where 1 is returned for ARCFour instead of 0. $iv = (($iv_size = mcrypt_enc_get_iv_size($params['handle'])) > 1) - ? mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM) + ? $this->create_key($iv_size) : NULL; if (mcrypt_generic_init($params['handle'], $params['key'], $iv) < 0) @@ -463,7 +477,7 @@ class CI_Encryption { } $iv = ($iv_size = openssl_cipher_iv_length($params['handle'])) - ? openssl_random_pseudo_bytes($iv_size) + ? $this->create_key($iv_size) : NULL; $data = openssl_encrypt( diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 88b797b91..5732ed3c6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,13 @@ Release Date: Not Released - General Changes - Updated :doc:`Image Manipulation Library ` to validate *width* and *height* configuration values. + - Updated :doc:`Encryption Library ` to always prefer ``random_bytes()`` when it is available. + + - :php:func:`password_hash()` :doc:`compatibility function ` changes: + + - Changed salt-generation logic to prefer ``random_bytes()`` when it is available. + - Changed salt-generation logic to prefer direct access to */dev/urandom* over ``openssl_random_pseudo_bytes()``. + - Changed salt-generation logic to error if ``openssl_random_pseudo_bytes()`` sets its ``$crypto_strong`` flag to FALSE. Bug fixes for 3.0.7 ------------------- -- cgit v1.2.3-24-g4f1b From 2f576ef91e9517191b31f6771c3a3e58f638b47d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Mar 2016 15:32:52 +0200 Subject: [ci skip] Add prep_for_form deprecation (since 3.0.6) to 3.0.x upgrade instructions --- user_guide_src/source/installation/upgrade_300.rst | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 9a40f2b60..0fc211f89 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -842,7 +842,6 @@ CodeIgniter 3.1+. .. note:: This method is still available, but you're strongly encouraged to remove its usage sooner rather than later. -====================== The Javascript library ====================== @@ -854,6 +853,25 @@ It is now deprecated and scheduled for removal in CodeIgniter 3.1+. .. note:: This library is still available, but you're strongly encouraged to remove its usage sooner rather than later. +Form Validation method prep_for_form() +====================================== + +The :doc:`Form Validation Library <../libraries/form_validation>` has a +``prep_for_form()`` method, which is/can also be used as a rule in +``set_rules()`` to automatically perform HTML encoding on input data. + +Automatically encoding input (instead of output) data is a bad practice in +the first place, and CodeIgniter and PHP itself offer other alternatives +to this method anyway. +For example, :doc:`Form Helper <../helpers/form_helper>` functions will +automatically perform HTML escaping when necessary. + +Therefore, the *prep_for_form* method/rule is pretty much useless and is now +deprecated and scheduled for removal in 3.1+. + +.. note:: The method is still available, but you're strongly encouraged to + remove its usage sooner rather than later. + *********************************************************** Step 21: Check your usage of Text helper highlight_phrase() *********************************************************** -- cgit v1.2.3-24-g4f1b From b9c69165355732c5c8d18f16f11481283a04ccb0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 30 Mar 2016 13:32:15 +0300 Subject: [ci skip] Fix #4557 --- user_guide_src/source/libraries/form_validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 44adfd715..b03b544e2 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -465,7 +465,7 @@ for you to process. To invoke a callback just put the method name in a rule, with "callback\_" as the rule **prefix**. If you need to receive an extra parameter in your callback method, just add it normally after the -method name between square brackets, as in: "callback_foo**[bar]**", +method name between square brackets, as in: ``callback_foo[bar]``, then it will be passed as the second argument of your callback method. .. note:: You can also process the form data that is passed to your -- cgit v1.2.3-24-g4f1b From b97e6b2e7e2f58aa7bba937b96dd2e9d3089e4d2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Apr 2016 12:04:01 +0300 Subject: [ci skip] Fix #861 (regression) --- system/database/drivers/mssql/mssql_forge.php | 5 +++++ system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php | 5 +++++ system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php | 5 +++++ system/database/drivers/sqlsrv/sqlsrv_forge.php | 5 +++++ user_guide_src/source/changelog.rst | 1 + 5 files changed, 21 insertions(+) diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php index 24d1fc204..91b5794bc 100644 --- a/system/database/drivers/mssql/mssql_forge.php +++ b/system/database/drivers/mssql/mssql_forge.php @@ -113,6 +113,11 @@ class CI_DB_mssql_forge extends CI_DB_forge { */ protected function _attr_type(&$attributes) { + if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) + { + unset($attributes['CONSTRAINT']); + } + switch (strtoupper($attributes['TYPE'])) { case 'MEDIUMINT': diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index d5dd9aad1..830200325 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -111,6 +111,11 @@ class CI_DB_pdo_dblib_forge extends CI_DB_pdo_forge { */ protected function _attr_type(&$attributes) { + if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) + { + unset($attributes['CONSTRAINT']); + } + switch (strtoupper($attributes['TYPE'])) { case 'MEDIUMINT': diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index 602f895f1..56bf87f3a 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -111,6 +111,11 @@ class CI_DB_pdo_sqlsrv_forge extends CI_DB_pdo_forge { */ protected function _attr_type(&$attributes) { + if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) + { + unset($attributes['CONSTRAINT']); + } + switch (strtoupper($attributes['TYPE'])) { case 'MEDIUMINT': diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index f915dad3e..4f0ce9d6f 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -111,6 +111,11 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge { */ protected function _attr_type(&$attributes) { + if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) + { + unset($attributes['CONSTRAINT']); + } + switch (strtoupper($attributes['TYPE'])) { case 'MEDIUMINT': diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5732ed3c6..3cef6b66c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.0.7 ------------------- - Fixed a bug where :doc:`Image Manipulation Library ` didn't escape image source paths passed to ImageMagick as shell arguments. +- Fixed a bug (#861) - :doc:`Database Forge ` method ``create_table()`` incorrectly accepts field width constraints for MSSQL/SQLSRV integer-type columns. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From f8312cfa38d2793f1b365f918395019f343fe1c0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Apr 2016 21:11:23 +0300 Subject: [ci skip] Fix #4562 --- system/libraries/Cache/drivers/Cache_memcached.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 6dee1e8e4..836336d46 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -295,7 +295,7 @@ class CI_Cache_memcached extends CI_Driver { { $this->_memcached->close(); } - elseif ($this->_memcached instanceof Memcached) + elseif ($this->_memcached instanceof Memcached && method_exists($this->_memcached, 'quit')) { $this->_memcached->quit(); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3cef6b66c..1f8866089 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Bug fixes for 3.0.7 - Fixed a bug where :doc:`Image Manipulation Library ` didn't escape image source paths passed to ImageMagick as shell arguments. - Fixed a bug (#861) - :doc:`Database Forge ` method ``create_table()`` incorrectly accepts field width constraints for MSSQL/SQLSRV integer-type columns. +- Fixed a bug (#4562) - :doc:`Cache Library ` didn't check if ``Memcached::quit()`` is available before calling it. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 85dfc2a6f76ca95e803535c25877e2aa1c05c38b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Apr 2016 22:54:15 +0300 Subject: [ci skip] Add some 'debug' log messages to CI_Session --- system/libraries/Session/Session.php | 1 + system/libraries/Session/drivers/Session_database_driver.php | 5 ++++- system/libraries/Session/drivers/Session_files_driver.php | 1 + user_guide_src/source/changelog.rst | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index c9d2e8adc..1bdc6e5cc 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -91,6 +91,7 @@ class CI_Session { // Note: BC workaround elseif (config_item('sess_use_database')) { + log_message('debug', 'Session: "sess_driver" is empty; using BC fallback to "sess_use_database".'); $this->_driver = 'database'; } diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 317bd7d4d..cb152f91f 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -109,7 +109,10 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan } // Note: BC work-around for the old 'sess_table_name' setting, should be removed in the future. - isset($this->_config['save_path']) OR $this->_config['save_path'] = config_item('sess_table_name'); + if ( ! isset($this->_config['save_path']) && ($this->_config['save_path'] = config_item('sess_table_name'))) + { + log_message('debug', 'Session: "sess_save_path" is empty; using BC fallback to "sess_table_name".'); + } } // ------------------------------------------------------------------------ diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 119bf6572..57c3777a2 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -95,6 +95,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle } else { + log_message('debug', 'Session: "sess_save_path" is empty; using "session.save_path" value from php.ini.'); $this->_config['save_path'] = rtrim(ini_get('session.save_path'), '/\\'); } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1f8866089..40f7c1302 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: Not Released - Updated :doc:`Image Manipulation Library ` to validate *width* and *height* configuration values. - Updated :doc:`Encryption Library ` to always prefer ``random_bytes()`` when it is available. + - Updated :doc:`Session Library ` to log 'debug' messages when using fallbacks to *session.save_path* (php.ini) or 'sess_use_database', 'sess_table_name' settings. - :php:func:`password_hash()` :doc:`compatibility function ` changes: -- cgit v1.2.3-24-g4f1b From cd3d5956f7880091740489c5f24af0e72f677c0c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Apr 2016 10:28:31 +0300 Subject: Fix #4563 --- system/core/Input.php | 26 ++++++++++++++------------ user_guide_src/source/changelog.rst | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index a7c9ecd0d..50ca047e8 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -760,30 +760,32 @@ class CI_Input { // If header is already defined, return it immediately if ( ! empty($this->headers)) { - return $this->headers; + return $this->_fetch_from_array($this->headers, NULL, $xss_clean); } // In Apache, you can simply call apache_request_headers() if (function_exists('apache_request_headers')) { - return $this->headers = apache_request_headers(); + $this->headers = apache_request_headers(); } - - $this->headers['Content-Type'] = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE'); - - foreach ($_SERVER as $key => $val) + else { - if (sscanf($key, 'HTTP_%s', $header) === 1) + isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE']; + + foreach ($_SERVER as $key => $val) { - // take SOME_HEADER and turn it into Some-Header - $header = str_replace('_', ' ', strtolower($header)); - $header = str_replace(' ', '-', ucwords($header)); + if (sscanf($key, 'HTTP_%s', $header) === 1) + { + // take SOME_HEADER and turn it into Some-Header + $header = str_replace('_', ' ', strtolower($header)); + $header = str_replace(' ', '-', ucwords($header)); - $this->headers[$header] = $this->_fetch_from_array($_SERVER, $key, $xss_clean); + $this->headers[$header] = $_SERVER[$key]; + } } } - return $this->headers; + return $this->_fetch_from_array($this->headers, NULL, $xss_clean); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 40f7c1302..5a482208a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.0.7 - Fixed a bug where :doc:`Image Manipulation Library ` didn't escape image source paths passed to ImageMagick as shell arguments. - Fixed a bug (#861) - :doc:`Database Forge ` method ``create_table()`` incorrectly accepts field width constraints for MSSQL/SQLSRV integer-type columns. - Fixed a bug (#4562) - :doc:`Cache Library ` didn't check if ``Memcached::quit()`` is available before calling it. +- Fixed a bug (#4563) - :doc:`Input Library ` method ``request_headers()`` ignores ``$xss_clean`` parameter value after first call. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From a2f837f0931f23cc440c1b7ffd298c6fe8705fe9 Mon Sep 17 00:00:00 2001 From: Moses Kurniawan Date: Wed, 13 Apr 2016 01:05:17 +0700 Subject: Removed double quotes on $cid because if we using quotes, the embedded image will not appear. --- user_guide_src/source/libraries/email.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index eadfcfd5c..0b38737f1 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -374,7 +374,7 @@ Class Reference { $this->email->to($address); $cid = $this->email->attachment_cid($filename); - $this->email->message('photo1'); + $this->email->message('photo1'); $this->email->send(); } -- cgit v1.2.3-24-g4f1b From 98026f1ef2b05859b15602a5e2445575b24188ba Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Apr 2016 21:15:38 +0300 Subject: Merge pull request #4579 from mokalovesoulmate/develop [ci skip] Fix a CI_Email documentation example --- user_guide_src/source/libraries/email.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index eadfcfd5c..0b38737f1 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -374,7 +374,7 @@ Class Reference { $this->email->to($address); $cid = $this->email->attachment_cid($filename); - $this->email->message('photo1'); + $this->email->message('photo1'); $this->email->send(); } -- cgit v1.2.3-24-g4f1b From 92d8eb2acf7204d01f595081551a4b08c4660cf3 Mon Sep 17 00:00:00 2001 From: Robert Angyal Date: Sun, 17 Apr 2016 06:48:22 +0200 Subject: Fixes #4583 by separating attachments to related and mixed multiparts Signed-off-by: Robert Angyal --- system/libraries/Email.php | 135 +++++++++++++++++++++++++++++++++------------ 1 file changed, 101 insertions(+), 34 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index ed6f737a1..ef9b58b61 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -149,13 +149,6 @@ class CI_Email { */ public $charset = 'utf-8'; - /** - * Multipart message - * - * @var string 'mixed' (in the body) or 'related' (separate) - */ - public $multipart = 'mixed'; // "mixed" (in the body) or "related" (separate) - /** * Alternative message (for HTML messages only) * @@ -274,6 +267,13 @@ class CI_Email { */ protected $_atc_boundary = ''; + /** + * Related Attachment boundary + * + * @var string + */ + protected $_rel_boundary = ''; + /** * Final headers to send * @@ -766,7 +766,8 @@ class CI_Email { 'name' => array($file, $newname), 'disposition' => empty($disposition) ? 'attachment' : $disposition, // Can also be 'inline' Not sure if it matters 'type' => $mime, - 'content' => chunk_split(base64_encode($file_content)) + 'content' => chunk_split(base64_encode($file_content)), + 'multipart' => 'mixed' ); return $this; @@ -784,15 +785,11 @@ class CI_Email { */ public function attachment_cid($filename) { - if ($this->multipart !== 'related') - { - $this->multipart = 'related'; // Thunderbird need this for inline images - } - for ($i = 0, $c = count($this->_attachments); $i < $c; $i++) { if ($this->_attachments[$i]['name'][0] === $filename) { + $this->_attachments[$i]['multipart'] = 'related'; $this->_attachments[$i]['cid'] = uniqid(basename($this->_attachments[$i]['name'][0]).'@'); return $this->_attachments[$i]['cid']; } @@ -945,6 +942,7 @@ class CI_Email { { $this->_alt_boundary = 'B_ALT_'.uniqid(''); // multipart/alternative $this->_atc_boundary = 'B_ATC_'.uniqid(''); // attachment boundary + $this->_rel_boundary = 'B_REL_'.uniqid(''); // related attachment boundary } // -------------------------------------------------------------------- @@ -1391,7 +1389,7 @@ class CI_Email { case 'plain-attach' : - $hdr .= 'Content-Type: multipart/'.$this->multipart.'; boundary="'.$this->_atc_boundary.'"'; + $hdr .= 'Content-Type: multipart/mixed; boundary="'.$this->_atc_boundary.'"'; if ($this->_get_protocol() === 'mail') { @@ -1406,18 +1404,45 @@ class CI_Email { .$this->newline .$this->_body.$this->newline.$this->newline; + $attachment_prepared = $this->_prep_attachments($this->_attachments, $this->_atc_boundary); + break; case 'html-attach' : - $hdr .= 'Content-Type: multipart/'.$this->multipart.'; boundary="'.$this->_atc_boundary.'"'; + $attachments_indexed_by_multipart = $this->_attachments_indexed_by_multipart(); + $attachments_related = $attachments_indexed_by_multipart['related']; + $attachments_mixed = $attachments_indexed_by_multipart['mixed']; + $prepared_attachment_parts = array(); + + if (isset($attachments_mixed) && count($attachments_mixed) > 0) + { + $hdr .= 'Content-Type: multipart/mixed; boundary="'.$this->_atc_boundary.'"'; + + array_push($prepared_attachment_parts, $this->_prep_attachments($attachments_mixed, $this->_atc_boundary)); + $last_boundary = $this->_atc_boundary; + } + + if (isset($attachments_related) && count($attachments_related) > 0) + { + $target_container =& $hdr; + if (isset($last_boundary)) { + $target_container =& $body; + $target_container .= '--' . $last_boundary . $this->newline; + } + $target_container .= 'Content-Type: multipart/related; boundary="'.$this->_rel_boundary.'"'; + + array_unshift($prepared_attachment_parts, $this->_prep_attachments($attachments_related, $this->_rel_boundary)); + $last_boundary = $this->_rel_boundary; + } if ($this->_get_protocol() === 'mail') { $this->_header_str .= $hdr; } + if (strlen(body) > 0) $body .= $this->newline.$this->newline; $body .= $this->_get_mime_message().$this->newline.$this->newline - .'--'.$this->_atc_boundary.$this->newline + .'--'.$last_boundary.$this->newline .'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"'.$this->newline.$this->newline .'--'.$this->_alt_boundary.$this->newline @@ -1432,27 +1457,12 @@ class CI_Email { .$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline .'--'.$this->_alt_boundary.'--'.$this->newline.$this->newline; - break; - } - - $attachment = array(); - for ($i = 0, $c = count($this->_attachments), $z = 0; $i < $c; $i++) - { - $filename = $this->_attachments[$i]['name'][0]; - $basename = ($this->_attachments[$i]['name'][1] === NULL) - ? basename($filename) : $this->_attachments[$i]['name'][1]; - - $attachment[$z++] = '--'.$this->_atc_boundary.$this->newline - .'Content-type: '.$this->_attachments[$i]['type'].'; ' - .'name="'.$basename.'"'.$this->newline - .'Content-Disposition: '.$this->_attachments[$i]['disposition'].';'.$this->newline - .'Content-Transfer-Encoding: base64'.$this->newline - .(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline); + $attachment_prepared = implode($this->newline.$this->newline, $prepared_attachment_parts); - $attachment[$z++] = $this->_attachments[$i]['content']; + break; } - $body .= implode($this->newline, $attachment).$this->newline.'--'.$this->_atc_boundary.'--'; + $body .= $attachment_prepared; $this->_finalbody = ($this->_get_protocol() === 'mail') ? $body : $hdr.$this->newline.$this->newline.$body; @@ -1462,6 +1472,63 @@ class CI_Email { // -------------------------------------------------------------------- + /** + * Returns attachments mapped by multipart type + * + * @return array + */ + protected function _attachments_indexed_by_multipart() + { + foreach ($this->_attachments as $attachment) + { + $multipart = $attachment['multipart']; + if (!isset($attachments_indexed[$multipart])) + { + $attachments_indexed[$multipart] = array(); + } + array_push($attachments_indexed[$multipart], $attachment); + } + + return $attachments_indexed; + } + + // -------------------------------------------------------------------- + + /** + * Prepares attachment string + * + * @param array $attachments + * @param string $boundary Multipart boundary string + * @return string + */ + protected function _prep_attachments($attachments, $boundary) + { + if (!isset($attachments) || count($attachments) === 0) return ''; + + $attachment_parts = array(); + foreach ($attachments as $attachment) + { + $filename = $attachment['name'][0]; + $basename = ($attachment['name'][1] === NULL) + ? basename($filename) : $attachment['name'][1]; + + array_push( + $attachment_parts, + '--'.$boundary.$this->newline + .'Content-type: '.$attachment['type'].'; ' + .'name="'.$basename.'"'.$this->newline + .'Content-Disposition: '.$attachment['disposition'].';'.$this->newline + .'Content-Transfer-Encoding: base64'.$this->newline + .(empty($attachment['cid']) ? '' : 'Content-ID: <'.$attachment['cid'].'>'.$this->newline), + $attachment['content'] + ); + } + + return implode($this->newline, $attachment_parts).$this->newline.'--'.$boundary.'--'; + } + + // -------------------------------------------------------------------- + /** * Prep Quoted Printable * -- cgit v1.2.3-24-g4f1b From 832fd00b10f2fb236e0bf5b770d3298e6fedee64 Mon Sep 17 00:00:00 2001 From: Robert Angyal Date: Wed, 20 Apr 2016 05:20:15 +0200 Subject: #4583 Fix code style issues Signed-off-by: Robert Angyal --- system/libraries/Email.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index ef9b58b61..cbb48f525 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -767,7 +767,7 @@ class CI_Email { 'disposition' => empty($disposition) ? 'attachment' : $disposition, // Can also be 'inline' Not sure if it matters 'type' => $mime, 'content' => chunk_split(base64_encode($file_content)), - 'multipart' => 'mixed' + 'multipart' => 'mixed' ); return $this; @@ -1413,6 +1413,7 @@ class CI_Email { $attachments_related = $attachments_indexed_by_multipart['related']; $attachments_mixed = $attachments_indexed_by_multipart['mixed']; $prepared_attachment_parts = array(); + $last_boundary = NULL; if (isset($attachments_mixed) && count($attachments_mixed) > 0) { @@ -1425,7 +1426,8 @@ class CI_Email { if (isset($attachments_related) && count($attachments_related) > 0) { $target_container =& $hdr; - if (isset($last_boundary)) { + if (isset($last_boundary)) + { $target_container =& $body; $target_container .= '--' . $last_boundary . $this->newline; } @@ -1440,7 +1442,10 @@ class CI_Email { $this->_header_str .= $hdr; } - if (strlen(body) > 0) $body .= $this->newline.$this->newline; + if (strlen(body) > 0) + { + $body .= $this->newline.$this->newline; + } $body .= $this->_get_mime_message().$this->newline.$this->newline .'--'.$last_boundary.$this->newline @@ -1475,7 +1480,7 @@ class CI_Email { /** * Returns attachments mapped by multipart type * - * @return array + * @return array */ protected function _attachments_indexed_by_multipart() { @@ -1497,13 +1502,16 @@ class CI_Email { /** * Prepares attachment string * - * @param array $attachments - * @param string $boundary Multipart boundary string - * @return string + * @param array $attachments + * @param string $boundary Multipart boundary string + * @return string */ protected function _prep_attachments($attachments, $boundary) { - if (!isset($attachments) || count($attachments) === 0) return ''; + if (!isset($attachments) OR count($attachments) === 0) + { + return ''; + } $attachment_parts = array(); foreach ($attachments as $attachment) -- cgit v1.2.3-24-g4f1b From 57d2140687c74abd7b5a4bb4b859015eb703d565 Mon Sep 17 00:00:00 2001 From: rochefort Date: Thu, 28 Apr 2016 02:41:17 +0900 Subject: Fix a type of parameter in url_title [ci skip] --- user_guide_src/source/helpers/url_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 64deae240..6fb0dd942 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -277,7 +277,7 @@ Available Functions :param string $str: Input string :param string $separator: Word separator - :param string $lowercase: Whether to transform the output string to lower-case + :param bool $lowercase: Whether to transform the output string to lower-case :returns: URL-formatted string :rtype: string @@ -370,4 +370,4 @@ Available Functions will *automatically* be selected when the page is currently accessed via POST and HTTP/1.1 is used. - .. important:: This function will terminate script execution. \ No newline at end of file + .. important:: This function will terminate script execution. -- cgit v1.2.3-24-g4f1b From 9343851e6155f6728e02332000f1885e248e907d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Apr 2016 11:09:06 +0300 Subject: Merge pull request #4603 from rochefort/fix-type [ci skip] Fix a parameter type in url_title() docs --- user_guide_src/source/helpers/url_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 64deae240..6fb0dd942 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -277,7 +277,7 @@ Available Functions :param string $str: Input string :param string $separator: Word separator - :param string $lowercase: Whether to transform the output string to lower-case + :param bool $lowercase: Whether to transform the output string to lower-case :returns: URL-formatted string :rtype: string @@ -370,4 +370,4 @@ Available Functions will *automatically* be selected when the page is currently accessed via POST and HTTP/1.1 is used. - .. important:: This function will terminate script execution. \ No newline at end of file + .. important:: This function will terminate script execution. -- cgit v1.2.3-24-g4f1b From ed458fbdb36f8d8d7bd7d818dbb2983485e86b3c Mon Sep 17 00:00:00 2001 From: Robert Angyal Date: Thu, 28 Apr 2016 10:26:56 +0200 Subject: #4583 Refactor according to the suggestions commented on Pull Request Signed-off-by: Robert Angyal --- system/libraries/Email.php | 68 ++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index cbb48f525..e35c48ec4 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1406,34 +1406,34 @@ class CI_Email { $attachment_prepared = $this->_prep_attachments($this->_attachments, $this->_atc_boundary); - break; + break; case 'html-attach' : $attachments_indexed_by_multipart = $this->_attachments_indexed_by_multipart(); - $attachments_related = $attachments_indexed_by_multipart['related']; - $attachments_mixed = $attachments_indexed_by_multipart['mixed']; $prepared_attachment_parts = array(); $last_boundary = NULL; - if (isset($attachments_mixed) && count($attachments_mixed) > 0) + if ( ! empty($attachments_indexed_by_multipart['mixed'])) { $hdr .= 'Content-Type: multipart/mixed; boundary="'.$this->_atc_boundary.'"'; - array_push($prepared_attachment_parts, $this->_prep_attachments($attachments_mixed, $this->_atc_boundary)); + $prepared_attachment_parts[] = $this->_prep_attachments($attachments_indexed_by_multipart['mixed'], $this->_atc_boundary); $last_boundary = $this->_atc_boundary; } - if (isset($attachments_related) && count($attachments_related) > 0) + if ( ! empty($attachments_indexed_by_multipart['related'])) { - $target_container =& $hdr; + $rel_boundary_header = 'Content-Type: multipart/related; boundary="'.$this->_rel_boundary.'"'; if (isset($last_boundary)) { - $target_container =& $body; - $target_container .= '--' . $last_boundary . $this->newline; + $body .= '--' . $last_boundary . $this->newline . $rel_boundary_header; + } + else + { + $hdr .= $rel_boundary_header; } - $target_container .= 'Content-Type: multipart/related; boundary="'.$this->_rel_boundary.'"'; - array_unshift($prepared_attachment_parts, $this->_prep_attachments($attachments_related, $this->_rel_boundary)); + array_unshift($prepared_attachment_parts, $this->_prep_attachments($attachments_indexed_by_multipart['related'], $this->_rel_boundary)); $last_boundary = $this->_rel_boundary; } @@ -1442,10 +1442,7 @@ class CI_Email { $this->_header_str .= $hdr; } - if (strlen(body) > 0) - { - $body .= $this->newline.$this->newline; - } + strlen($body) && $body .= $this->newline.$this->newline; $body .= $this->_get_mime_message().$this->newline.$this->newline .'--'.$last_boundary.$this->newline @@ -1464,7 +1461,7 @@ class CI_Email { $attachment_prepared = implode($this->newline.$this->newline, $prepared_attachment_parts); - break; + break; } $body .= $attachment_prepared; @@ -1487,11 +1484,8 @@ class CI_Email { foreach ($this->_attachments as $attachment) { $multipart = $attachment['multipart']; - if (!isset($attachments_indexed[$multipart])) - { - $attachments_indexed[$multipart] = array(); - } - array_push($attachments_indexed[$multipart], $attachment); + isset($attachments_indexed[$multipart]) OR $attachments_indexed[$multipart] = array(); + $attachments_indexed[$multipart][] = $attachment; } return $attachments_indexed; @@ -1508,31 +1502,29 @@ class CI_Email { */ protected function _prep_attachments($attachments, $boundary) { - if (!isset($attachments) OR count($attachments) === 0) + if (empty($attachments)) { return ''; } - $attachment_parts = array(); - foreach ($attachments as $attachment) + $attachment = array(); + for ($i = 0, $c = count($attachments), $z = 0; $i < $c; $i++) { - $filename = $attachment['name'][0]; - $basename = ($attachment['name'][1] === NULL) - ? basename($filename) : $attachment['name'][1]; + $filename = $attachments[$i]['name'][0]; + $basename = ($attachments[$i]['name'][1] === NULL) + ? basename($filename) : $attachments[$i]['name'][1]; + + $attachment[$z++] = '--'.$boundary.$this->newline + .'Content-type: '.$attachments[$i]['type'].'; ' + .'name="'.$basename.'"'.$this->newline + .'Content-Disposition: '.$attachments[$i]['disposition'].';'.$this->newline + .'Content-Transfer-Encoding: base64'.$this->newline + .(empty($attachments[$i]['cid']) ? '' : 'Content-ID: <'.$attachments[$i]['cid'].'>'.$this->newline); - array_push( - $attachment_parts, - '--'.$boundary.$this->newline - .'Content-type: '.$attachment['type'].'; ' - .'name="'.$basename.'"'.$this->newline - .'Content-Disposition: '.$attachment['disposition'].';'.$this->newline - .'Content-Transfer-Encoding: base64'.$this->newline - .(empty($attachment['cid']) ? '' : 'Content-ID: <'.$attachment['cid'].'>'.$this->newline), - $attachment['content'] - ); + $attachment[$z++] = $attachments[$i]['content']; } - return implode($this->newline, $attachment_parts).$this->newline.'--'.$boundary.'--'; + return implode($this->newline, $attachment).$this->newline.'--'.$boundary.'--'; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 4ac24c201c673b52b39b7efc2235f1d84d1acd08 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Apr 2016 14:28:07 +0300 Subject: Fix #4605 --- system/core/Config.php | 9 +++------ tests/codeigniter/core/Config_test.php | 2 ++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/core/Config.php b/system/core/Config.php index ca6fb3793..9fd3e4a7d 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -319,7 +319,7 @@ class CI_Config { } } - return $base_url.ltrim($this->_uri_string($uri), '/'); + return $base_url.$this->_uri_string($uri); } // ------------------------------------------------------------- @@ -337,11 +337,8 @@ class CI_Config { { if ($this->item('enable_query_strings') === FALSE) { - if (is_array($uri)) - { - $uri = implode('/', $uri); - } - return trim($uri, '/'); + is_array($uri) && $uri = implode('/', $uri); + return ltrim($uri, '/'); } elseif (is_array($uri)) { diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php index 26a5f32f5..b5c9e849d 100644 --- a/tests/codeigniter/core/Config_test.php +++ b/tests/codeigniter/core/Config_test.php @@ -127,6 +127,8 @@ class Config_test extends CI_TestCase { $this->assertEquals($index_page.'/'.$uri, $this->config->site_url($uri)); $this->assertEquals($index_page.'/'.$uri.'/'.$uri2, $this->config->site_url(array($uri, $uri2))); + $this->assertEquals($index_page.'/test/', $this->config->site_url('test/')); + $suffix = 'ing'; $this->config->set_item('url_suffix', $suffix); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5a482208a..d50c0a052 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#861) - :doc:`Database Forge ` method ``create_table()`` incorrectly accepts field width constraints for MSSQL/SQLSRV integer-type columns. - Fixed a bug (#4562) - :doc:`Cache Library ` didn't check if ``Memcached::quit()`` is available before calling it. - Fixed a bug (#4563) - :doc:`Input Library ` method ``request_headers()`` ignores ``$xss_clean`` parameter value after first call. +- Fixed a bug (#4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 5277583e7336675d02665ff77359b41e782853ce Mon Sep 17 00:00:00 2001 From: Robert Angyal Date: Wed, 4 May 2016 16:33:25 +0200 Subject: #4583 Refactor according to the suggestions commented on Pull Request Signed-off-by: Robert Angyal --- system/libraries/Email.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index e35c48ec4..4fd1107c5 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1404,20 +1404,17 @@ class CI_Email { .$this->newline .$this->_body.$this->newline.$this->newline; - $attachment_prepared = $this->_prep_attachments($this->_attachments, $this->_atc_boundary); + $body .= $this->_prep_attachments($this->_attachments, $this->_atc_boundary); break; case 'html-attach' : $attachments_indexed_by_multipart = $this->_attachments_indexed_by_multipart(); - $prepared_attachment_parts = array(); $last_boundary = NULL; if ( ! empty($attachments_indexed_by_multipart['mixed'])) { $hdr .= 'Content-Type: multipart/mixed; boundary="'.$this->_atc_boundary.'"'; - - $prepared_attachment_parts[] = $this->_prep_attachments($attachments_indexed_by_multipart['mixed'], $this->_atc_boundary); $last_boundary = $this->_atc_boundary; } @@ -1426,14 +1423,12 @@ class CI_Email { $rel_boundary_header = 'Content-Type: multipart/related; boundary="'.$this->_rel_boundary.'"'; if (isset($last_boundary)) { - $body .= '--' . $last_boundary . $this->newline . $rel_boundary_header; + $body .= '--'.$last_boundary.$this->newline.$rel_boundary_header; } else { $hdr .= $rel_boundary_header; } - - array_unshift($prepared_attachment_parts, $this->_prep_attachments($attachments_indexed_by_multipart['related'], $this->_rel_boundary)); $last_boundary = $this->_rel_boundary; } @@ -1459,12 +1454,15 @@ class CI_Email { .$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline .'--'.$this->_alt_boundary.'--'.$this->newline.$this->newline; - $attachment_prepared = implode($this->newline.$this->newline, $prepared_attachment_parts); + ( ! empty($attachments_indexed_by_multipart['related'])) && $body .= $this->newline.$this->newline + .$this->_prep_attachments($attachments_indexed_by_multipart['related'], $this->_rel_boundary); + + ( ! empty($attachments_indexed_by_multipart['mixed'])) && $body .= $this->newline.$this->newline + .$this->_prep_attachments($attachments_indexed_by_multipart['mixed'], $this->_atc_boundary); break; } - $body .= $attachment_prepared; $this->_finalbody = ($this->_get_protocol() === 'mail') ? $body : $hdr.$this->newline.$this->newline.$body; -- cgit v1.2.3-24-g4f1b From fd024c6fce2197b13520c1c53a5faa9f2704bdd2 Mon Sep 17 00:00:00 2001 From: kadoppe Date: Fri, 6 May 2016 17:25:18 +0900 Subject: Remove unnecessary backslash from user guide. Signed-off-by: kadoppe --- user_guide_src/source/tutorial/create_news_items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index e10eebd3b..cde52fde8 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -76,7 +76,7 @@ validation <../libraries/form_validation>` library to do this. The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the -form validation are set. The ``set\_rules()`` method takes three arguments; +form validation are set. The ``set_rules()`` method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required. -- cgit v1.2.3-24-g4f1b From f6dc21b2f57ad0f76de6e4e005cfe3d79a420d0a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 May 2016 11:24:55 +0300 Subject: [ci skip] Remove unnecessary backslash from user guide [ci skip] Remove unnecessary backslash from user guide --- user_guide_src/source/tutorial/create_news_items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index e10eebd3b..cde52fde8 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -76,7 +76,7 @@ validation <../libraries/form_validation>` library to do this. The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the -form validation are set. The ``set\_rules()`` method takes three arguments; +form validation are set. The ``set_rules()`` method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required. -- cgit v1.2.3-24-g4f1b From fd8349f0328cb6c0cd56fd19c931fd79a707faa8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 May 2016 12:10:24 +0300 Subject: Use 5.3.latest on Travis to fix the build errors 5.3.3 doesn't have ext/openssl ... Also, allow failures on 5.3 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5a7eb11b9..e531f8d90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: php php: - 5.2 - - 5.3.3 + - 5.3 - 5.4 - 5.5 - 5.6 @@ -31,6 +31,7 @@ script: phpunit -d zend.enable_gc=0 -d date.timezone=UTC --coverage-text --confi matrix: allow_failures: - php: 5.2 + - php: 5.3 - php: hhvm exclude: - php: hhvm -- cgit v1.2.3-24-g4f1b From a380c69a71bcf2362e8cebe707994cc519a93bfd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 May 2016 12:12:45 +0300 Subject: Stop testing 3.1.0-dev on PHP 5.2, 5.3 --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a7eb11b9..1e0ee65db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: php php: - - 5.2 - - 5.3.3 - 5.4 - 5.5 - 5.6 @@ -21,7 +19,7 @@ env: sudo: false before_script: - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear channel-discover pear.bovigo.org && pear install bovigo/vfsStream-beta; else composer install --dev --no-progress; fi" + - sh -c "composer install --dev --no-progress" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi" @@ -30,7 +28,6 @@ script: phpunit -d zend.enable_gc=0 -d date.timezone=UTC --coverage-text --confi matrix: allow_failures: - - php: 5.2 - php: hhvm exclude: - php: hhvm @@ -39,10 +36,6 @@ matrix: env: DB=pdo/pgsql - php: 7 env: DB=mysql - - php: 5.2 - env: DB=sqlite - - php: 5.2 - env: DB=pdo/sqlite branches: only: -- cgit v1.2.3-24-g4f1b From 8425319eb523ee50b11b06b97738c5a46def84e4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 May 2016 12:24:52 +0300 Subject: [ci skip] Fix #4613 --- system/libraries/Email.php | 5 +++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 6 insertions(+) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index ed6f737a1..cdfb43bb5 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -2153,6 +2153,11 @@ class CI_Email { return FALSE; } + if ($this->smtp_keepalive) + { + $this->_smtp_auth = FALSE; + } + return TRUE; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d50c0a052..567eb10a6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4562) - :doc:`Cache Library ` didn't check if ``Memcached::quit()`` is available before calling it. - Fixed a bug (#4563) - :doc:`Input Library ` method ``request_headers()`` ignores ``$xss_clean`` parameter value after first call. - Fixed a bug (#4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it. +- Fixed a bug (#4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 8c95c3d6d1b589771890e5383c3e0f78a58303e9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 May 2016 12:35:41 +0300 Subject: [ci skip] Minor optimizations to CI_Email --- system/libraries/Email.php | 50 ++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index cdfb43bb5..6ff3efad9 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -147,7 +147,7 @@ class CI_Email { * * @var string */ - public $charset = 'utf-8'; + public $charset = 'UTF-8'; /** * Multipart message @@ -408,47 +408,24 @@ class CI_Email { public function __construct(array $config = array()) { $this->charset = config_item('charset'); - - if (count($config) > 0) - { - $this->initialize($config); - } - else - { - $this->_smtp_auth = ! ($this->smtp_user === '' && $this->smtp_pass === ''); - } - + $this->initialize($config); $this->_safe_mode = ( ! is_php('5.4') && ini_get('safe_mode')); - $this->charset = strtoupper($this->charset); log_message('info', 'Email Class Initialized'); } // -------------------------------------------------------------------- - /** - * Destructor - Releases Resources - * - * @return void - */ - public function __destruct() - { - if (is_resource($this->_smtp_connect)) - { - $this->_send_command('quit'); - } - } - - // -------------------------------------------------------------------- - /** * Initialize preferences * - * @param array + * @param array $config * @return CI_Email */ - public function initialize($config = array()) + public function initialize(array $config = array()) { + $this->clear(); + foreach ($config as $key => $val) { if (isset($this->$key)) @@ -465,9 +442,9 @@ class CI_Email { } } } - $this->clear(); - $this->_smtp_auth = ! ($this->smtp_user === '' && $this->smtp_pass === ''); + $this->charset = strtoupper($this->charset); + $this->_smtp_auth = isset($this->smtp_user[0], $this->smtp_pass[0]); return $this; } @@ -2347,4 +2324,15 @@ class CI_Email { return 'application/x-unknown-content-type'; } + // -------------------------------------------------------------------- + + /** + * Destructor + * + * @return void + */ + public function __destruct() + { + is_resource($this->_smtp_connect) && $this->_send_command('quit'); + } } -- cgit v1.2.3-24-g4f1b From 22f1545d986391e71682eba37ef60e56f3f8ca77 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 9 May 2016 13:07:38 -0700 Subject: Add favicon to user guide source (it was missing). This was mentioned in a tweet. The user guide currently has a configuraiton setting with a favicon link, but it referenced a non-existant file. Signed-off-by:Master Yoda --- .../_themes/sphinx_rtd_theme/static/images/ci-icon.ico | Bin 0 -> 1150 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico b/user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico new file mode 100644 index 000000000..c4246f8bf Binary files /dev/null and b/user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico differ -- cgit v1.2.3-24-g4f1b From ae435f79ca958127b2d4ce2572bfd97e829df81f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 10 May 2016 10:21:19 +0300 Subject: Merge pull request #4620 from jim-parry/favicon [ci skip] Add missing favicon to user guide source --- .../_themes/sphinx_rtd_theme/static/images/ci-icon.ico | Bin 0 -> 1150 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico b/user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico new file mode 100644 index 000000000..c4246f8bf Binary files /dev/null and b/user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico differ -- cgit v1.2.3-24-g4f1b From 4426e1d3bc627cc73d2454cba4bf9426c7dd0ce4 Mon Sep 17 00:00:00 2001 From: rochefort Date: Wed, 11 May 2016 02:52:22 +0900 Subject: Fix docs [ci skip] - Fix missing parenthesis of function - Fix incorrect place of a sentence - Fix a missing doc link --- user_guide_src/source/helpers/typography_helper.rst | 4 ++-- user_guide_src/source/helpers/url_helper.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/helpers/typography_helper.rst b/user_guide_src/source/helpers/typography_helper.rst index 7eb4fceec..89730b03d 100644 --- a/user_guide_src/source/helpers/typography_helper.rst +++ b/user_guide_src/source/helpers/typography_helper.rst @@ -35,7 +35,7 @@ The following functions are available: Formats text so that it is semantically and typographically correct HTML. - This function is an alias for ``CI_Typography::auto_typography``. + This function is an alias for ``CI_Typography::auto_typography()``. For more info, please see the :doc:`Typography Library <../libraries/typography>` documentation. @@ -45,7 +45,7 @@ The following functions are available: .. note:: Typographic formatting can be processor intensive, particularly if you have a lot of content being formatted. If you choose to use this - function you may want to consider `caching <../general/caching>` your + function you may want to consider :doc:`caching <../general/caching>` your pages. diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 6fb0dd942..435a21df4 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -18,11 +18,11 @@ This helper is loaded using the following code:: $this->load->helper('url'); -The following functions are available: - Available Functions =================== +The following functions are available: + .. php:function:: site_url([$uri = ''[, $protocol = NULL]]) :param string $uri: URI string @@ -360,7 +360,7 @@ Available Functions is outputted to the browser since it utilizes server headers. .. note:: For very fine grained control over headers, you should use the - `Output Library ` ``set_header()`` method. + :doc:`Output Library ` ``set_header()`` method. .. note:: To IIS users: if you hide the `Server` HTTP header, the *auto* method won't detect IIS, in that case it is advised you explicitly -- cgit v1.2.3-24-g4f1b From e0c566eeb1866764eaa865e42bb4769921137594 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 11 May 2016 16:05:23 +0300 Subject: Merge pull request #4625 from rochefort/missing_parenthesis [ci skip] Minor documentation fixes --- user_guide_src/source/helpers/typography_helper.rst | 4 ++-- user_guide_src/source/helpers/url_helper.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/helpers/typography_helper.rst b/user_guide_src/source/helpers/typography_helper.rst index 7eb4fceec..89730b03d 100644 --- a/user_guide_src/source/helpers/typography_helper.rst +++ b/user_guide_src/source/helpers/typography_helper.rst @@ -35,7 +35,7 @@ The following functions are available: Formats text so that it is semantically and typographically correct HTML. - This function is an alias for ``CI_Typography::auto_typography``. + This function is an alias for ``CI_Typography::auto_typography()``. For more info, please see the :doc:`Typography Library <../libraries/typography>` documentation. @@ -45,7 +45,7 @@ The following functions are available: .. note:: Typographic formatting can be processor intensive, particularly if you have a lot of content being formatted. If you choose to use this - function you may want to consider `caching <../general/caching>` your + function you may want to consider :doc:`caching <../general/caching>` your pages. diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 6fb0dd942..435a21df4 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -18,11 +18,11 @@ This helper is loaded using the following code:: $this->load->helper('url'); -The following functions are available: - Available Functions =================== +The following functions are available: + .. php:function:: site_url([$uri = ''[, $protocol = NULL]]) :param string $uri: URI string @@ -360,7 +360,7 @@ Available Functions is outputted to the browser since it utilizes server headers. .. note:: For very fine grained control over headers, you should use the - `Output Library ` ``set_header()`` method. + :doc:`Output Library ` ``set_header()`` method. .. note:: To IIS users: if you hide the `Server` HTTP header, the *auto* method won't detect IIS, in that case it is advised you explicitly -- cgit v1.2.3-24-g4f1b From 0a840c6768de97a489062307e72aa16a608d7942 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 16 May 2016 13:20:54 +0300 Subject: [ci skip] Correct an erroneous step in 2.0.3 to 2.1.0 upgrade instructions --- user_guide_src/source/installation/upgrade_210.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_210.rst b/user_guide_src/source/installation/upgrade_210.rst index 5874bfc86..866dcf4ae 100644 --- a/user_guide_src/source/installation/upgrade_210.rst +++ b/user_guide_src/source/installation/upgrade_210.rst @@ -13,11 +13,11 @@ Replace all files and directories in your "system" folder. .. note:: If you have any custom developed files in these folders please make copies of them first. -Step 2: Replace config/user_agents.php -====================================== +Step 2: Replace config/mimes.php +================================ This config file has been updated to contain more user agent types, -please copy it to _application/config/user_agents.php*. +please copy it to _application/config/mimes.php*. Step 3: Update your user guide ============================== -- cgit v1.2.3-24-g4f1b From 0fae625de48885b565362fe5d62cd6ce4fd76faa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 17 May 2016 13:46:55 +0300 Subject: Fix #4633 --- system/libraries/Form_validation.php | 132 ++++++++++----------- .../codeigniter/libraries/Form_validation_test.php | 2 +- user_guide_src/source/changelog.rst | 1 + 3 files changed, 63 insertions(+), 72 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index e4a518957..f5b07a205 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -493,6 +493,63 @@ class CI_Form_validation { // -------------------------------------------------------------------- + /** + * Prepare rules + * + * Re-orders the provided rules in order of importance, so that + * they can easily be executed later without weird checks ... + * + * "Callbacks" are given the highest priority (always called), + * followed by 'required' (called if callbacks didn't fail), + * and then every next rule depends on the previous one passing. + * + * @param array $rules + * @return array + */ + protected function _prepare_rules($rules) + { + $new_rules = array(); + $callbacks = array(); + + foreach ($rules as &$rule) + { + // Let 'required' always be the first (non-callback) rule + if ($rule === 'required') + { + array_unshift($new_rules, 'required'); + } + // 'isset' is a kind of a weird alias for 'required' ... + elseif ($rule === 'isset' && (empty($new_rules) OR $new_rules[0] !== 'required')) + { + array_unshift($new_rules, 'isset'); + } + // The old/classic 'callback_'-prefixed rules + elseif (is_string($rule) && strncmp('callback_', $rule, 9) === 0) + { + $callbacks[] = $rule; + } + // Proper callables + elseif (is_callable($rule)) + { + $callbacks[] = $rule; + } + // "Named" callables; i.e. array('name' => $callable) + elseif (is_array($rule) && isset($rule[0], $rule[1]) && is_callable($rule[1])) + { + $callbacks[] = $rule; + } + // Everything else goes at the end of the queue + else + { + $new_rules[] = $rule; + } + } + + return array_merge($callbacks, $new_rules); + } + + // -------------------------------------------------------------------- + /** * Traverse a multidimensional $_POST array index until the data is found * @@ -580,70 +637,7 @@ class CI_Form_validation { return; } - // If the field is blank, but NOT required, no further tests are necessary - $callback = FALSE; - if ( ! in_array('required', $rules) && ($postdata === NULL OR $postdata === '')) - { - // Before we bail out, does the rule contain a callback? - foreach ($rules as &$rule) - { - if (is_string($rule)) - { - if (strncmp($rule, 'callback_', 9) === 0) - { - $callback = TRUE; - $rules = array(1 => $rule); - break; - } - } - elseif (is_callable($rule)) - { - $callback = TRUE; - $rules = array(1 => $rule); - break; - } - elseif (is_array($rule) && isset($rule[0], $rule[1]) && is_callable($rule[1])) - { - $callback = TRUE; - $rules = array(array($rule[0], $rule[1])); - break; - } - } - - if ( ! $callback) - { - return; - } - } - - // Isset Test. Typically this rule will only apply to checkboxes. - if (($postdata === NULL OR $postdata === '') && ! $callback) - { - if (in_array('isset', $rules, TRUE) OR in_array('required', $rules)) - { - // Set the message type - $type = in_array('required', $rules) ? 'required' : 'isset'; - - $line = $this->_get_error_message($type, $row['field']); - - // Build the error message - $message = $this->_build_error_msg($line, $this->_translate_fieldname($row['label'])); - - // Save the error message - $this->_field_data[$row['field']]['error'] = $message; - - if ( ! isset($this->_error_array[$row['field']])) - { - $this->_error_array[$row['field']] = $message; - } - } - - return; - } - - // -------------------------------------------------------------------- - - // Cycle through each rule and run it + $rules = $this->_prepare_rules($rules); foreach ($rules as $rule) { $_in_array = FALSE; @@ -740,12 +734,6 @@ class CI_Form_validation { { $this->_field_data[$row['field']]['postdata'] = is_bool($result) ? $postdata : $result; } - - // If the field isn't required and we just processed a callback we'll move on... - if ( ! in_array('required', $rules, TRUE) && $result !== FALSE) - { - continue; - } } elseif ( ! method_exists($this, $rule)) { @@ -1055,7 +1043,9 @@ class CI_Form_validation { */ public function required($str) { - return is_array($str) ? (bool) count($str) : (trim($str) !== ''); + return is_array($str) + ? (empty($str) === FALSE) + : (trim($str) !== ''); } // -------------------------------------------------------------------- diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 3537eb355..d11d616ad 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -55,9 +55,9 @@ class Form_validation_test extends CI_TestCase { ); $values_base = array('foo' => 'sample'); - $this->assertTrue($this->run_rules($rules, array_merge($values_base, array('bar' => '')))); $this->assertTrue($this->run_rules($rules, array_merge($values_base, array('bar' => 'sample')))); + $this->assertFalse($this->run_rules($rules, array_merge($values_base, array('bar' => '')))); $this->assertFalse($this->run_rules($rules, array_merge($values_base, array('bar' => 'Sample')))); $this->assertFalse($this->run_rules($rules, array_merge($values_base, array('bar' => ' sample')))); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 567eb10a6..eb36b0d1e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4563) - :doc:`Input Library ` method ``request_headers()`` ignores ``$xss_clean`` parameter value after first call. - Fixed a bug (#4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it. - Fixed a bug (#4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled. +- Fixed a bug (#4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From b3bac2497aaacb702921dfe89c5f43969257ff53 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 19 May 2016 01:12:33 -0700 Subject: Fix typo in inflector helper writeup. Reported by email from Jessie Rubi Signed-off-by:Master Yoda --- user_guide_src/source/helpers/inflector_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index ed1e2b30f..17dab57bf 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -38,7 +38,7 @@ The following functions are available: .. php:function:: plural($str) :param string $str: Input string - :returns: A plular word + :returns: A plural word :rtype: string Changes a singular word to plural. Example:: -- cgit v1.2.3-24-g4f1b From b076b5651c028e1c92f8d1bfad0f27a13839378a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 19 May 2016 12:11:55 +0300 Subject: Merge pull request #4635 from jim-parry/fix-userguide [ci skip] Fix a typo in inflector helper docs --- user_guide_src/source/helpers/inflector_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index ed1e2b30f..17dab57bf 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -38,7 +38,7 @@ The following functions are available: .. php:function:: plural($str) :param string $str: Input string - :returns: A plular word + :returns: A plural word :rtype: string Changes a singular word to plural. Example:: -- cgit v1.2.3-24-g4f1b From 45520a5a0b57490e1c8c5e031bce61e0dc4851e5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 19 May 2016 18:51:25 +0300 Subject: [ci skip] Fix #4637 --- system/database/drivers/oci8/oci8_driver.php | 20 +++++++++++++------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 59f0e8456..60fab7578 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -559,23 +559,29 @@ class CI_DB_oci8_driver extends CI_DB { */ public function error() { - /* oci_error() returns an array that already contains the - * 'code' and 'message' keys, so we can just return it. - */ + // oci_error() returns an array that already contains + // 'code' and 'message' keys, but it can return false + // if there was no error .... if (is_resource($this->curs_id)) { - return oci_error($this->curs_id); + $error = oci_error($this->curs_id); } elseif (is_resource($this->stmt_id)) { - return oci_error($this->stmt_id); + $error = oci_error($this->stmt_id); } elseif (is_resource($this->conn_id)) { - return oci_error($this->conn_id); + $error = oci_error($this->conn_id); + } + else + { + $error = oci_error(); } - return oci_error(); + return is_array($error) + ? $error + : array('code' => '', 'message'); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index eb36b0d1e..7d1d961c0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -29,6 +29,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it. - Fixed a bug (#4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled. - Fixed a bug (#4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields. +- Fixed a bug (#4637) - :doc:`Database ` method `error()` returned ``FALSE`` with the 'oci8' driver if there was no error. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From cadcef85a218595b5999442d669086bdb5628947 Mon Sep 17 00:00:00 2001 From: Kasim Tan Date: Thu, 19 May 2016 12:06:07 -0700 Subject: Fixed PHPDoc parameter name and type discrepancies --- system/core/Loader.php | 2 +- system/core/Log.php | 2 +- system/core/Output.php | 2 +- system/core/compat/standard.php | 2 +- system/helpers/form_helper.php | 2 +- system/libraries/Cache/drivers/Cache_apc.php | 2 +- system/libraries/Session/Session.php | 2 +- system/libraries/Upload.php | 2 +- tests/mocks/database/drivers/mysql.php | 1 - tests/mocks/database/drivers/mysqli.php | 1 - tests/mocks/database/drivers/pdo.php | 1 - tests/mocks/database/drivers/postgre.php | 1 - tests/mocks/database/drivers/sqlite.php | 1 - 13 files changed, 8 insertions(+), 13 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index c742ae71a..d2c350816 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -1106,7 +1106,7 @@ class CI_Loader { * @used-by CI_Loader::_ci_load_library() * @uses CI_Loader::_ci_init_library() * - * @param string $library Library name to load + * @param string $library_name Library name to load * @param string $file_path Path to the library filename, relative to libraries/ * @param mixed $params Optional parameters to pass to the class constructor * @param string $object_name Optional object name to assign to diff --git a/system/core/Log.php b/system/core/Log.php index 1abdaa00e..986121526 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -237,7 +237,7 @@ class CI_Log { * * @param string $level The error level * @param string $date Formatted date string - * @param string $msg The log message + * @param string $message The log message * @return string Formatted log line with a new line character '\n' at the end */ protected function _format_line($level, $date, $message) diff --git a/system/core/Output.php b/system/core/Output.php index 6e0b4e724..98db212a0 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -285,7 +285,7 @@ class CI_Output { /** * Get Header * - * @param string $header_name + * @param string $header * @return string */ public function get_header($header) diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index 47d47aeff..c54cab951 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -62,7 +62,7 @@ if ( ! function_exists('array_column')) * array_column() * * @link http://php.net/array_column - * @param string $array + * @param array $array * @param mixed $column_key * @param mixed $index_key * @return array diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 3e1039525..dfb9ae2d2 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -568,7 +568,7 @@ if ( ! function_exists('form_label')) * * @param string The text to appear onscreen * @param string The id the label applies to - * @param string Additional attributes + * @param array Additional attributes * @return string */ function form_label($label_text = '', $id = '', $attributes = array()) diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index 07ea8f474..fb8df03a7 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -97,7 +97,7 @@ class CI_Cache_apc extends CI_Driver { * * @param string $id Cache ID * @param mixed $data Data to store - * @param int $ttol Length of time (in seconds) to cache the data + * @param int $ttl Length of time (in seconds) to cache the data * @param bool $raw Whether to store the raw value * @return bool TRUE on success, FALSE on failure */ diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index c9d2e8adc..dde84a775 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -729,7 +729,7 @@ class CI_Session { * * Legacy CI_Session compatibility method * - * @param mixed $data Session data key(s) + * @param mixed $key Session data key(s) * @return void */ public function unset_userdata($key) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index f2418378b..fa365058c 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -286,7 +286,7 @@ class CI_Upload { /** * Constructor * - * @param array $props + * @param array $config * @return void */ public function __construct($config = array()) diff --git a/tests/mocks/database/drivers/mysql.php b/tests/mocks/database/drivers/mysql.php index e0c1fb06c..b7718ebaf 100644 --- a/tests/mocks/database/drivers/mysql.php +++ b/tests/mocks/database/drivers/mysql.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Mysql extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/mysqli.php b/tests/mocks/database/drivers/mysqli.php index 73c35b609..f747aad46 100644 --- a/tests/mocks/database/drivers/mysqli.php +++ b/tests/mocks/database/drivers/mysqli.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Mysqli extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/pdo.php b/tests/mocks/database/drivers/pdo.php index 17768eed7..af1958aea 100644 --- a/tests/mocks/database/drivers/pdo.php +++ b/tests/mocks/database/drivers/pdo.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_PDO extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/postgre.php b/tests/mocks/database/drivers/postgre.php index 5a45115fa..8c91e54a9 100644 --- a/tests/mocks/database/drivers/postgre.php +++ b/tests/mocks/database/drivers/postgre.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Postgre extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/sqlite.php b/tests/mocks/database/drivers/sqlite.php index 512467520..b2aec28e6 100644 --- a/tests/mocks/database/drivers/sqlite.php +++ b/tests/mocks/database/drivers/sqlite.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Sqlite extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ -- cgit v1.2.3-24-g4f1b From e1b9495b7b1b55c8dfd6b602e35b6d5c269c0a90 Mon Sep 17 00:00:00 2001 From: Kasim Tan Date: Fri, 20 May 2016 07:16:14 -0700 Subject: Removed an extra space char --- system/helpers/form_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index dfb9ae2d2..8825ecc2c 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -568,7 +568,7 @@ if ( ! function_exists('form_label')) * * @param string The text to appear onscreen * @param string The id the label applies to - * @param array Additional attributes + * @param array Additional attributes * @return string */ function form_label($label_text = '', $id = '', $attributes = array()) -- cgit v1.2.3-24-g4f1b From e13fa9fdb3f2e311bd7331e49b26889f24bc81cb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 20 May 2016 17:30:07 +0300 Subject: Merge pull request #4638 from kasimtan/phpdoc_fixes [ci skip] Fixed PHPDoc parameter name and type discrepancies --- system/core/Loader.php | 2 +- system/core/Log.php | 2 +- system/core/Output.php | 2 +- system/core/compat/standard.php | 2 +- system/helpers/form_helper.php | 2 +- system/libraries/Cache/drivers/Cache_apc.php | 2 +- system/libraries/Session/Session.php | 2 +- system/libraries/Upload.php | 2 +- tests/mocks/database/drivers/mysql.php | 1 - tests/mocks/database/drivers/mysqli.php | 1 - tests/mocks/database/drivers/pdo.php | 1 - tests/mocks/database/drivers/postgre.php | 1 - tests/mocks/database/drivers/sqlite.php | 1 - 13 files changed, 8 insertions(+), 13 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index c742ae71a..d2c350816 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -1106,7 +1106,7 @@ class CI_Loader { * @used-by CI_Loader::_ci_load_library() * @uses CI_Loader::_ci_init_library() * - * @param string $library Library name to load + * @param string $library_name Library name to load * @param string $file_path Path to the library filename, relative to libraries/ * @param mixed $params Optional parameters to pass to the class constructor * @param string $object_name Optional object name to assign to diff --git a/system/core/Log.php b/system/core/Log.php index 1abdaa00e..986121526 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -237,7 +237,7 @@ class CI_Log { * * @param string $level The error level * @param string $date Formatted date string - * @param string $msg The log message + * @param string $message The log message * @return string Formatted log line with a new line character '\n' at the end */ protected function _format_line($level, $date, $message) diff --git a/system/core/Output.php b/system/core/Output.php index ec9c21b91..06ff1011c 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -285,7 +285,7 @@ class CI_Output { /** * Get Header * - * @param string $header_name + * @param string $header * @return string */ public function get_header($header) diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index 47d47aeff..c54cab951 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -62,7 +62,7 @@ if ( ! function_exists('array_column')) * array_column() * * @link http://php.net/array_column - * @param string $array + * @param array $array * @param mixed $column_key * @param mixed $index_key * @return array diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 3e1039525..8825ecc2c 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -568,7 +568,7 @@ if ( ! function_exists('form_label')) * * @param string The text to appear onscreen * @param string The id the label applies to - * @param string Additional attributes + * @param array Additional attributes * @return string */ function form_label($label_text = '', $id = '', $attributes = array()) diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index 07ea8f474..fb8df03a7 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -97,7 +97,7 @@ class CI_Cache_apc extends CI_Driver { * * @param string $id Cache ID * @param mixed $data Data to store - * @param int $ttol Length of time (in seconds) to cache the data + * @param int $ttl Length of time (in seconds) to cache the data * @param bool $raw Whether to store the raw value * @return bool TRUE on success, FALSE on failure */ diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 1bdc6e5cc..3b391a8ef 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -730,7 +730,7 @@ class CI_Session { * * Legacy CI_Session compatibility method * - * @param mixed $data Session data key(s) + * @param mixed $key Session data key(s) * @return void */ public function unset_userdata($key) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index f2418378b..fa365058c 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -286,7 +286,7 @@ class CI_Upload { /** * Constructor * - * @param array $props + * @param array $config * @return void */ public function __construct($config = array()) diff --git a/tests/mocks/database/drivers/mysql.php b/tests/mocks/database/drivers/mysql.php index e0c1fb06c..b7718ebaf 100644 --- a/tests/mocks/database/drivers/mysql.php +++ b/tests/mocks/database/drivers/mysql.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Mysql extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/mysqli.php b/tests/mocks/database/drivers/mysqli.php index 73c35b609..f747aad46 100644 --- a/tests/mocks/database/drivers/mysqli.php +++ b/tests/mocks/database/drivers/mysqli.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Mysqli extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/pdo.php b/tests/mocks/database/drivers/pdo.php index 17768eed7..af1958aea 100644 --- a/tests/mocks/database/drivers/pdo.php +++ b/tests/mocks/database/drivers/pdo.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_PDO extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/postgre.php b/tests/mocks/database/drivers/postgre.php index 5a45115fa..8c91e54a9 100644 --- a/tests/mocks/database/drivers/postgre.php +++ b/tests/mocks/database/drivers/postgre.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Postgre extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ diff --git a/tests/mocks/database/drivers/sqlite.php b/tests/mocks/database/drivers/sqlite.php index 512467520..b2aec28e6 100644 --- a/tests/mocks/database/drivers/sqlite.php +++ b/tests/mocks/database/drivers/sqlite.php @@ -5,7 +5,6 @@ class Mock_Database_Drivers_Sqlite extends Mock_Database_DB_Driver { /** * Instantiate the database driver * - * @param string DB Driver class name * @param array DB configuration to set * @return void */ -- cgit v1.2.3-24-g4f1b From ad20f71b0395d8fadd417b3a2b580b6c53a80000 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 25 May 2016 09:58:03 +0300 Subject: Amend fix for #4637 --- system/database/drivers/oci8/oci8_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 60fab7578..df7e0848a 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -581,7 +581,7 @@ class CI_DB_oci8_driver extends CI_DB { return is_array($error) ? $error - : array('code' => '', 'message'); + : array('code' => '', 'message' => ''); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 9e78be0d736ed0caab396f58109ce1db7169d727 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 25 May 2016 10:54:36 +0300 Subject: Fix #4639 Really fix #4633 --- system/libraries/Form_validation.php | 11 +++++++++++ tests/codeigniter/libraries/Form_validation_test.php | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index f5b07a205..04445f5b7 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -696,6 +696,17 @@ class CI_Form_validation { $param = $match[2]; } + // Ignore empty, non-required inputs with a few exceptions ... + if ( + ($postdata === NULL OR $postdata === '') + && $callback === FALSE + && $callable === FALSE + && ! in_array($rule, array('required', 'isset', 'matches'), TRUE) + ) + { + continue; + } + // Call the function that corresponds to the rule if ($callback OR $callable !== FALSE) { diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index d11d616ad..b87ca65ff 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -40,11 +40,22 @@ class Form_validation_test extends CI_TestCase { public function test_rule_required() { - $rules = array(array('field' => 'foo', 'label' => 'foo_label', 'rules' => 'required')); - $this->assertTrue($this->run_rules($rules, array('foo' => 'bar'))); + $rules = array(array('field' => 'foo', 'label' => 'Foo', 'rules' => 'is_numeric')); + // Empty, not required + $this->assertTrue($this->run_rules($rules, array('foo' => ''))); + + + // Not required, but also not empty + $this->assertTrue($this->run_rules($rules, array('foo' => '123'))); + $this->assertFalse($this->run_rules($rules, array('foo' => 'bar'))); + + // Required variations + $rules[0]['rules'] .= '|required'; + $this->assertTrue($this->run_rules($rules, array('foo' => '123'))); $this->assertFalse($this->run_rules($rules, array('foo' => ''))); $this->assertFalse($this->run_rules($rules, array('foo' => ' '))); + $this->assertFalse($this->run_rules($rules, array('foo' => 'bar'))); } public function test_rule_matches() -- cgit v1.2.3-24-g4f1b From 75794bccae31233bb7f8e12915f42562ac4eb295 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 25 May 2016 12:58:30 +0300 Subject: [ci skip] Add 'LONGTEXT' to 'STRING' alias to CUBRID drivers for DBForge Requested in #4640 --- system/database/drivers/cubrid/cubrid_forge.php | 3 +++ system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php | 3 +++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 7 insertions(+) diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 8262beb6b..46a3b2185 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -178,6 +178,9 @@ class CI_DB_cubrid_forge extends CI_DB_forge { $attributes['TYPE'] = 'INTEGER'; $attributes['UNSIGNED'] = FALSE; return; + case 'LONGTEXT': + $attributes['TYPE'] = 'STRING'; + return; default: return; } } diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index 5f854061d..b5b95078e 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -178,6 +178,9 @@ class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { $attributes['TYPE'] = 'INTEGER'; $attributes['UNSIGNED'] = FALSE; return; + case 'LONGTEXT': + $attributes['TYPE'] = 'STRING'; + return; default: return; } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7d1d961c0..471e78f53 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,6 +12,7 @@ Release Date: Not Released - Updated :doc:`Image Manipulation Library ` to validate *width* and *height* configuration values. - Updated :doc:`Encryption Library ` to always prefer ``random_bytes()`` when it is available. - Updated :doc:`Session Library ` to log 'debug' messages when using fallbacks to *session.save_path* (php.ini) or 'sess_use_database', 'sess_table_name' settings. + - Added a 'LONGTEXT' to 'STRING' alias to :doc:`Database Forge ` for the 'cubrid', 'pdo/cubrid' drivers. - :php:func:`password_hash()` :doc:`compatibility function ` changes: -- cgit v1.2.3-24-g4f1b From 21a41ba37b9248291939cf4c801ac0f27982668e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 25 May 2016 15:27:39 +0300 Subject: [ci skip] Refactor changes from PR #4585 Related: #4583 --- system/libraries/Email.php | 165 +++++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 95 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 4fd1107c5..21b62fea0 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -253,27 +253,6 @@ class CI_Email { */ protected $_finalbody = ''; - /** - * multipart/alternative boundary - * - * @var string - */ - protected $_alt_boundary = ''; - - /** - * Attachment boundary - * - * @var string - */ - protected $_atc_boundary = ''; - - /** - * Related Attachment boundary - * - * @var string - */ - protected $_rel_boundary = ''; - /** * Final headers to send * @@ -933,20 +912,6 @@ class CI_Email { // -------------------------------------------------------------------- - /** - * Set Message Boundary - * - * @return void - */ - protected function _set_boundaries() - { - $this->_alt_boundary = 'B_ALT_'.uniqid(''); // multipart/alternative - $this->_atc_boundary = 'B_ATC_'.uniqid(''); // attachment boundary - $this->_rel_boundary = 'B_REL_'.uniqid(''); // related attachment boundary - } - - // -------------------------------------------------------------------- - /** * Get the Message ID * @@ -1014,9 +979,9 @@ class CI_Email { { if ($this->mailtype === 'html') { - return (count($this->_attachments) === 0) ? 'html' : 'html-attach'; + return empty($this->_attachments) ? 'html' : 'html-attach'; } - elseif ($this->mailtype === 'text' && count($this->_attachments) > 0) + elseif ($this->mailtype === 'text' && ! empty($this->_attachments)) { return 'plain-attach'; } @@ -1322,7 +1287,6 @@ class CI_Email { $this->_body = $this->word_wrap($this->_body); } - $this->_set_boundaries(); $this->_write_headers(); $hdr = ($this->_get_protocol() === 'mail') ? $this->newline : ''; @@ -1330,7 +1294,7 @@ class CI_Email { switch ($this->_get_content_type()) { - case 'plain' : + case 'plain': $hdr .= 'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding(); @@ -1347,7 +1311,7 @@ class CI_Email { return; - case 'html' : + case 'html': if ($this->send_multipart === FALSE) { @@ -1356,14 +1320,16 @@ class CI_Email { } else { - $hdr .= 'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"'; + $boundary = uniqid('B_ALT_'); + $hdr .= 'Content-Type: multipart/alternative; boundary="'.$boundary.'"'; $body .= $this->_get_mime_message().$this->newline.$this->newline - .'--'.$this->_alt_boundary.$this->newline + .'--'.$boundary.$this->newline .'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline.$this->newline - .$this->_get_alt_message().$this->newline.$this->newline.'--'.$this->_alt_boundary.$this->newline + .$this->_get_alt_message().$this->newline.$this->newline + .'--'.$boundary.$this->newline .'Content-Type: text/html; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: quoted-printable'.$this->newline.$this->newline; @@ -1382,14 +1348,15 @@ class CI_Email { if ($this->send_multipart !== FALSE) { - $this->_finalbody .= '--'.$this->_alt_boundary.'--'; + $this->_finalbody .= '--'.$boundary.'--'; } return; - case 'plain-attach' : + case 'plain-attach': - $hdr .= 'Content-Type: multipart/mixed; boundary="'.$this->_atc_boundary.'"'; + $boundary = uniqid('B_ATC_'); + $hdr .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'; if ($this->_get_protocol() === 'mail') { @@ -1398,29 +1365,32 @@ class CI_Email { $body .= $this->_get_mime_message().$this->newline .$this->newline - .'--'.$this->_atc_boundary.$this->newline + .'--'.$boundary.$this->newline .'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline .$this->newline .$this->_body.$this->newline.$this->newline; - $body .= $this->_prep_attachments($this->_attachments, $this->_atc_boundary); + $this->_append_attachments($body, $boundary); break; - case 'html-attach' : + case 'html-attach': - $attachments_indexed_by_multipart = $this->_attachments_indexed_by_multipart(); + $alt_boundary = uniqid('B_ALT_'); $last_boundary = NULL; - if ( ! empty($attachments_indexed_by_multipart['mixed'])) + if ($this->_attachments_have_multipart('mixed')) { - $hdr .= 'Content-Type: multipart/mixed; boundary="'.$this->_atc_boundary.'"'; - $last_boundary = $this->_atc_boundary; + $atc_boundary = uniqid('B_ATC_'); + $hdr .= 'Content-Type: multipart/mixed; boundary="'.$atc_boundary.'"'; + $last_boundary = $atc_boundary; } - if ( ! empty($attachments_indexed_by_multipart['related'])) + if ($this->_attachments_have_multipart('related')) { - $rel_boundary_header = 'Content-Type: multipart/related; boundary="'.$this->_rel_boundary.'"'; + $rel_boundary = uniqid('B_REL_'); + $rel_boundary_header = 'Content-Type: multipart/related; boundary="'.$rel_boundary.'"'; + if (isset($last_boundary)) { $body .= '--'.$last_boundary.$this->newline.$rel_boundary_header; @@ -1429,7 +1399,8 @@ class CI_Email { { $hdr .= $rel_boundary_header; } - $last_boundary = $this->_rel_boundary; + + $last_boundary = $rel_boundary; } if ($this->_get_protocol() === 'mail') @@ -1441,24 +1412,32 @@ class CI_Email { $body .= $this->_get_mime_message().$this->newline.$this->newline .'--'.$last_boundary.$this->newline - .'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"'.$this->newline.$this->newline - .'--'.$this->_alt_boundary.$this->newline + .'Content-Type: multipart/alternative; boundary="'.$alt_boundary.'"'.$this->newline.$this->newline + .'--'.$alt_boundary.$this->newline .'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline.$this->newline - .$this->_get_alt_message().$this->newline.$this->newline.'--'.$this->_alt_boundary.$this->newline + .$this->_get_alt_message().$this->newline.$this->newline + .'--'.$alt_boundary.$this->newline .'Content-Type: text/html; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: quoted-printable'.$this->newline.$this->newline .$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline - .'--'.$this->_alt_boundary.'--'.$this->newline.$this->newline; + .'--'.$alt_boundary.'--'.$this->newline.$this->newline; - ( ! empty($attachments_indexed_by_multipart['related'])) && $body .= $this->newline.$this->newline - .$this->_prep_attachments($attachments_indexed_by_multipart['related'], $this->_rel_boundary); + // multipart/mixed attachments + if ( ! empty($atc_boundary)) + { + $body .= $this->newline.$this->newline; + $this->_append_attachments($body, $atc_boundary, 'mixed'); + } - ( ! empty($attachments_indexed_by_multipart['mixed'])) && $body .= $this->newline.$this->newline - .$this->_prep_attachments($attachments_indexed_by_multipart['mixed'], $this->_atc_boundary); + if ( ! empty($rel_boundary)) + { + $body .= $this->newline.$this->newline; + $this->_append_attachments($body, $rel_boundary, 'related'); + } break; } @@ -1472,21 +1451,17 @@ class CI_Email { // -------------------------------------------------------------------- - /** - * Returns attachments mapped by multipart type - * - * @return array - */ - protected function _attachments_indexed_by_multipart() + protected function _attachments_have_multipart($type) { - foreach ($this->_attachments as $attachment) + foreach ($this->_attachments as &$attachment) { - $multipart = $attachment['multipart']; - isset($attachments_indexed[$multipart]) OR $attachments_indexed[$multipart] = array(); - $attachments_indexed[$multipart][] = $attachment; + if ($attachment[$i]['multipart'] === $type) + { + return TRUE; + } } - return $attachments_indexed; + return FALSE; } // -------------------------------------------------------------------- @@ -1494,35 +1469,35 @@ class CI_Email { /** * Prepares attachment string * - * @param array $attachments - * @param string $boundary Multipart boundary string + * @param string $body Message body to append to + * @param string $boundary Multipart boundary + * @param string $multipart When provided, only attachments of this type will be processed * @return string */ - protected function _prep_attachments($attachments, $boundary) + protected function _append_attachments(&$body, $boundary, $multipart = null) { - if (empty($attachments)) + for ($i = 0, $c = count($this->_attachments); $i < $c; $i++) { - return ''; - } + if (isset($multipart) && $this->_attachments[$i]['multipart'] !== $multipart) + { + continue; + } - $attachment = array(); - for ($i = 0, $c = count($attachments), $z = 0; $i < $c; $i++) - { - $filename = $attachments[$i]['name'][0]; - $basename = ($attachments[$i]['name'][1] === NULL) - ? basename($filename) : $attachments[$i]['name'][1]; + $name = isset($this->_attachments[$i]['name'][1]) + ? $this->_attachments[$i]['name'][1] + : basename($this->_attachments[$i]['name'][0]); - $attachment[$z++] = '--'.$boundary.$this->newline - .'Content-type: '.$attachments[$i]['type'].'; ' - .'name="'.$basename.'"'.$this->newline - .'Content-Disposition: '.$attachments[$i]['disposition'].';'.$this->newline + $body .= '--'.$boundary.$this->newline + .'Content-Type: '.$this->_attachments[$i]['type'].'; name="'.$name.'"'.$this->newline + .'Content-Disposition: '.$this->_attachments[$i]['disposition'].';'.$this->newline .'Content-Transfer-Encoding: base64'.$this->newline - .(empty($attachments[$i]['cid']) ? '' : 'Content-ID: <'.$attachments[$i]['cid'].'>'.$this->newline); - - $attachment[$z++] = $attachments[$i]['content']; + .(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline.$this->newline) + .$this->_attachments[$i]['content'].$this->newline; } - return implode($this->newline, $attachment).$this->newline.'--'.$boundary.'--'; + // $name won't be set if no attachments were appended, + // and therefore a boundary wouldn't be necessary + empty($name) OR $body .= '--'.$boundary.'--'; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From df70014e4be5b7d45c123adecd194b457ffb971b Mon Sep 17 00:00:00 2001 From: el-ma Date: Wed, 25 May 2016 18:03:28 +0300 Subject: added "Alexa Crawler" --- application/config/user_agents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 721ec08d3..f520df9bd 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -208,5 +208,6 @@ $robots = array( 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler', 'adsbot-google' => 'AdsBot Google', 'feedfetcher-google' => 'Feedfetcher Google', - 'curious george' => 'Curious George' + 'curious george' => 'Curious George', + 'ia_archiver' => 'Alexa Crawler' ); -- cgit v1.2.3-24-g4f1b From c0d1b651fb44742711180465a6b677b1cf538137 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 25 May 2016 18:12:46 +0300 Subject: Merge pull request #4646 from el-ma/develop [ci skip] Add "Alexa Crawler" to robots --- application/config/user_agents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 1129dbacd..e5954e988 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -207,5 +207,6 @@ $robots = array( 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler', 'adsbot-google' => 'AdsBot Google', 'feedfetcher-google' => 'Feedfetcher Google', - 'curious george' => 'Curious George' + 'curious george' => 'Curious George', + 'ia_archiver' => 'Alexa Crawler' ); -- cgit v1.2.3-24-g4f1b From 5bdcdd1f6c263ecdccabeb20f313215fb8532b88 Mon Sep 17 00:00:00 2001 From: el-ma Date: Thu, 26 May 2016 09:34:16 +0300 Subject: Update robots in config/user_agents.php Added Majestic-12 and Uptimebot --- application/config/user_agents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index f520df9bd..1359bbea9 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -209,5 +209,7 @@ $robots = array( 'adsbot-google' => 'AdsBot Google', 'feedfetcher-google' => 'Feedfetcher Google', 'curious george' => 'Curious George', - 'ia_archiver' => 'Alexa Crawler' + 'ia_archiver' => 'Alexa Crawler', + 'MJ12bot' => 'Majestic-12', + 'Uptimebot' => 'Uptimebot' ); -- cgit v1.2.3-24-g4f1b From e84a1f5814cc1c6dcfb20ab768e394720d42741b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 26 May 2016 10:09:37 +0300 Subject: Fix #4647 --- system/database/DB_query_builder.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index c862d937d..84346a6ed 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1395,7 +1395,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_orderby = NULL; } - $result = ($this->qb_distinct === TRUE) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby)) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 471e78f53..27b49f915 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -31,6 +31,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled. - Fixed a bug (#4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields. - Fixed a bug (#4637) - :doc:`Database ` method `error()` returned ``FALSE`` with the 'oci8' driver if there was no error. +- Fixed a bug (#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. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From c6b01c8b602a8bb458f2817494f54c414ef40c8a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 26 May 2016 10:24:32 +0300 Subject: Merge pull request #4648 from el-ma/develop [ci skip] Add two more robots to config/user_agents.php --- application/config/user_agents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index e5954e988..798086b65 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -208,5 +208,7 @@ $robots = array( 'adsbot-google' => 'AdsBot Google', 'feedfetcher-google' => 'Feedfetcher Google', 'curious george' => 'Curious George', - 'ia_archiver' => 'Alexa Crawler' + 'ia_archiver' => 'Alexa Crawler', + 'MJ12bot' => 'Majestic-12', + 'Uptimebot' => 'Uptimebot' ); -- cgit v1.2.3-24-g4f1b From d680779debb08d1e50fb234ceb63a75b1a2710ed Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 26 May 2016 10:28:04 +0300 Subject: [ci skip] Fix a minor Redis Session bug --- system/libraries/Session/drivers/Session_redis_driver.php | 2 +- user_guide_src/source/changelog.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index e4e09fe0d..8db74c0ca 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -255,7 +255,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle if ($this->_redis->ping() === '+PONG') { $this->_release_lock(); - if ($this->_redis->close() === $this->_failure) + if ($this->_redis->close() === FALSE) { return $this->_fail(); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 27b49f915..c86693d32 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,7 +11,7 @@ Release Date: Not Released - Updated :doc:`Image Manipulation Library ` to validate *width* and *height* configuration values. - Updated :doc:`Encryption Library ` to always prefer ``random_bytes()`` when it is available. - - Updated :doc:`Session Library ` to log 'debug' messages when using fallbacks to *session.save_path* (php.ini) or 'sess_use_database', 'sess_table_name' settings. + - Updated :doc:`Session Library ` to log 'debug' messages when using fallbacks to *session.save_path* (php.ini) or 'sess_use_database', 'sess_table_name' settings. - Added a 'LONGTEXT' to 'STRING' alias to :doc:`Database Forge ` for the 'cubrid', 'pdo/cubrid' drivers. - :php:func:`password_hash()` :doc:`compatibility function ` changes: @@ -32,6 +32,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields. - Fixed a bug (#4637) - :doc:`Database ` method `error()` returned ``FALSE`` with the 'oci8' driver if there was no error. - Fixed a bug (#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. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From e341601efed83a2c9cdca72de30de43a7ae12e1d Mon Sep 17 00:00:00 2001 From: Robert Angyal Date: Sat, 4 Jun 2016 12:12:28 +0200 Subject: Update Email.php --- system/libraries/Email.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 21b62fea0..0a55e1841 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1426,17 +1426,17 @@ class CI_Email { .$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline .'--'.$alt_boundary.'--'.$this->newline.$this->newline; - // multipart/mixed attachments - if ( ! empty($atc_boundary)) + if ( ! empty($rel_boundary)) { $body .= $this->newline.$this->newline; - $this->_append_attachments($body, $atc_boundary, 'mixed'); + $this->_append_attachments($body, $rel_boundary, 'related'); } - if ( ! empty($rel_boundary)) + // multipart/mixed attachments + if ( ! empty($atc_boundary)) { $body .= $this->newline.$this->newline; - $this->_append_attachments($body, $rel_boundary, 'related'); + $this->_append_attachments($body, $atc_boundary, 'mixed'); } break; @@ -1455,7 +1455,7 @@ class CI_Email { { foreach ($this->_attachments as &$attachment) { - if ($attachment[$i]['multipart'] === $type) + if ($attachment['multipart'] === $type) { return TRUE; } -- cgit v1.2.3-24-g4f1b From 3c42279598dfdd4832b1411f4a94355f2025db4b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Jun 2016 09:44:50 +0300 Subject: Merge branch 'feature/email-attachments' into develop --- system/libraries/Email.php | 194 +++++++++++++++++++++++++++------------------ 1 file changed, 117 insertions(+), 77 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 6ff3efad9..f8772c656 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -149,13 +149,6 @@ class CI_Email { */ public $charset = 'UTF-8'; - /** - * Multipart message - * - * @var string 'mixed' (in the body) or 'related' (separate) - */ - public $multipart = 'mixed'; // "mixed" (in the body) or "related" (separate) - /** * Alternative message (for HTML messages only) * @@ -260,20 +253,6 @@ class CI_Email { */ protected $_finalbody = ''; - /** - * multipart/alternative boundary - * - * @var string - */ - protected $_alt_boundary = ''; - - /** - * Attachment boundary - * - * @var string - */ - protected $_atc_boundary = ''; - /** * Final headers to send * @@ -743,7 +722,8 @@ class CI_Email { 'name' => array($file, $newname), 'disposition' => empty($disposition) ? 'attachment' : $disposition, // Can also be 'inline' Not sure if it matters 'type' => $mime, - 'content' => chunk_split(base64_encode($file_content)) + 'content' => chunk_split(base64_encode($file_content)), + 'multipart' => 'mixed' ); return $this; @@ -761,15 +741,11 @@ class CI_Email { */ public function attachment_cid($filename) { - if ($this->multipart !== 'related') - { - $this->multipart = 'related'; // Thunderbird need this for inline images - } - for ($i = 0, $c = count($this->_attachments); $i < $c; $i++) { if ($this->_attachments[$i]['name'][0] === $filename) { + $this->_attachments[$i]['multipart'] = 'related'; $this->_attachments[$i]['cid'] = uniqid(basename($this->_attachments[$i]['name'][0]).'@'); return $this->_attachments[$i]['cid']; } @@ -913,19 +889,6 @@ class CI_Email { // -------------------------------------------------------------------- - /** - * Set Message Boundary - * - * @return void - */ - protected function _set_boundaries() - { - $this->_alt_boundary = 'B_ALT_'.uniqid(''); // multipart/alternative - $this->_atc_boundary = 'B_ATC_'.uniqid(''); // attachment boundary - } - - // -------------------------------------------------------------------- - /** * Get the Message ID * @@ -993,9 +956,9 @@ class CI_Email { { if ($this->mailtype === 'html') { - return (count($this->_attachments) === 0) ? 'html' : 'html-attach'; + return empty($this->_attachments) ? 'html' : 'html-attach'; } - elseif ($this->mailtype === 'text' && count($this->_attachments) > 0) + elseif ($this->mailtype === 'text' && ! empty($this->_attachments)) { return 'plain-attach'; } @@ -1301,7 +1264,6 @@ class CI_Email { $this->_body = $this->word_wrap($this->_body); } - $this->_set_boundaries(); $this->_write_headers(); $hdr = ($this->_get_protocol() === 'mail') ? $this->newline : ''; @@ -1309,7 +1271,7 @@ class CI_Email { switch ($this->_get_content_type()) { - case 'plain' : + case 'plain': $hdr .= 'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding(); @@ -1326,7 +1288,7 @@ class CI_Email { return; - case 'html' : + case 'html': if ($this->send_multipart === FALSE) { @@ -1335,14 +1297,16 @@ class CI_Email { } else { - $hdr .= 'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"'; + $boundary = uniqid('B_ALT_'); + $hdr .= 'Content-Type: multipart/alternative; boundary="'.$boundary.'"'; $body .= $this->_get_mime_message().$this->newline.$this->newline - .'--'.$this->_alt_boundary.$this->newline + .'--'.$boundary.$this->newline .'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline.$this->newline - .$this->_get_alt_message().$this->newline.$this->newline.'--'.$this->_alt_boundary.$this->newline + .$this->_get_alt_message().$this->newline.$this->newline + .'--'.$boundary.$this->newline .'Content-Type: text/html; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: quoted-printable'.$this->newline.$this->newline; @@ -1361,14 +1325,15 @@ class CI_Email { if ($this->send_multipart !== FALSE) { - $this->_finalbody .= '--'.$this->_alt_boundary.'--'; + $this->_finalbody .= '--'.$boundary.'--'; } return; - case 'plain-attach' : + case 'plain-attach': - $hdr .= 'Content-Type: multipart/'.$this->multipart.'; boundary="'.$this->_atc_boundary.'"'; + $boundary = uniqid('B_ATC_'); + $hdr .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'; if ($this->_get_protocol() === 'mail') { @@ -1377,59 +1342,83 @@ class CI_Email { $body .= $this->_get_mime_message().$this->newline .$this->newline - .'--'.$this->_atc_boundary.$this->newline + .'--'.$boundary.$this->newline .'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline .$this->newline .$this->_body.$this->newline.$this->newline; - break; - case 'html-attach' : + $this->_append_attachments($body, $boundary); - $hdr .= 'Content-Type: multipart/'.$this->multipart.'; boundary="'.$this->_atc_boundary.'"'; + break; + case 'html-attach': + + $alt_boundary = uniqid('B_ALT_'); + $last_boundary = NULL; + + if ($this->_attachments_have_multipart('mixed')) + { + $atc_boundary = uniqid('B_ATC_'); + $hdr .= 'Content-Type: multipart/mixed; boundary="'.$atc_boundary.'"'; + $last_boundary = $atc_boundary; + } + + if ($this->_attachments_have_multipart('related')) + { + $rel_boundary = uniqid('B_REL_'); + $rel_boundary_header = 'Content-Type: multipart/related; boundary="'.$rel_boundary.'"'; + + if (isset($last_boundary)) + { + $body .= '--'.$last_boundary.$this->newline.$rel_boundary_header; + } + else + { + $hdr .= $rel_boundary_header; + } + + $last_boundary = $rel_boundary; + } if ($this->_get_protocol() === 'mail') { $this->_header_str .= $hdr; } + strlen($body) && $body .= $this->newline.$this->newline; $body .= $this->_get_mime_message().$this->newline.$this->newline - .'--'.$this->_atc_boundary.$this->newline + .'--'.$last_boundary.$this->newline - .'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"'.$this->newline.$this->newline - .'--'.$this->_alt_boundary.$this->newline + .'Content-Type: multipart/alternative; boundary="'.$alt_boundary.'"'.$this->newline.$this->newline + .'--'.$alt_boundary.$this->newline .'Content-Type: text/plain; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline.$this->newline - .$this->_get_alt_message().$this->newline.$this->newline.'--'.$this->_alt_boundary.$this->newline + .$this->_get_alt_message().$this->newline.$this->newline + .'--'.$alt_boundary.$this->newline .'Content-Type: text/html; charset='.$this->charset.$this->newline .'Content-Transfer-Encoding: quoted-printable'.$this->newline.$this->newline .$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline - .'--'.$this->_alt_boundary.'--'.$this->newline.$this->newline; + .'--'.$alt_boundary.'--'.$this->newline.$this->newline; - break; - } - - $attachment = array(); - for ($i = 0, $c = count($this->_attachments), $z = 0; $i < $c; $i++) - { - $filename = $this->_attachments[$i]['name'][0]; - $basename = ($this->_attachments[$i]['name'][1] === NULL) - ? basename($filename) : $this->_attachments[$i]['name'][1]; + if ( ! empty($rel_boundary)) + { + $body .= $this->newline.$this->newline; + $this->_append_attachments($body, $rel_boundary, 'related'); + } - $attachment[$z++] = '--'.$this->_atc_boundary.$this->newline - .'Content-type: '.$this->_attachments[$i]['type'].'; ' - .'name="'.$basename.'"'.$this->newline - .'Content-Disposition: '.$this->_attachments[$i]['disposition'].';'.$this->newline - .'Content-Transfer-Encoding: base64'.$this->newline - .(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline); + // multipart/mixed attachments + if ( ! empty($atc_boundary)) + { + $body .= $this->newline.$this->newline; + $this->_append_attachments($body, $atc_boundary, 'mixed'); + } - $attachment[$z++] = $this->_attachments[$i]['content']; + break; } - $body .= implode($this->newline, $attachment).$this->newline.'--'.$this->_atc_boundary.'--'; $this->_finalbody = ($this->_get_protocol() === 'mail') ? $body : $hdr.$this->newline.$this->newline.$body; @@ -1439,6 +1428,57 @@ class CI_Email { // -------------------------------------------------------------------- + protected function _attachments_have_multipart($type) + { + foreach ($this->_attachments as &$attachment) + { + if ($attachment['multipart'] === $type) + { + return TRUE; + } + } + + return FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Prepares attachment string + * + * @param string $body Message body to append to + * @param string $boundary Multipart boundary + * @param string $multipart When provided, only attachments of this type will be processed + * @return string + */ + protected function _append_attachments(&$body, $boundary, $multipart = null) + { + for ($i = 0, $c = count($this->_attachments); $i < $c; $i++) + { + if (isset($multipart) && $this->_attachments[$i]['multipart'] !== $multipart) + { + continue; + } + + $name = isset($this->_attachments[$i]['name'][1]) + ? $this->_attachments[$i]['name'][1] + : basename($this->_attachments[$i]['name'][0]); + + $body .= '--'.$boundary.$this->newline + .'Content-Type: '.$this->_attachments[$i]['type'].'; name="'.$name.'"'.$this->newline + .'Content-Disposition: '.$this->_attachments[$i]['disposition'].';'.$this->newline + .'Content-Transfer-Encoding: base64'.$this->newline + .(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline.$this->newline) + .$this->_attachments[$i]['content'].$this->newline; + } + + // $name won't be set if no attachments were appended, + // and therefore a boundary wouldn't be necessary + empty($name) OR $body .= '--'.$boundary.'--'; + } + + // -------------------------------------------------------------------- + /** * Prep Quoted Printable * -- cgit v1.2.3-24-g4f1b From 83630055ab671867b14f02d45370eb0bc41a0cb0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Jun 2016 09:52:58 +0300 Subject: [ci skip] Add changelog entry for issue #4583, PR #4585 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c86693d32..0647f6dbb 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -33,6 +33,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4637) - :doc:`Database ` method `error()` returned ``FALSE`` with the 'oci8' driver if there was no error. - Fixed a bug (#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. +- Fixed a bug (#4583) - :doc:`Email Library ` didn't properly handle inline attachments in HTML emails. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From ed6f01077abb8946b54413d383fa1b7b46cd3d1f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jun 2016 11:06:59 +0300 Subject: Make db_select() clear cached database metadata --- system/database/drivers/mssql/mssql_driver.php | 1 + system/database/drivers/mysql/mysql_driver.php | 1 + system/database/drivers/mysqli/mysqli_driver.php | 1 + system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 1 + system/database/drivers/sqlsrv/sqlsrv_driver.php | 1 + user_guide_src/source/changelog.rst | 1 + 6 files changed, 6 insertions(+) diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index d40d67a0b..66d7572e4 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -158,6 +158,7 @@ class CI_DB_mssql_driver extends CI_DB { if (mssql_select_db('['.$database.']', $this->conn_id)) { $this->database = $database; + $this->data_cache = array(); return TRUE; } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 78b1d703a..7804dda58 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -208,6 +208,7 @@ class CI_DB_mysql_driver extends CI_DB { if (mysql_select_db($database, $this->conn_id)) { $this->database = $database; + $this->data_cache = array(); return TRUE; } diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 06c34187f..f52163c2d 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -256,6 +256,7 @@ class CI_DB_mysqli_driver extends CI_DB { if ($this->conn_id->select_db($database)) { $this->database = $database; + $this->data_cache = array(); return TRUE; } diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 70f2bfd4e..38a5a8aff 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -218,6 +218,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { if (FALSE !== $this->simple_query('USE '.$this->escape_identifiers($database))) { $this->database = $database; + $this->data_cache = array(); return TRUE; } diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 0cd9ce16d..c55d5f7b7 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -171,6 +171,7 @@ class CI_DB_sqlsrv_driver extends CI_DB { if ($this->_execute('USE '.$this->escape_identifiers($database))) { $this->database = $database; + $this->data_cache = array(); return TRUE; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0647f6dbb..8774d4b84 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -34,6 +34,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#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. - Fixed a bug (#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. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 343163624e2527df9ce0c22a6e4ccfebf5b9f48b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Jun 2016 13:32:45 +0300 Subject: [ci skip] Remove non-existent parameter from log_message() docs Reported in #4671 --- user_guide_src/source/general/errors.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst index 9c190feb1..a1cc3517a 100644 --- a/user_guide_src/source/general/errors.rst +++ b/user_guide_src/source/general/errors.rst @@ -78,11 +78,10 @@ The following functions let you generate errors: CodeIgniter automatically logs any ``show_404()`` calls. Setting the optional second parameter to FALSE will skip logging. -.. php:function:: log_message($level, $message, $php_error = FALSE) +.. php:function:: log_message($level, $message) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log - :param bool $php_error: Whether we're logging a native PHP error message :rtype: void This function lets you write messages to your log files. You must -- cgit v1.2.3-24-g4f1b From f7b028bf6db9c298db99cf800777ad3691b206b5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 22 Jun 2016 12:42:44 +0300 Subject: Fix #4675 --- system/helpers/file_helper.php | 8 +++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 0d8d1d0d9..3cb36a551 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -138,13 +138,15 @@ if ( ! function_exists('delete_files')) { if ($filename !== '.' && $filename !== '..') { - if (is_dir($path.DIRECTORY_SEPARATOR.$filename) && $filename[0] !== '.') + $filepath = $path.DIRECTORY_SEPARATOR.$filename; + + if (is_dir($filepath) && $filename[0] !== '.' && ! is_link($filepath)) { - delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $htdocs, $_level + 1); + delete_files($filepath, $del_dir, $htdocs, $_level + 1); } elseif ($htdocs !== TRUE OR ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) { - @unlink($path.DIRECTORY_SEPARATOR.$filename); + @unlink($filepath); } } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8774d4b84..da96b009e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -35,6 +35,7 @@ Bug fixes for 3.0.7 - Fixed a bug where :doc:`Session Library ` 'redis' driver didn't properly detect if a connection is properly closed on PHP 5.x. - Fixed a bug (#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. +- Fixed a bug (#4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From ac718628e8b486f8016ac775829a32cfbc9fa3da Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 22 Jun 2016 13:01:51 +0300 Subject: Fix #4674 --- system/database/drivers/pdo/pdo_driver.php | 5 ++++- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 7 ++++++- user_guide_src/source/changelog.rst | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index c6f84e0f9..c27607e55 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -126,7 +126,10 @@ class CI_DB_pdo_driver extends CI_DB { */ public function db_connect($persistent = FALSE) { - $this->options[PDO::ATTR_PERSISTENT] = $persistent; + if ($persistent === TRUE) + { + $this->options[PDO::ATTR_PERSISTENT] = TRUE; + } try { diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index 84695ee9b..9a1cbcaf4 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -126,7 +126,12 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { */ public function db_connect($persistent = FALSE) { - $this->conn_id = parent::db_connect($persistent); + if ($persistent === TRUE) + { + log_message('debug', "dblib driver doesn't support persistent connections"); + } + + $this->conn_id = parent::db_connect(FALSE); if ( ! is_object($this->conn_id)) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index da96b009e..ec7239649 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -36,6 +36,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#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. - Fixed a bug (#4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories. +- Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From e947ff5e84e46cef404c7403e0d94b206c1a6404 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 26 Jun 2016 20:49:07 +0900 Subject: Fix oci8_forge * Oracle does not have `create table if exists` * Oracle has only NUMBER for integer Signed-off-by: Kenji Suzuki --- system/database/drivers/oci8/oci8_forge.php | 37 ++++++++++++++++++++++ .../drivers/pdo/subdrivers/pdo_oci_forge.php | 35 ++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 1ca559a32..989c7a8b7 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -53,6 +53,13 @@ class CI_DB_oci8_forge extends CI_DB_forge { */ protected $_create_database = FALSE; + /** + * CREATE TABLE IF statement + * + * @var string + */ + protected $_create_table_if = FALSE; + /** * DROP DATABASE statement * @@ -146,4 +153,34 @@ class CI_DB_oci8_forge extends CI_DB_forge { // Not supported - sequences and triggers must be used instead } + // -------------------------------------------------------------------- + + /** + * Field attribute TYPE + * + * Performs a data type mapping between different databases. + * + * @param array &$attributes + * @return void + */ + protected function _attr_type(&$attributes) + { + switch (strtoupper($attributes['TYPE'])) + { + case 'TINYINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'MEDIUMINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'INT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'BIGINT': + $attributes['TYPE'] = 'NUMBER'; + return; + default: return; + } + } + } diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index d0b7be8f2..f7b7f8f5a 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -53,6 +53,13 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { */ protected $_create_database = FALSE; + /** + * CREATE TABLE IF statement + * + * @var string + */ + protected $_create_table_if = FALSE; + /** * DROP DATABASE statement * @@ -146,4 +153,32 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { // Not supported - sequences and triggers must be used instead } + /** + * Field attribute TYPE + * + * Performs a data type mapping between different databases. + * + * @param array &$attributes + * @return void + */ + protected function _attr_type(&$attributes) + { + switch (strtoupper($attributes['TYPE'])) + { + case 'TINYINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'MEDIUMINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'INT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'BIGINT': + $attributes['TYPE'] = 'NUMBER'; + return; + default: return; + } + } + } -- cgit v1.2.3-24-g4f1b From 4b933ad9d24daf67e28d804b95a231a707afede3 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 28 Jun 2016 11:20:35 +0900 Subject: Remove duplicated $_create_table_if Signed-off-by: Kenji Suzuki --- system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index f7b7f8f5a..94a52ffc8 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -67,13 +67,6 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { */ protected $_drop_database = FALSE; - /** - * CREATE TABLE IF statement - * - * @var string - */ - protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; - /** * UNSIGNED support * -- cgit v1.2.3-24-g4f1b From a09b96900af8615f4bb0b50046588fb3d5e5db84 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Jun 2016 11:06:47 +0300 Subject: Merge pull request #4678 from kenjis/fix-oci8_forge DBForge adjustments for Oracle --- system/database/drivers/oci8/oci8_forge.php | 37 ++++++++++++++++++++++ .../drivers/pdo/subdrivers/pdo_oci_forge.php | 36 ++++++++++++++++++--- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 1ca559a32..989c7a8b7 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -53,6 +53,13 @@ class CI_DB_oci8_forge extends CI_DB_forge { */ protected $_create_database = FALSE; + /** + * CREATE TABLE IF statement + * + * @var string + */ + protected $_create_table_if = FALSE; + /** * DROP DATABASE statement * @@ -146,4 +153,34 @@ class CI_DB_oci8_forge extends CI_DB_forge { // Not supported - sequences and triggers must be used instead } + // -------------------------------------------------------------------- + + /** + * Field attribute TYPE + * + * Performs a data type mapping between different databases. + * + * @param array &$attributes + * @return void + */ + protected function _attr_type(&$attributes) + { + switch (strtoupper($attributes['TYPE'])) + { + case 'TINYINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'MEDIUMINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'INT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'BIGINT': + $attributes['TYPE'] = 'NUMBER'; + return; + default: return; + } + } + } diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index d0b7be8f2..94a52ffc8 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -54,18 +54,18 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { protected $_create_database = FALSE; /** - * DROP DATABASE statement + * CREATE TABLE IF statement * * @var string */ - protected $_drop_database = FALSE; + protected $_create_table_if = FALSE; /** - * CREATE TABLE IF statement + * DROP DATABASE statement * * @var string */ - protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; + protected $_drop_database = FALSE; /** * UNSIGNED support @@ -146,4 +146,32 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { // Not supported - sequences and triggers must be used instead } + /** + * Field attribute TYPE + * + * Performs a data type mapping between different databases. + * + * @param array &$attributes + * @return void + */ + protected function _attr_type(&$attributes) + { + switch (strtoupper($attributes['TYPE'])) + { + case 'TINYINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'MEDIUMINT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'INT': + $attributes['TYPE'] = 'NUMBER'; + return; + case 'BIGINT': + $attributes['TYPE'] = 'NUMBER'; + return; + default: return; + } + } + } -- cgit v1.2.3-24-g4f1b From 9a7f19c08d98aeb1331cf19327fe8e4560415c91 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Jun 2016 11:12:07 +0300 Subject: [ci skip] Add changelog entries for PR #4678 --- system/database/drivers/oci8/oci8_forge.php | 1 - system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 1 - user_guide_src/source/changelog.rst | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 989c7a8b7..23e025757 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -182,5 +182,4 @@ class CI_DB_oci8_forge extends CI_DB_forge { default: return; } } - } diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index 94a52ffc8..705b1c711 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -173,5 +173,4 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { default: return; } } - } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ec7239649..22302ab09 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Release Date: Not Released - Updated :doc:`Encryption Library ` to always prefer ``random_bytes()`` when it is available. - Updated :doc:`Session Library ` to log 'debug' messages when using fallbacks to *session.save_path* (php.ini) or 'sess_use_database', 'sess_table_name' settings. - Added a 'LONGTEXT' to 'STRING' alias to :doc:`Database Forge ` for the 'cubrid', 'pdo/cubrid' drivers. + - Added 'TINYINT', 'MEDIUMINT', 'INT' and 'BIGINT' aliases to 'NUMBER' to :doc:`Database Forge ` for the 'oci8', 'pdo/oci' drivers. - :php:func:`password_hash()` :doc:`compatibility function ` changes: @@ -37,6 +38,7 @@ Bug fixes for 3.0.7 - Fixed a bug where :doc:`Database ` method `db_select()` didn't clear metadata cached for the previously used database. - Fixed a bug (#4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories. - Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. +- Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported `IF NOT EXISTS` clause when creating tables on Oracle. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 2761c4c4e801098fddfa97e156c485bd8f84f675 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Jul 2016 17:25:56 +0300 Subject: [ci skip] Make the ZIP library's doc 'Next' button point to DB Suggested in #4682 --- user_guide_src/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index a13ec983e..615c27f3c 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -116,7 +116,7 @@ Helper Reference installation/index general/index libraries/index - helpers/index database/index + helpers/index tutorial/index general/credits -- cgit v1.2.3-24-g4f1b From abfa962e7ed45b5dbc5ac2a9ef99be42008504d6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Jul 2016 17:26:33 +0300 Subject: [ci skip] Fix a changelog entry reference --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 22302ab09..cfa28aea0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -37,7 +37,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#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. - Fixed a bug (#4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories. -- Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. +- Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. - Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported `IF NOT EXISTS` clause when creating tables on Oracle. Version 3.0.6 -- cgit v1.2.3-24-g4f1b From 87f7634117c34a7667b1eb13c39bf8e53bdb1b87 Mon Sep 17 00:00:00 2001 From: chestnutprog Date: Wed, 6 Jul 2016 21:13:22 +0800 Subject: Update Upload.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 特殊文件ĺŤĺŹŻč˝äĽšĺĽ•čµ·bug --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index fa365058c..7b94a230c 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -601,7 +601,7 @@ class CI_Upload { 'file_type' => $this->file_type, 'file_path' => $this->upload_path, 'full_path' => $this->upload_path.$this->file_name, - 'raw_name' => str_replace($this->file_ext, '', $this->file_name), + 'raw_name' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)), 'orig_name' => $this->orig_name, 'client_name' => $this->client_name, 'file_ext' => $this->file_ext, -- cgit v1.2.3-24-g4f1b From 7a6ae33b3d457a1f86bc20ef78426ada3f37f899 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jul 2016 16:36:40 +0300 Subject: Merge pull request #4691 from chestnutprog/develop [ci skip] Fix a bug in CI_Upload::data() --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index fa365058c..7b94a230c 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -601,7 +601,7 @@ class CI_Upload { 'file_type' => $this->file_type, 'file_path' => $this->upload_path, 'full_path' => $this->upload_path.$this->file_name, - 'raw_name' => str_replace($this->file_ext, '', $this->file_name), + 'raw_name' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)), 'orig_name' => $this->orig_name, 'client_name' => $this->client_name, 'file_ext' => $this->file_ext, -- cgit v1.2.3-24-g4f1b From 17fa8defc1b580df4395200f6536498918bc6ea6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jul 2016 16:48:15 +0300 Subject: [ci skip] Add a changelog entry for PR #4691 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cfa28aea0..d39900c67 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -39,6 +39,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories. - Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. - Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported `IF NOT EXISTS` clause when creating tables on Oracle. +- Fixed a bug (#4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 64d9d1ec12be9f02459a5e5c8a9124fc97686529 Mon Sep 17 00:00:00 2001 From: nopesled Date: Thu, 7 Jul 2016 17:40:47 +0100 Subject: Update path_helper.php Protect against RFI via php:// wrapper --- system/helpers/path_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 838ece9e9..f3757affb 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -61,7 +61,7 @@ if ( ! function_exists('set_realpath')) function set_realpath($path, $check_existance = FALSE) { // Security check to make sure the path is NOT a URL. No remote file inclusion! - if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) + if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|php)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) { show_error('The path you submitted must be a local server path, not a URL'); } -- cgit v1.2.3-24-g4f1b From 85eaa0bff12574b8a1c08b68942ff070e6bb341c Mon Sep 17 00:00:00 2001 From: nopesled Date: Thu, 7 Jul 2016 17:48:22 +0100 Subject: Update path_helper.php --- system/helpers/path_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index f3757affb..18e175093 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -61,7 +61,7 @@ if ( ! function_exists('set_realpath')) function set_realpath($path, $check_existance = FALSE) { // Security check to make sure the path is NOT a URL. No remote file inclusion! - if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|php)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) + if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|php:\/\/)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) { show_error('The path you submitted must be a local server path, not a URL'); } -- cgit v1.2.3-24-g4f1b From a1b0c7e3e5e7c63defbb58bae77b50370df30524 Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 7 Jul 2016 15:32:12 -0400 Subject: recommend PHP >= 5.6 PHP 5.5 end of life is July 10, 2016 --- readme.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.rst b/readme.rst index 84ecc67f9..7a376322d 100644 --- a/readme.rst +++ b/readme.rst @@ -29,7 +29,7 @@ guide change log Date: Mon, 11 Jul 2016 18:01:54 +0800 Subject: Use negative length for speeding up. Signed-off-by: tianhe1986 --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 7b94a230c..056f6de1e 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -601,7 +601,7 @@ class CI_Upload { 'file_type' => $this->file_type, 'file_path' => $this->upload_path, 'full_path' => $this->upload_path.$this->file_name, - 'raw_name' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)), + 'raw_name' => substr($this->file_name, 0, -strlen($this->file_ext)), 'orig_name' => $this->orig_name, 'client_name' => $this->client_name, 'file_ext' => $this->file_ext, -- cgit v1.2.3-24-g4f1b From e12fcec770d7bc03f746c291e96cc75b51475f74 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 13:37:40 +0300 Subject: [ci skip] Fix an undefined index for 'timeout' in Redis session driver http://forum.codeigniter.com/thread-64219.html --- system/libraries/Session/drivers/Session_redis_driver.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index ad14cbfdc..d3a265958 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -99,8 +99,9 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(?\?.+)?#', $this->_config['save_path'], $matches)) { $save_path = array( - 'host' => $matches[1], - 'port' => empty($matches[2]) ? NULL : $matches[2] + 'host' => $matches[1], + 'port' => empty($matches[2]) ? NULL : $matches[2], + 'timeout' => NULL // We always pass this to Redis::connect(), so it needs to exist ); } else -- cgit v1.2.3-24-g4f1b From 9fd9248a2d712d5ae95bf2e6c6cd036e6b522cbb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:04:17 +0300 Subject: Fix #4679 --- system/core/Input.php | 4 ++-- tests/codeigniter/core/Input_test.php | 6 ++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 50ca047e8..b81d51ebf 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -519,9 +519,9 @@ class CI_Input { if ($separator === ':') { $netaddr = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($netaddr, ':')), $netaddr)); - for ($i = 0; $i < 8; $i++) + for ($j = 0; $j < 8; $j++) { - $netaddr[$i] = intval($netaddr[$i], 16); + $netaddr[$i] = intval($netaddr[$j], 16); } } else diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index c56900d22..e1f4011b5 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -261,6 +261,12 @@ class Input_test extends CI_TestCase { $_SERVER['REMOTE_ADDR'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329'; $this->assertEquals('FE80:0000:0000:0000:0202:B3FF:FE1E:8300', $this->input->ip_address()); + $this->input->ip_address = FALSE; + $this->ci_set_config('proxy_ips', '0::/32'); + $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.7'; + $_SERVER['REMOTE_ADDR'] = '0000:0000:0000:0000:0000:0000:0000:0001'; + $this->assertEquals('127.0.0.7', $this->input->ip_address()); + $this->input->ip_address = FALSE; $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d39900c67..ef8b5d6ce 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -40,6 +40,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. - Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported `IF NOT EXISTS` clause when creating tables on Oracle. - Fixed a bug (#4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename. +- Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 79b9923634cdb69f746ffcd4b288f738988b1367 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:12:46 +0300 Subject: [ci skip] Consistent changelog syntax --- user_guide_src/source/changelog.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ef8b5d6ce..a9cb450c8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -31,14 +31,14 @@ Bug fixes for 3.0.7 - Fixed a bug (#4605) - :doc:`Config Library ` method ``site_url()`` stripped trailing slashes from relative URIs passed to it. - Fixed a bug (#4613) - :doc:`Email Library ` failed to send multiple emails via SMTP due to "already authenticated" errors when keep-alive is enabled. - Fixed a bug (#4633) - :doc:`Form Validation Library ` ignored multiple "callback" rules for empty, non-required fields. -- Fixed a bug (#4637) - :doc:`Database ` method `error()` returned ``FALSE`` with the 'oci8' driver if there was no error. +- Fixed a bug (#4637) - :doc:`Database ` method ``error()`` returned ``FALSE`` with the 'oci8' driver if there was no error. - Fixed a bug (#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. - Fixed a bug (#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. +- Fixed a bug where :doc:`Database ` method ``db_select()`` didn't clear metadata cached for the previously used database. - Fixed a bug (#4675) - :doc:`File Helper ` function :php:func:`delete_files()` treated symbolic links as regular directories. - Fixed a bug (#4674) - :doc:`Database ` driver 'dblib' triggered E_WARNING messages while connecting. -- Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported `IF NOT EXISTS` clause when creating tables on Oracle. +- Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported ``IF NOT EXISTS`` clause when creating tables on Oracle. - Fixed a bug (#4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address. -- cgit v1.2.3-24-g4f1b From fc6f444f74b54a3c7ff3c53ba7fdf83378a86bcc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:15:49 +0300 Subject: [ci skip] Clarify lang() helper docs As requested in #4693 --- user_guide_src/source/helpers/language_helper.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst index cadf3c0ce..cfbd6c057 100644 --- a/user_guide_src/source/helpers/language_helper.rst +++ b/user_guide_src/source/helpers/language_helper.rst @@ -27,17 +27,20 @@ The following functions are available: .. php:function:: lang($line[, $for = ''[, $attributes = array()]]) - :param string $line: Language line key - :param string $for: HTML "for" attribute (ID of the element we're creating a label for) - :param array $attributes: Any additional HTML attributes - :returns: HTML-formatted language line label + :param string $line: Language line key + :param string $for: HTML "for" attribute (ID of the element we're creating a label for) + :param array $attributes: Any additional HTML attributes + :returns: The language line; in an HTML label tag, if the ``$for`` parameter is not empty :rtype: string This function returns a line of text from a loaded language file with simplified syntax that may be more desirable for view files than ``CI_Lang::line()``. - Example:: + Examples:: + + echo lang('language_key'); + // Outputs: Language line echo lang('language_key', 'form_item_id', array('class' => 'myClass')); // Outputs: \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b01047570608a976d4721147bbb8710ffd674551 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:36:20 +0300 Subject: Fix #4695 --- system/libraries/User_agent.php | 6 ++---- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index c4e11592d..60d159966 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -173,13 +173,11 @@ class CI_User_agent { */ public function __construct() { + $this->_load_agent_file(); + if (isset($_SERVER['HTTP_USER_AGENT'])) { $this->agent = trim($_SERVER['HTTP_USER_AGENT']); - } - - if ($this->agent !== NULL && $this->_load_agent_file()) - { $this->_compile_data(); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a9cb450c8..ed6446bb4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -41,6 +41,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported ``IF NOT EXISTS`` clause when creating tables on Oracle. - Fixed a bug (#4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address. +- Fixed a bug (#4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 11bdddcf2290dcd8f782de9727673070c78317ff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:53:50 +0300 Subject: Close #4692 --- user_guide_src/source/helpers/inflector_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index 17dab57bf..df0c568c0 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -3,7 +3,7 @@ Inflector Helper ################ The Inflector Helper file contains functions that permits you to change -words to plural, singular, camel case, etc. +**English** words to plural, singular, camel case, etc. .. contents:: :local: -- cgit v1.2.3-24-g4f1b From 81b13ba41f00da46ab23c10e9d625b8fe45b4349 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 15:45:37 +0300 Subject: Merge pull request #4705 from tianhe1986/develop_upload_raw_name Improve #4691 --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 7b94a230c..056f6de1e 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -601,7 +601,7 @@ class CI_Upload { 'file_type' => $this->file_type, 'file_path' => $this->upload_path, 'full_path' => $this->upload_path.$this->file_name, - 'raw_name' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)), + 'raw_name' => substr($this->file_name, 0, -strlen($this->file_ext)), 'orig_name' => $this->orig_name, 'client_name' => $this->client_name, 'file_ext' => $this->file_ext, -- cgit v1.2.3-24-g4f1b From ac86263d83eea14f346e358cf7666d6ad21f0dfc Mon Sep 17 00:00:00 2001 From: Harrison Emmanuel Date: Thu, 21 Jul 2016 01:39:55 +0100 Subject: Fixed typos Changed umark_flash() and umark_temp() to unmark_flash() and unmark_temp() to match with their respective methods in the Session class. --- user_guide_src/source/libraries/sessions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 9c9761bbf..082828c4e 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -906,7 +906,7 @@ Class Reference Gets a list of all ``$_SESSION`` that have been marked as "flashdata". - .. php:method:: umark_flash($key) + .. php:method:: unmark_flash($key) :param mixed $key: Key to be un-marked as flashdata, or an array of multiple keys :rtype: void @@ -971,7 +971,7 @@ Class Reference Gets a list of all ``$_SESSION`` that have been marked as "tempdata". - .. php:method:: umark_temp($key) + .. php:method:: unmark_temp($key) :param mixed $key: Key to be un-marked as tempdata, or an array of multiple keys :rtype: void -- cgit v1.2.3-24-g4f1b From 71789ce7bb345a9d32bfa9cbf1334876647ea7e1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 21 Jul 2016 12:45:58 +0300 Subject: Merge pull request #4716 from Ema4rl/patch-1 [ci skip] Fix Session userguide typos --- user_guide_src/source/libraries/sessions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 9c9761bbf..082828c4e 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -906,7 +906,7 @@ Class Reference Gets a list of all ``$_SESSION`` that have been marked as "flashdata". - .. php:method:: umark_flash($key) + .. php:method:: unmark_flash($key) :param mixed $key: Key to be un-marked as flashdata, or an array of multiple keys :rtype: void @@ -971,7 +971,7 @@ Class Reference Gets a list of all ``$_SESSION`` that have been marked as "tempdata". - .. php:method:: umark_temp($key) + .. php:method:: unmark_temp($key) :param mixed $key: Key to be un-marked as tempdata, or an array of multiple keys :rtype: void -- cgit v1.2.3-24-g4f1b From d9a4063f87d82836e7d7fe340c5c962e0332e2e5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 22 Jul 2016 15:49:08 +0300 Subject: Fix #4713 --- system/database/DB_query_builder.php | 13 +++++++++---- user_guide_src/source/changelog.rst | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 84346a6ed..713bf18f3 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1498,8 +1498,10 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $affected_rows = 0; for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) { - $this->query($this->_insert_batch($this->protect_identifiers($table, TRUE, $escape, FALSE), $this->qb_keys, array_slice($this->qb_set, $i, $batch_size))); - $affected_rows += $this->affected_rows(); + if ($this->query($this->_insert_batch($this->protect_identifiers($table, TRUE, $escape, FALSE), $this->qb_keys, array_slice($this->qb_set, $i, $batch_size)))) + { + $affected_rows += $this->affected_rows(); + } } $this->_reset_write(); @@ -1913,8 +1915,11 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $affected_rows = 0; for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) { - $this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, $batch_size), $this->protect_identifiers($index))); - $affected_rows += $this->affected_rows(); + if ($this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, $batch_size), $this->protect_identifiers($index)))) + { + $affected_rows += $this->affected_rows(); + } + $this->qb_where = array(); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ed6446bb4..419859f5c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -42,6 +42,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address. - Fixed a bug (#4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header. +- Fixed a bug (#4713) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` could return wrong affected rows count. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 19ca6442222a316ca2400252a8917426046a3eda Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 22 Jul 2016 15:56:10 +0300 Subject: [ci skip] Add affected_rows() to db reference docs --- user_guide_src/source/database/db_driver_reference.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1ecd38968..aaca90840 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -116,6 +116,15 @@ This article is intended to be a reference for them. for use when you don't need to get a result object or to just send a query to the database and not care for the result. + .. php:method:: affected_rows() + :returns: Number of rows affected + :rtype: int + + Returns the number of rows *changed* by the last executed query. + + Useful for checking how much rows were created, updated or deleted + during the last executed query. + .. php:method:: trans_strict([$mode = TRUE]) :param bool $mode: Strict mode flag -- cgit v1.2.3-24-g4f1b From 0c821bbeb549077eb5c0550e6de6df0adba3d4fa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 16:04:02 +0300 Subject: Fix #4712 --- system/libraries/Email.php | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index f8772c656..be89d6569 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1919,6 +1919,7 @@ class CI_Email { if ( ! $this->_send_command('from', $this->clean_email($this->_headers['From']))) { + $this->_smtp_end(); return FALSE; } @@ -1926,6 +1927,7 @@ class CI_Email { { if ( ! $this->_send_command('to', $val)) { + $this->_smtp_end(); return FALSE; } } @@ -1936,6 +1938,7 @@ class CI_Email { { if ($val !== '' && ! $this->_send_command('to', $val)) { + $this->_smtp_end(); return FALSE; } } @@ -1947,6 +1950,7 @@ class CI_Email { { if ($val !== '' && ! $this->_send_command('to', $val)) { + $this->_smtp_end(); return FALSE; } } @@ -1954,6 +1958,7 @@ class CI_Email { if ( ! $this->_send_command('data')) { + $this->_smtp_end(); return FALSE; } @@ -1963,29 +1968,37 @@ class CI_Email { $this->_send_data('.'); $reply = $this->_get_smtp_data(); - $this->_set_error_message($reply); + $this->_smtp_end(); + if (strpos($reply, '250') !== 0) { $this->_set_error_message('lang:email_smtp_error', $reply); return FALSE; } - if ($this->smtp_keepalive) - { - $this->_send_command('reset'); - } - else - { - $this->_send_command('quit'); - } - return TRUE; } // -------------------------------------------------------------------- + /** + * SMTP End + * + * Shortcut to send RSET or QUIT depending on keep-alive + * + * @return void + */ + protected function _smtp_end() + { + ($this->smtp_keepalive) + ? $this->_send_command('reset') + : $this->_send_command('quit'); + } + + // -------------------------------------------------------------------- + /** * SMTP Connect * -- cgit v1.2.3-24-g4f1b From fd128d536fa08cf7668a232aaa2fd8fce30b8ea2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 22 Jul 2016 16:21:06 +0300 Subject: [ci skip] Add changelog entry for #4712 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 419859f5c..1a0af5a91 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -43,6 +43,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address. - Fixed a bug (#4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header. - Fixed a bug (#4713) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` could return wrong affected rows count. +- Fixed a bug (#4712) - :doc:`Email Library ` doesn't sent ``RSET`` to SMTP servers after a failure and while using keep-alive. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 1dbe93713f138ce24f971b18ac49f6cc627be1ea Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Sat, 23 Jul 2016 00:19:00 +0800 Subject: Call strtolower before comparing $_SERVER['HTTP_X_FORWARDED_PROTO']. Signed-off-by: tianhe1986 --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index b87ce4d62..85e18e406 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -355,7 +355,7 @@ if ( ! function_exists('is_https')) { return TRUE; } - elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') + elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https') { return TRUE; } -- cgit v1.2.3-24-g4f1b From 5afba5a8c444d608712174665288aa10237e8b27 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Sat, 23 Jul 2016 01:02:01 +0800 Subject: Replace url_encoded invisible characters case-insensitively. Signed-off-by: tianhe1986 --- system/core/Common.php | 4 ++-- tests/codeigniter/core/Common_test.php | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/system/core/Common.php b/system/core/Common.php index b87ce4d62..e0d011db7 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -716,8 +716,8 @@ if ( ! function_exists('remove_invisible_characters')) // carriage return (dec 13) and horizontal tab (dec 09) if ($url_encoded) { - $non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15 - $non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31 + $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15 + $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31 } $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php index 81a185eaf..ca19e5de0 100644 --- a/tests/codeigniter/core/Common_test.php +++ b/tests/codeigniter/core/Common_test.php @@ -54,4 +54,16 @@ class Common_test extends CI_TestCase { ); } + // ------------------------------------------------------------------------ + + public function test_remove_invisible_characters() + { + $raw_string = 'Here is a string containing invisible'.chr(0x08).' text %0e.'; + $removed_string = 'Here is a string containing invisible text %0e.'; + $this->assertEquals($removed_string, remove_invisible_characters($raw_string, FALSE)); + + $raw_string = 'Here is a string %0econtaining url_encoded invisible%1F text.'; + $removed_string = 'Here is a string containing url_encoded invisible text.'; + $this->assertEquals($removed_string, remove_invisible_characters($raw_string)); + } } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 85f3d1ae7fb2da9e0dd364cc91d623040f8b3666 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jul 2016 10:28:21 +0300 Subject: Merge pull request #4724 from tianhe1986/develop_is_https_strtolower Compare X-Forwarded-Proto case-insensitively --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index b87ce4d62..85e18e406 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -355,7 +355,7 @@ if ( ! function_exists('is_https')) { return TRUE; } - elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') + elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https') { return TRUE; } -- cgit v1.2.3-24-g4f1b From 384a46150d3014e914c4780a550513395d4bed83 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jul 2016 10:30:04 +0300 Subject: Merge pull request #4725 from tianhe1986/develop_url_encode_case_insensitive Fix remove_invisible_characters() for URL-encoded characters in upper case --- system/core/Common.php | 4 ++-- tests/codeigniter/core/Common_test.php | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/system/core/Common.php b/system/core/Common.php index 85e18e406..d66649f59 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -716,8 +716,8 @@ if ( ! function_exists('remove_invisible_characters')) // carriage return (dec 13) and horizontal tab (dec 09) if ($url_encoded) { - $non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15 - $non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31 + $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15 + $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31 } $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php index 81a185eaf..ca19e5de0 100644 --- a/tests/codeigniter/core/Common_test.php +++ b/tests/codeigniter/core/Common_test.php @@ -54,4 +54,16 @@ class Common_test extends CI_TestCase { ); } + // ------------------------------------------------------------------------ + + public function test_remove_invisible_characters() + { + $raw_string = 'Here is a string containing invisible'.chr(0x08).' text %0e.'; + $removed_string = 'Here is a string containing invisible text %0e.'; + $this->assertEquals($removed_string, remove_invisible_characters($raw_string, FALSE)); + + $raw_string = 'Here is a string %0econtaining url_encoded invisible%1F text.'; + $removed_string = 'Here is a string containing url_encoded invisible text.'; + $this->assertEquals($removed_string, remove_invisible_characters($raw_string)); + } } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From a8a6bc7f8f65be83abeb9d00e1a94f080d8749ca Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jul 2016 10:33:35 +0300 Subject: [ci skip] Add changelog entries for PRs #4724, #4725 --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1a0af5a91..a91893ba0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -44,6 +44,8 @@ Bug fixes for 3.0.7 - Fixed a bug (#4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header. - Fixed a bug (#4713) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` could return wrong affected rows count. - Fixed a bug (#4712) - :doc:`Email Library ` doesn't sent ``RSET`` to SMTP servers after a failure and while using keep-alive. +- Fixed a bug (#4724) - :doc:`Common function ` :php:func:`is_https()` compared the ``X-Forwarded-Proto`` HTTP header case-sensitively. +- Fixed a bug (#4725) - :doc:`Common function ` :php:func:`remove_invisible_characters()`` searched case-sensitively for URL-encoded characters. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From c3a6bfdc30fdba41f4cded7c5ecd4b98f65af02d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jul 2016 10:41:31 +0300 Subject: [ci skip] Fix a changelog entry from last commit --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a91893ba0..7842136f3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -45,7 +45,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4713) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` could return wrong affected rows count. - Fixed a bug (#4712) - :doc:`Email Library ` doesn't sent ``RSET`` to SMTP servers after a failure and while using keep-alive. - Fixed a bug (#4724) - :doc:`Common function ` :php:func:`is_https()` compared the ``X-Forwarded-Proto`` HTTP header case-sensitively. -- Fixed a bug (#4725) - :doc:`Common function ` :php:func:`remove_invisible_characters()`` searched case-sensitively for URL-encoded characters. +- Fixed a bug (#4725) - :doc:`Common function ` :php:func:`remove_invisible_characters()` searched case-sensitively for URL-encoded characters. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b From 0e49b7879f5c40074d77e6aefc4d924cb527abbf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 19:37:23 +0300 Subject: Merge pull request #4709 from nopesled/develop Filter php:// wrappers in set_realpath() helper --- system/helpers/path_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 838ece9e9..18e175093 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -61,7 +61,7 @@ if ( ! function_exists('set_realpath')) function set_realpath($path, $check_existance = FALSE) { // Security check to make sure the path is NOT a URL. No remote file inclusion! - if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) + if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|php:\/\/)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) { show_error('The path you submitted must be a local server path, not a URL'); } -- cgit v1.2.3-24-g4f1b From 3d10ffa77854044570a1809a884776fd4bbd8b70 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 19:42:05 +0300 Subject: Fix SQLi in ODBC drivers --- system/database/drivers/odbc/odbc_driver.php | 161 ++++++++++++++------- .../drivers/pdo/subdrivers/pdo_odbc_driver.php | 81 ++--------- 2 files changed, 118 insertions(+), 124 deletions(-) diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 19b7b744b..63df2963d 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @author EllisLab Dev Team * @link https://codeigniter.com/user_guide/database/ */ -class CI_DB_odbc_driver extends CI_DB { +class CI_DB_odbc_driver extends CI_DB_driver { /** * Database driver @@ -93,6 +93,22 @@ class CI_DB_odbc_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * ODBC result ID resource returned from odbc_prepare() + * + * @var resource + */ + private $odbc_result; + + /** + * Values to use with odbc_execute() for prepared statements + * + * @var array + */ + private $binds = array(); + + // -------------------------------------------------------------------- + /** * Class constructor * @@ -127,6 +143,74 @@ class CI_DB_odbc_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * Compile Bindings + * + * @param string $sql SQL statement + * @param array $binds An array of values to bind + * @return string + */ + public function compile_binds($sql, $binds) + { + if (empty($binds) OR empty($this->bind_marker) OR strpos($sql, $this->bind_marker) === FALSE) + { + return $sql; + } + elseif ( ! is_array($binds)) + { + $binds = array($binds); + $bind_count = 1; + } + else + { + // Make sure we're using numeric keys + $binds = array_values($binds); + $bind_count = count($binds); + } + + // We'll need the marker length later + $ml = strlen($this->bind_marker); + + // Make sure not to replace a chunk inside a string that happens to match the bind marker + if ($c = preg_match_all("/'[^']*'/i", $sql, $matches)) + { + $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', + str_replace($matches[0], + str_replace($this->bind_marker, str_repeat(' ', $ml), $matches[0]), + $sql, $c), + $matches, PREG_OFFSET_CAPTURE); + + // Bind values' count must match the count of markers in the query + if ($bind_count !== $c) + { + return $sql; + } + } + elseif (($c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', $sql, $matches, PREG_OFFSET_CAPTURE)) !== $bind_count) + { + return $sql; + } + + if ($this->bind_marker !== '?') + { + do + { + $c--; + $sql = substr_replace($sql, '?', $matches[0][$c][1], $ml); + } + while ($c !== 0); + } + + if (FALSE !== ($this->odbc_result = odbc_prepare($this->conn_id, $sql))) + { + $this->binds = array_values($binds); + } + + return $sql; + } + + // -------------------------------------------------------------------- + /** * Execute the query * @@ -135,7 +219,25 @@ class CI_DB_odbc_driver extends CI_DB { */ protected function _execute($sql) { - return odbc_exec($this->conn_id, $sql); + if ( ! isset($this->odbc_result)) + { + return odbc_exec($this->conn_id, $sql); + } + elseif ($this->odbc_result === FALSE) + { + return FALSE; + } + + if (TRUE === ($success = odbc_execute($this->odbc_result, $this->binds))) + { + // For queries that return result sets, return the result_id resource on success + $this->is_write_type($sql) OR $success = $this->odbc_result; + } + + $this->odbc_result = NULL; + $this->binds = array(); + + return $success; } // -------------------------------------------------------------------- @@ -214,7 +316,7 @@ class CI_DB_odbc_driver extends CI_DB { */ protected function _escape_str($str) { - return remove_invisible_characters($str); + $this->db->display_error('db_unsupported_feature'); } // -------------------------------------------------------------------- @@ -311,58 +413,6 @@ class CI_DB_odbc_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ - protected function _update($table, $values) - { - $this->qb_limit = FALSE; - $this->qb_orderby = array(); - return parent::_update($table, $values); - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ - protected function _truncate($table) - { - return 'DELETE FROM '.$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ - protected function _delete($table) - { - $this->qb_limit = FALSE; - return parent::_delete($table); - } - - // -------------------------------------------------------------------- - /** * Close DB Connection * @@ -372,5 +422,4 @@ class CI_DB_odbc_driver extends CI_DB { { odbc_close($this->conn_id); } - } diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index 333448838..82554ec80 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -160,6 +160,19 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { // -------------------------------------------------------------------- + /** + * Platform-dependant string escape + * + * @param string + * @return string + */ + protected function _escape_str($str) + { + $this->db->display_error('db_unsupported_feature'); + } + + // -------------------------------------------------------------------- + /** * Determines if a query is a "write" type. * @@ -213,72 +226,4 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { { return 'SELECT column_name FROM information_schema.columns WHERE table_name = '.$this->escape($table); } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ - protected function _update($table, $values) - { - $this->qb_limit = FALSE; - $this->qb_orderby = array(); - return parent::_update($table, $values); - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ - protected function _truncate($table) - { - return 'DELETE FROM '.$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string the table name - * @return string - */ - protected function _delete($table) - { - $this->qb_limit = FALSE; - return parent::_delete($table); - } - - // -------------------------------------------------------------------- - - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ - protected function _limit($sql) - { - return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$this->qb_limit.' ', $sql); - } - } -- cgit v1.2.3-24-g4f1b From 287b795b0e423d356427405d04d0c4d3a6c3ab13 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 19:42:41 +0300 Subject: [ci skip] Whitespace --- system/helpers/path_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 18e175093..6c846a211 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -61,7 +61,7 @@ if ( ! function_exists('set_realpath')) function set_realpath($path, $check_existance = FALSE) { // Security check to make sure the path is NOT a URL. No remote file inclusion! - if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|php:\/\/)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path ) + if (preg_match('#^(http:\/\/|https:\/\/|www\.|ftp|php:\/\/)#i', $path) OR filter_var($path, FILTER_VALIDATE_IP) === $path) { show_error('The path you submitted must be a local server path, not a URL'); } -- cgit v1.2.3-24-g4f1b From edd347fa069d39b9684fd61a3d6befa6ef59dab3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 19:45:17 +0300 Subject: [ci skip] Add changelog entries for security patches --- user_guide_src/source/changelog.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7842136f3..156b6be56 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,11 @@ Version 3.0.7 Release Date: Not Released +- **Security** + + - Fixed an SQL injection in the 'odbc' database driver. + - Updated :php:func:`set_realpath()` :doc:`Path Helpr ` function to filter-out ``php://`` wrapper inputs. + - General Changes - Updated :doc:`Image Manipulation Library ` to validate *width* and *height* configuration values. -- cgit v1.2.3-24-g4f1b From 606ad654dcbc9f0fc30f00ce6574918790ee0d1e Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 7 Jul 2016 15:32:12 -0400 Subject: Prepare for 3.1.0 release --- readme.rst | 4 ++-- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 ++--- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 2 +- user_guide_src/source/installation/upgrade_307.rst | 14 ----------- user_guide_src/source/installation/upgrade_310.rst | 27 ++++++++++++++++++++++ user_guide_src/source/installation/upgrading.rst | 2 +- 8 files changed, 37 insertions(+), 24 deletions(-) delete mode 100644 user_guide_src/source/installation/upgrade_307.rst create mode 100644 user_guide_src/source/installation/upgrade_310.rst diff --git a/readme.rst b/readme.rst index 526950e67..7a376322d 100644 --- a/readme.rst +++ b/readme.rst @@ -29,7 +29,7 @@ guide change log ` didn't escape image source paths passed to ImageMagick as shell arguments. diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 26f854d85..9e78d242d 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.0.7-dev' +version = '3.1.0' # The full version, including alpha/beta/rc tags. -release = '3.0.7-dev' +release = '3.1.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 22c63b873..80d2412cd 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.0.7-dev (Current version) `_ +- `CodeIgniter v3.1.0 (Current version) `_ - `CodeIgniter v3.0.6 `_ - `CodeIgniter v3.0.5 `_ - `CodeIgniter v3.0.4 `_ diff --git a/user_guide_src/source/installation/upgrade_307.rst b/user_guide_src/source/installation/upgrade_307.rst deleted file mode 100644 index ee957aabf..000000000 --- a/user_guide_src/source/installation/upgrade_307.rst +++ /dev/null @@ -1,14 +0,0 @@ -############################# -Upgrading from 3.0.6 to 3.0.7 -############################# - -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. diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst new file mode 100644 index 000000000..1dc71a58c --- /dev/null +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -0,0 +1,27 @@ +############################# +Upgrading from 3.0.6 to 3.1.0 +############################# + +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: If you're using the 'odbc' database driver, check for usage of Query Builder +==================================================================================== + +:doc:`Query Builder <../database/query_builder>` functionality and ``escape()`` can +no longer be used with the 'odbc' database driver. + +This is because, due to its nature, the `ODBC extension for PHP `_ +does not provide a function that allows to safely escape user-supplied strings for usage +inside an SQL query (which our :doc:`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 diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 5beca6586..f0cf8c903 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -8,7 +8,7 @@ upgrading from. .. toctree:: :titlesonly: - Upgrading from 3.0.6 to 3.0.7 + Upgrading from 3.0.6 to 3.1.0 Upgrading from 3.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 -- cgit v1.2.3-24-g4f1b From 850a3c91a191256967d6fc81dda26a7c8ff258c0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 20:12:06 +0300 Subject: [ci skip] Minor documentation fixes --- user_guide_src/source/database/db_driver_reference.rst | 1 + user_guide_src/source/installation/upgrade_310.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index aaca90840..1f036cd77 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -117,6 +117,7 @@ This article is intended to be a reference for them. just send a query to the database and not care for the result. .. php:method:: affected_rows() + :returns: Number of rows affected :rtype: int diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index 1dc71a58c..812162308 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -21,7 +21,7 @@ no longer be used with the 'odbc' database driver. This is because, due to its nature, the `ODBC extension for PHP `_ does not provide a function that allows to safely escape user-supplied strings for usage -inside an SQL query (which our :doc:`Query Builder ` relies on). +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 -- cgit v1.2.3-24-g4f1b From 54f6a09e22a0d564317fc84ea32a9c7072bebe0f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 20:21:39 +0300 Subject: [ci skip] Officially drop PHP 5.2.x --- .travis.yml | 3 --- readme.rst | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e531f8d90..b32390dfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.2 - 5.3 - 5.4 - 5.5 @@ -21,7 +20,6 @@ env: sudo: false before_script: - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear channel-discover pear.bovigo.org && pear install bovigo/vfsStream-beta; else composer install --dev --no-progress; fi" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi" @@ -30,7 +28,6 @@ script: phpunit -d zend.enable_gc=0 -d date.timezone=UTC --coverage-text --confi matrix: allow_failures: - - php: 5.2 - php: 5.3 - php: hhvm exclude: diff --git a/readme.rst b/readme.rst index 7a376322d..f5d737028 100644 --- a/readme.rst +++ b/readme.rst @@ -31,7 +31,7 @@ Server Requirements PHP version 5.6 or newer is recommended. -It should work on 5.2.4 as well, but we strongly advise you NOT to run +It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. -- cgit v1.2.3-24-g4f1b From bcfe461f69c29805229c60d5643604edbae997aa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 20:34:30 +0300 Subject: [ci skip] More on dropping 5.2.x --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/contributing/index.rst | 8 ++++---- user_guide_src/source/general/requirements.rst | 4 ++-- user_guide_src/source/general/styleguide.rst | 4 ++-- user_guide_src/source/installation/upgrade_310.rst | 13 ++++++++++++- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 76aeecbcb..058eb275f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: July 26, 2016 - Fixed an SQL injection in the 'odbc' database driver. - Updated :php:func:`set_realpath()` :doc:`Path Helpr ` function to filter-out ``php://`` wrapper inputs. + - Officially dropped any kind of support for PHP 5.2.x and anything under 5.3.7. - General Changes diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index 739d436a0..be776ec1f 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -103,10 +103,10 @@ must also be updated for every change. Also PHPDoc blocks must be maintained. Compatibility ============= -CodeIgniter recommends PHP 5.4 or newer to be used, but it should be -compatible with PHP 5.2.4 so all code supplied must stick to this -requirement. If PHP 5.3 (and above) functions or features are used then -there must be a fallback for PHP 5.2.4. +CodeIgniter recommends PHP 5.6 or newer to be used, but it should be +compatible with PHP 5.3.7 so all code supplied must stick to this +requirement. If PHP 5.4 (and above) functions or features are used then +there must be a fallback for PHP 5.3.7. Branching ========= diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index f90cdd30d..f2729f3d5 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -2,9 +2,9 @@ Server Requirements ################### -`PHP `_ version 5.4 or newer is recommended. +`PHP `_ version 5.6 or newer is recommended. -It should work on 5.2.4 as well, but we strongly advise you NOT to run +It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 7704a59c5..9b4a84e14 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -345,8 +345,8 @@ inability for CodeIgniter to send proper headers. Compatibility ============= -CodeIgniter recommends PHP 5.4 or newer to be used, but it should be -compatible with PHP 5.2.4. Your code must either be compatible with this +CodeIgniter recommends PHP 5.6 or newer to be used, but it should be +compatible with PHP 5.3.7. Your code must either be compatible with this requirement, provide a suitable fallback, or be an optional feature that dies quietly without affecting a user's application. diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst index 812162308..9e0108691 100644 --- a/user_guide_src/source/installation/upgrade_310.rst +++ b/user_guide_src/source/installation/upgrade_310.rst @@ -13,7 +13,18 @@ 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: If you're using the 'odbc' database driver, check for usage of Query Builder +Step 2: Check your PHP version +============================== + +We recommend always running versions that are `currently supported +`_, which right now is at least PHP 5.6. + +PHP 5.2.x versions are now officially not supported by CodeIgniter, and while 5.3.7+ +may be at least runnable, we strongly discourage you from using any PHP versions below +the ones listed on the `PHP.net Supported Versions `_ +page. + +Step 3: If you're using the 'odbc' database driver, check for usage of Query Builder ==================================================================================== :doc:`Query Builder <../database/query_builder>` functionality and ``escape()`` can -- cgit v1.2.3-24-g4f1b From 0b9540209499fbd0515e13fdc66e85dea4b6baad Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 20:52:30 +0300 Subject: [ci skip] Mark the start of 3.1.1 development --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 13 +++++++++++++ user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_311.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 6 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_311.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 2525edae2..70f33d5ed 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.1.0'); + define('CI_VERSION', '3.1.1-dev'); /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 058eb275f..c09c1b592 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,19 @@ Change Log ########## +Version 3.1.1 +============= + +Release Date: Not Released + + + +Bug fixes for 3.1.1 +------------------- + + + + Version 3.1.0 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 9e78d242d..0c4901d8f 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.0' +version = '3.1.1-dev' # The full version, including alpha/beta/rc tags. -release = '3.1.0' +release = '3.1.1-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 80d2412cd..7380dcb28 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.0 (Current version) `_ +- `CodeIgniter v3.1.1 (Current version) `_ +- `CodeIgniter v3.1.0 `_ - `CodeIgniter v3.0.6 `_ - `CodeIgniter v3.0.5 `_ - `CodeIgniter v3.0.4 `_ diff --git a/user_guide_src/source/installation/upgrade_311.rst b/user_guide_src/source/installation/upgrade_311.rst new file mode 100644 index 000000000..a36e72323 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_311.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.1.0 to 3.1.1 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index f0cf8c903..727d054d1 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.0 to 3.1.1 Upgrading from 3.0.6 to 3.1.0 Upgrading from 3.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 -- cgit v1.2.3-24-g4f1b From d293fdd18125f393b196360f963c39cfd73e8521 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 21:04:01 +0300 Subject: Add 3.1-stable to tested branches list --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index b32390dfb..5815c9577 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,4 +46,5 @@ branches: only: - develop - 3.0-stable + - 3.1-stable - /^feature\/.+$/ -- cgit v1.2.3-24-g4f1b From 005ca972ba5056111354d3af6203cc7af047fb39 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 21:17:41 +0300 Subject: Fix Travis builds --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5815c9577..54647689b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ env: sudo: false before_script: + - sh -c "composer install --dev --no-progress" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi" -- cgit v1.2.3-24-g4f1b From 12117be8293eff1a56b575ccc2e5d11c68c8cfcf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 21:19:58 +0300 Subject: Fix Travis builds --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4680d2ac6..22c3b6e18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,10 +19,7 @@ env: sudo: false before_script: -<<<<<<< HEAD - sh -c "composer install --dev --no-progress" -======= ->>>>>>> 3.1-stable - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi" -- cgit v1.2.3-24-g4f1b From 1748567f5442409d6a8c1e795f56599caff8296e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Jul 2016 15:16:38 +0300 Subject: [ci skip] Fix #3919, #4732 --- system/libraries/Session/drivers/Session_memcached_driver.php | 8 ++------ user_guide_src/source/changelog.rst | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 88eb4b3a6..99b4d1baa 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -209,10 +209,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa $this->_memcached->replace($this->_lock_key, time(), 300); if ($this->_fingerprint !== ($fingerprint = md5($session_data))) { - if ( - $this->_memcached->replace($key, $session_data, $this->_config['expiration']) - OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) - ) + if ($this->_memcached->set($key, $session_data, $this->_config['expiration'])) { $this->_fingerprint = $fingerprint; return $this->_success; @@ -220,8 +217,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return $this->_fail(); } - - if ( + elseif ( $this->_memcached->touch($key, $this->_config['expiration']) OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) ) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c09c1b592..400b36e09 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,7 +12,7 @@ Release Date: Not Released Bug fixes for 3.1.1 ------------------- - +- Fixed a bug (#4732) - :doc:`Session Library ` triggered errors while writing data for a newly-created sessions with the 'memcached' driver. Version 3.1.0 -- cgit v1.2.3-24-g4f1b From a838279625becfba98ccb7635d35c67297129c42 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Jul 2016 16:40:12 +0300 Subject: Remove dead code written for PHP 5.2 --- system/core/CodeIgniter.php | 6 +- system/core/Security.php | 7 +- system/core/compat/password.php | 2 +- system/core/compat/standard.php | 207 --------------------- system/database/drivers/mysqli/mysqli_driver.php | 7 +- system/database/drivers/oci8/oci8_driver.php | 2 +- .../drivers/pdo/subdrivers/pdo_mysql_driver.php | 16 +- system/helpers/date_helper.php | 79 ++------ system/libraries/Email.php | 9 +- system/libraries/Encryption.php | 6 +- system/libraries/Form_validation.php | 13 +- system/libraries/Migration.php | 5 +- .../Session/drivers/Session_files_driver.php | 15 +- system/libraries/Upload.php | 41 ++-- tests/Bootstrap.php | 6 - tests/codeigniter/core/Log_test.php | 10 - tests/codeigniter/core/compat/password_test.php | 5 - tests/codeigniter/core/compat/standard_test.php | 202 -------------------- tests/codeigniter/libraries/Upload_test.php | 12 +- .../source/general/compatibility_functions.rst | 32 ---- user_guide_src/source/general/hooks.rst | 4 +- user_guide_src/source/general/routing.rst | 4 +- user_guide_src/source/general/security.rst | 7 +- user_guide_src/source/libraries/encryption.rst | 2 +- .../source/libraries/form_validation.rst | 5 +- 25 files changed, 55 insertions(+), 649 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 70f33d5ed..22072e983 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -416,11 +416,7 @@ if ( ! is_php('5.4')) $params = array($method, array_slice($URI->rsegments, 2)); $method = '_remap'; } - // WARNING: It appears that there are issues with is_callable() even in PHP 5.2! - // Furthermore, there are bug reports and feature/change requests related to it - // that make it unreliable to use in this context. Please, DO NOT change this - // work-around until a better alternative is available. - elseif ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($class)), TRUE)) + elseif ( ! is_callable(array($class, $method))) { $e404 = TRUE; } diff --git a/system/core/Security.php b/system/core/Security.php index d5305d1ca..a29070095 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -678,12 +678,7 @@ class CI_Security { { if ( ! isset($_entities)) { - $_entities = array_map( - 'strtolower', - is_php('5.3.4') - ? get_html_translation_table(HTML_ENTITIES, $flag, $charset) - : get_html_translation_table(HTML_ENTITIES, $flag) - ); + $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset)); // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 // entities to the array manually diff --git a/system/core/compat/password.php b/system/core/compat/password.php index 76dd2cf0a..1b5219e7b 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // ------------------------------------------------------------------------ -if (is_php('5.5') OR ! is_php('5.3.7') OR ! defined('CRYPT_BLOWFISH') OR CRYPT_BLOWFISH !== 1 OR defined('HHVM_VERSION')) +if (is_php('5.5') OR ! defined('CRYPT_BLOWFISH') OR CRYPT_BLOWFISH !== 1 OR defined('HHVM_VERSION')) { return; } diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index c54cab951..c839c9bc9 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -180,210 +180,3 @@ if ( ! function_exists('hex2bin')) return pack('H*', $data); } } - -// ------------------------------------------------------------------------ - -if (is_php('5.3')) -{ - return; -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('array_replace')) -{ - /** - * array_replace() - * - * @link http://php.net/array_replace - * @return array - */ - function array_replace() - { - $arrays = func_get_args(); - - if (($c = count($arrays)) === 0) - { - trigger_error('array_replace() expects at least 1 parameter, 0 given', E_USER_WARNING); - return NULL; - } - elseif ($c === 1) - { - if ( ! is_array($arrays[0])) - { - trigger_error('array_replace(): Argument #1 is not an array', E_USER_WARNING); - return NULL; - } - - return $arrays[0]; - } - - $array = array_shift($arrays); - $c--; - - for ($i = 0; $i < $c; $i++) - { - if ( ! is_array($arrays[$i])) - { - trigger_error('array_replace(): Argument #'.($i + 2).' is not an array', E_USER_WARNING); - return NULL; - } - elseif (empty($arrays[$i])) - { - continue; - } - - foreach (array_keys($arrays[$i]) as $key) - { - $array[$key] = $arrays[$i][$key]; - } - } - - return $array; - } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('array_replace_recursive')) -{ - /** - * array_replace_recursive() - * - * @link http://php.net/array_replace_recursive - * @return array - */ - function array_replace_recursive() - { - $arrays = func_get_args(); - - if (($c = count($arrays)) === 0) - { - trigger_error('array_replace_recursive() expects at least 1 parameter, 0 given', E_USER_WARNING); - return NULL; - } - elseif ($c === 1) - { - if ( ! is_array($arrays[0])) - { - trigger_error('array_replace_recursive(): Argument #1 is not an array', E_USER_WARNING); - return NULL; - } - - return $arrays[0]; - } - - $array = array_shift($arrays); - $c--; - - for ($i = 0; $i < $c; $i++) - { - if ( ! is_array($arrays[$i])) - { - trigger_error('array_replace_recursive(): Argument #'.($i + 2).' is not an array', E_USER_WARNING); - return NULL; - } - elseif (empty($arrays[$i])) - { - continue; - } - - foreach (array_keys($arrays[$i]) as $key) - { - $array[$key] = (is_array($arrays[$i][$key]) && isset($array[$key]) && is_array($array[$key])) - ? array_replace_recursive($array[$key], $arrays[$i][$key]) - : $arrays[$i][$key]; - } - } - - return $array; - } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('quoted_printable_encode')) -{ - /** - * quoted_printable_encode() - * - * @link http://php.net/quoted_printable_encode - * @param string $str - * @return string - */ - function quoted_printable_encode($str) - { - if (strlen($str) === 0) - { - return ''; - } - elseif (in_array($type = gettype($str), array('array', 'object'), TRUE)) - { - if ($type === 'object' && method_exists($str, '__toString')) - { - $str = (string) $str; - } - else - { - trigger_error('quoted_printable_encode() expects parameter 1 to be string, '.$type.' given', E_USER_WARNING); - return NULL; - } - } - - if (function_exists('imap_8bit')) - { - return imap_8bit($str); - } - - $i = $lp = 0; - $output = ''; - $hex = '0123456789ABCDEF'; - $length = (extension_loaded('mbstring') && ini_get('mbstring.func_overload')) - ? mb_strlen($str, '8bit') - : strlen($str); - - while ($length--) - { - if ((($c = $str[$i++]) === "\015") && isset($str[$i]) && ($str[$i] === "\012") && $length > 0) - { - $output .= "\015".$str[$i++]; - $length--; - $lp = 0; - continue; - } - - if ( - ctype_cntrl($c) - OR (ord($c) === 0x7f) - OR (ord($c) & 0x80) - OR ($c === '=') - OR ($c === ' ' && isset($str[$i]) && $str[$i] === "\015") - ) - { - if ( - (($lp += 3) > 75 && ord($c) <= 0x7f) - OR (ord($c) > 0x7f && ord($c) <= 0xdf && ($lp + 3) > 75) - OR (ord($c) > 0xdf && ord($c) <= 0xef && ($lp + 6) > 75) - OR (ord($c) > 0xef && ord($c) <= 0xf4 && ($lp + 9) > 75) - ) - { - $output .= "=\015\012"; - $lp = 3; - } - - $output .= '='.$hex[ord($c) >> 4].$hex[ord($c) & 0xf]; - continue; - } - - if ((++$lp) > 75) - { - $output .= "=\015\012"; - $lp = 1; - } - - $output .= $c; - } - - return $output; - } -} diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index f52163c2d..f4597c746 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -125,8 +125,7 @@ class CI_DB_mysqli_driver extends CI_DB { } else { - // Persistent connection support was added in PHP 5.3.0 - $hostname = ($persistent === TRUE && is_php('5.3')) + $hostname = ($persistent === TRUE) ? 'p:'.$this->hostname : $this->hostname; $port = empty($this->port) ? NULL : $this->port; $socket = NULL; @@ -502,8 +501,8 @@ class CI_DB_mysqli_driver extends CI_DB { if ( ! empty($this->_mysqli->connect_errno)) { return array( - 'code' => $this->_mysqli->connect_errno, - 'message' => is_php('5.2.9') ? $this->_mysqli->connect_error : mysqli_connect_error() + 'code' => $this->_mysqli->connect_errno, + 'message' => $this->_mysqli->connect_error ); } diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index df7e0848a..56fdf32cf 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -386,7 +386,7 @@ class CI_DB_oci8_driver extends CI_DB { */ protected function _trans_begin() { - $this->commit_mode = is_php('5.3.2') ? OCI_NO_AUTO_COMMIT : OCI_DEFAULT; + $this->commit_mode = OCI_NO_AUTO_COMMIT; return TRUE; } diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 38a5a8aff..3631cdf7a 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -106,7 +106,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { empty($this->database) OR $this->dsn .= ';dbname='.$this->database; empty($this->char_set) OR $this->dsn .= ';charset='.$this->char_set; } - elseif ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE && is_php('5.3.6')) + elseif ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE) { $this->dsn .= ';charset='.$this->char_set; } @@ -122,17 +122,6 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { */ public function db_connect($persistent = FALSE) { - /* Prior to PHP 5.3.6, even if the charset was supplied in the DSN - * on connect - it was ignored. This is a work-around for the issue. - * - * Reference: http://www.php.net/manual/en/ref.pdo-mysql.connection.php - */ - if ( ! is_php('5.3.6') && ! empty($this->char_set)) - { - $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES '.$this->char_set - .(empty($this->dbcollat) ? '' : ' COLLATE '.$this->dbcollat); - } - if (isset($this->stricton)) { if ($this->stricton) @@ -169,8 +158,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { $this->options[PDO::MYSQL_ATTR_COMPRESS] = TRUE; } - // SSL support was added to PDO_MYSQL in PHP 5.3.7 - if (is_array($this->encrypt) && is_php('5.3.7')) + if (is_array($this->encrypt)) { $ssl = array(); empty($this->encrypt['ssl_key']) OR $ssl[PDO::MYSQL_ATTR_SSL_KEY] = $this->encrypt['ssl_key']; diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index c43209f05..5f1fcf07e 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -707,87 +707,32 @@ if ( ! function_exists('date_range')) $range = array(); - /* NOTE: Even though the DateTime object has many useful features, it appears that - * it doesn't always handle properly timezones, when timestamps are passed - * directly to its constructor. Neither of the following gave proper results: - * - * new DateTime('') - * new DateTime('', '') - * - * --- available in PHP 5.3: - * - * DateTime::createFromFormat('', '') - * DateTime::createFromFormat('', '', 'setTimestamp($unix_start); - if (is_php('5.3')) - { - $from->setTimestamp($unix_start); - if ($is_unix) - { - $arg = new DateTime(); - $arg->setTimestamp($mixed); - } - else - { - $arg = (int) $mixed; - } - - $period = new DatePeriod($from, new DateInterval('P1D'), $arg); - foreach ($period as $date) - { - $range[] = $date->format($format); - } - - /* If a period end date was passed to the DatePeriod constructor, it might not - * be in our results. Not sure if this is a bug or it's just possible because - * the end date might actually be less than 24 hours away from the previously - * generated DateTime object, but either way - we have to append it manually. - */ - if ( ! is_int($arg) && $range[count($range) - 1] !== $arg->format($format)) - { - $range[] = $arg->format($format); - } - - return $range; - } - - $from->setDate(date('Y', $unix_start), date('n', $unix_start), date('j', $unix_start)); - $from->setTime(date('G', $unix_start), date('i', $unix_start), date('s', $unix_start)); if ($is_unix) { $arg = new DateTime(); - $arg->setDate(date('Y', $mixed), date('n', $mixed), date('j', $mixed)); - $arg->setTime(date('G', $mixed), date('i', $mixed), date('s', $mixed)); + $arg->setTimestamp($mixed); } else { $arg = (int) $mixed; } - $range[] = $from->format($format); - if (is_int($arg)) // Day intervals + $period = new DatePeriod($from, new DateInterval('P1D'), $arg); + foreach ($period as $date) { - do - { - $from->modify('+1 day'); - $range[] = $from->format($format); - } - while (--$arg > 0); + $range[] = $date->format($format); } - else // end date UNIX timestamp - { - for ($from->modify('+1 day'), $end_check = $arg->format('Ymd'); $from->format('Ymd') < $end_check; $from->modify('+1 day')) - { - $range[] = $from->format($format); - } - // Our loop only appended dates prior to our end date + /* If a period end date was passed to the DatePeriod constructor, it might not + * be in our results. Not sure if this is a bug or it's just possible because + * the end date might actually be less than 24 hours away from the previously + * generated DateTime object, but either way - we have to append it manually. + */ + if ( ! is_int($arg) && $range[count($range) - 1] !== $arg->format($format)) + { $range[] = $arg->format($format); } diff --git a/system/libraries/Email.php b/system/libraries/Email.php index be89d6569..5049578ed 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1514,14 +1514,7 @@ class CI_Email { // which only works with "\n". if ($this->crlf === "\r\n") { - if (is_php('5.3')) - { - return quoted_printable_encode($str); - } - elseif (function_exists('imap_8bit')) - { - return imap_8bit($str); - } + return quoted_printable_encode($str); } // Reduce multiple spaces & remove nulls diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index a10a5c20c..06284c2ed 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -152,10 +152,8 @@ class CI_Encryption { public function __construct(array $params = array()) { $this->_drivers = array( - 'mcrypt' => defined('MCRYPT_DEV_URANDOM'), - // While OpenSSL is available for PHP 5.3.0, an IV parameter - // for the encrypt/decrypt functions is only available since 5.3.3 - 'openssl' => (is_php('5.3.3') && extension_loaded('openssl')) + 'mcrypt' => defined('MCRYPT_DEV_URANDOM'), + 'openssl' => extension_loaded('openssl') ); if ( ! $this->_drivers['mcrypt'] && ! $this->_drivers['openssl']) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 04445f5b7..25dc0d41e 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1216,18 +1216,7 @@ class CI_Form_validation { $str = 'ipv6.host'.substr($str, strlen($matches[1]) + 2); } - $str = 'http://'.$str; - - // There's a bug affecting PHP 5.2.13, 5.3.2 that considers the - // underscore to be a valid hostname character instead of a dash. - // Reference: https://bugs.php.net/bug.php?id=51192 - if (version_compare(PHP_VERSION, '5.2.13', '==') OR version_compare(PHP_VERSION, '5.3.2', '==')) - { - sscanf($str, 'http://%[^/]', $host); - $str = substr_replace($str, strtr($host, array('_' => '-', '-' => '_')), 7, strlen($host)); - } - - return (filter_var($str, FILTER_VALIDATE_URL) !== FALSE); + return (filter_var('http://'.$str, FILTER_VALIDATE_URL) !== FALSE); } // -------------------------------------------------------------------- diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 316c94ae3..3e2107e83 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -288,10 +288,7 @@ class CI_Migration { $this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class); return FALSE; } - // method_exists() returns true for non-public methods, - // while is_callable() can't be used without instantiating. - // Only get_class_methods() satisfies both conditions. - elseif ( ! in_array($method, array_map('strtolower', get_class_methods($class)))) + elseif ( ! is_callable(array($class, $method))) { $this->_error_string = sprintf($this->lang->line('migration_missing_'.$method.'_method'), $class); return FALSE; diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 57c3777a2..bf4df8b20 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -149,18 +149,9 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle // which re-reads session data if ($this->_file_handle === NULL) { - // Just using fopen() with 'c+b' mode would be perfect, but it is only - // available since PHP 5.2.6 and we have to set permissions for new files, - // so we'd have to hack around this ... - if (($this->_file_new = ! file_exists($this->_file_path.$session_id)) === TRUE) - { - if (($this->_file_handle = fopen($this->_file_path.$session_id, 'w+b')) === FALSE) - { - log_message('error', "Session: File '".$this->_file_path.$session_id."' doesn't exist and cannot be created."); - return $this->_failure; - } - } - elseif (($this->_file_handle = fopen($this->_file_path.$session_id, 'r+b')) === FALSE) + $this->_file_new = ! file_exists($this->_file_path.$session_id); + + if (($this->_file_handle = fopen($this->_file_path.$session_id, 'c+b')) === FALSE) { log_message('error', "Session: Unable to open file '".$this->_file_path.$session_id."'."); return $this->_failure; diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 056f6de1e..a8cf75264 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1086,13 +1086,7 @@ class CI_Upload { if (memory_get_usage() && ($memory_limit = ini_get('memory_limit'))) { $memory_limit *= 1024 * 1024; - - // There was a bug/behavioural change in PHP 5.2, where numbers over one million get output - // into scientific notation. number_format() ensures this number is an integer - // http://bugs.php.net/bug.php?id=43053 - - $memory_limit = number_format(ceil(filesize($file) + $memory_limit), 0, '.', ''); - + $memory_limit = (int) ceil(filesize($file) + $memory_limit); ini_set('memory_limit', $memory_limit); // When an integer is used, the value is measured in bytes. - PHP.net } @@ -1207,28 +1201,21 @@ class CI_Upload { // We'll need this to validate the MIME info string (e.g. text/plain; charset=us-ascii) $regexp = '/^([a-z\-]+\/[a-z0-9\-\.\+]+)(;\s.+)?$/'; - /* Fileinfo extension - most reliable method - * - * Unfortunately, prior to PHP 5.3 - it's only available as a PECL extension and the - * more convenient FILEINFO_MIME_TYPE flag doesn't exist. - */ - if (function_exists('finfo_file')) + // Fileinfo extension - most reliable method + $finfo = @finfo_open(FILEINFO_MIME); + if (is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system { - $finfo = @finfo_open(FILEINFO_MIME); - if (is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system + $mime = @finfo_file($finfo, $file['tmp_name']); + finfo_close($finfo); + + /* According to the comments section of the PHP manual page, + * it is possible that this function returns an empty string + * for some files (e.g. if they don't exist in the magic MIME database) + */ + if (is_string($mime) && preg_match($regexp, $mime, $matches)) { - $mime = @finfo_file($finfo, $file['tmp_name']); - finfo_close($finfo); - - /* According to the comments section of the PHP manual page, - * it is possible that this function returns an empty string - * for some files (e.g. if they don't exist in the magic MIME database) - */ - if (is_string($mime) && preg_match($regexp, $mime, $matches)) - { - $this->file_type = $matches[1]; - return; - } + $this->file_type = $matches[1]; + return; } } diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 8240d2340..b4e56bdae 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -1,10 +1,4 @@ markTestSkipped("PHP 5.2 doesn't have ReflectionProperty::setAccessible() and can't run this test"); - } - $path = new ReflectionProperty('CI_Log', '_log_path'); $path->setAccessible(TRUE); $threshold = new ReflectionProperty('CI_Log', '_threshold'); @@ -54,11 +49,6 @@ class Log_test extends CI_TestCase { public function test_format_line() { - if ( ! is_php('5.3')) - { - return $this->markTestSkipped("PHP 5.2 doesn't have ReflectionProperty::setAccessible() and can't run this test"); - } - $this->ci_set_config('log_path', ''); $this->ci_set_config('log_threshold', 0); $instance = new CI_Log(); diff --git a/tests/codeigniter/core/compat/password_test.php b/tests/codeigniter/core/compat/password_test.php index 8a507d14a..77f5eba4e 100644 --- a/tests/codeigniter/core/compat/password_test.php +++ b/tests/codeigniter/core/compat/password_test.php @@ -8,11 +8,6 @@ class password_test extends CI_TestCase { { return $this->markTestSkipped('ext/standard/password is available on PHP 5.5'); } - elseif ( ! is_php('5.3.7')) - { - $this->assertFalse(defined('PASSWORD_BCRYPT')); - return $this->markTestSkipped("PHP versions prior to 5.3.7 don't have the '2y' Blowfish version"); - } // defined as of HHVM 2.3.0, which is also when they introduce password_*() as well // Note: Do NOT move this after the CRYPT_BLOWFISH check elseif (defined('HHVM_VERSION')) diff --git a/tests/codeigniter/core/compat/standard_test.php b/tests/codeigniter/core/compat/standard_test.php index 4077a5c7c..a98460129 100644 --- a/tests/codeigniter/core/compat/standard_test.php +++ b/tests/codeigniter/core/compat/standard_test.php @@ -15,13 +15,6 @@ class standard_test extends CI_TestCase { { $this->assertTrue(function_exists('hex2bin')); } - - if ( ! is_php('5.3')) - { - $this->assertTrue(function_exists('array_replace')); - $this->assertTrue(function_exists('array_replace_recursive')); - $this->assertTrue(function_exists('quoted_printable_encode')); - } } // ------------------------------------------------------------------------ @@ -356,193 +349,6 @@ class standard_test extends CI_TestCase { $this->assertEquals('', hex2bin('')); $this->assertEquals("\x01\x02\x03", hex2bin(new FooHex())); } - - // ------------------------------------------------------------------------ - - /** - * array_replace(), array_replace_recursive() tests - * - * Borrowed from PHP's own tests - * - * @depends test_bootstrap - */ - public function test_array_replace_recursive() - { - if (is_php('5.3')) - { - return $this->markTestSkipped('array_replace() and array_replace_recursive() are already available on PHP 5.3'); - } - - $array1 = array( - 0 => 'dontclobber', - '1' => 'unclobbered', - 'test2' => 0.0, - 'test3' => array( - 'testarray2' => TRUE, - 1 => array( - 'testsubarray1' => 'dontclobber2', - 'testsubarray2' => 'dontclobber3' - ) - ) - ); - - $array2 = array( - 1 => 'clobbered', - 'test3' => array( - 'testarray2' => FALSE - ), - 'test4' => array( - 'clobbered3' => array(0, 1, 2) - ) - ); - - // array_replace() - $this->assertEquals( - array( - 0 => 'dontclobber', - 1 => 'clobbered', - 'test2' => 0.0, - 'test3' => array( - 'testarray2' => FALSE - ), - 'test4' => array( - 'clobbered3' => array(0, 1, 2) - ) - ), - array_replace($array1, $array2) - ); - - // array_replace_recursive() - $this->assertEquals( - array( - 0 => 'dontclobber', - 1 => 'clobbered', - 'test2' => 0.0, - 'test3' => array( - 'testarray2' => FALSE, - 1 => array( - 'testsubarray1' => 'dontclobber2', - 'testsubarray2' => 'dontclobber3' - ) - ), - 'test4' => array( - 'clobbered3' => array(0, 1, 2) - ) - ), - array_replace_recursive($array1, $array2) - ); - } - - // ------------------------------------------------------------------------ - - /** - * quoted_printable_encode() tests - * - * Borrowed from PHP's own tests - * - * @depends test_bootstrap - */ - public function test_quoted_printable_encode() - { - if (is_php('5.3')) - { - return $this->markTestSkipped('quoted_printable_encode() is already available on PHP 5.3'); - } - - // These are actually imap_8bit() tests: - $this->assertEquals("String with CRLF at end=20\r\n", quoted_printable_encode("String with CRLF at end \r\n")); - // ext/imap/tests/imap_8bit_basic.phpt says for this line: - // NB this appears to be a bug in cclient; a space at end of string should be encoded as =20 - $this->assertEquals("String with space at end ", quoted_printable_encode("String with space at end ")); - $this->assertEquals("String with tabs =09=09 in middle", quoted_printable_encode("String with tabs \t\t in middle")); - $this->assertEquals("String with tab at end =09", quoted_printable_encode("String with tab at end \t")); - $this->assertEquals("=00=01=02=03=04=FE=FF=0A=0D", quoted_printable_encode("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d")); - - if (function_exists('imap_8bit')) - { - return $this->markTestIncomplete('imap_8bit() exists and is called as an alias for quoted_printable_encode()'); - } - - // And these are from ext/standard/tests/strings/quoted_printable_encode_002.phpt: - $this->assertEquals( - "=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" - ."=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00", - $d = quoted_printable_encode(str_repeat("\0", 200)) - ); - $this->assertEquals(str_repeat("\x0", 200), quoted_printable_decode($d)); - $this->assertEquals( - "=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=\r\n" - ."=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=\r\n" - ."=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=\r\n" - ."=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=\r\n" - ."=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=\r\n" - ."=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=\r\n" - ."=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=\r\n" - ."=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=\r\n" - ."=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =\r\n" - ."=D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=\r\n" - ."=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=\r\n" - ."=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=\r\n" - ."=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=\r\n" - ."=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=\r\n" - ."=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=\r\n" - ."=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=\r\n" - ."=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=\r\n" - ."=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=\r\n" - ."=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=\r\n" - ."=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =\r\n" - ."=D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=\r\n" - ."=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=\r\n" - ."=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=\r\n" - ."=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=\r\n" - ."=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=\r\n" - ."=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=\r\n" - ."=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=\r\n" - ."=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=\r\n" - ."=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=\r\n" - ."=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=\r\n" - ."=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=\r\n" - ."=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =\r\n" - ."=D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=\r\n" - ."=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=\r\n" - ."=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=\r\n" - ."=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=\r\n" - ."=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=\r\n" - ."=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=\r\n" - ."=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=\r\n" - ."=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=\r\n" - ."=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=\r\n" - ."=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=\r\n" - ."=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =\r\n" - ."=D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=\r\n" - ."=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=\r\n" - ."=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=\r\n" - ."=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=\r\n" - ."=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=\r\n" - ."=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=\r\n" - ."=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=\r\n" - ."=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=\r\n" - ."=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=\r\n" - ."=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=\r\n" - ."=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=\r\n" - ."=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =\r\n" - ."=D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=\r\n" - ."=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=\r\n" - ."=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=\r\n" - ."=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=8E=D0=BD=D0=B8=\r\n" - ."=D0=BA=D0=BE=D0=B4=D0=B5=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0 =D0=B2 =D1=\r\n" - ."=8E=D0=BD=D0=B8=D0=BA=D0=BE=D0=B4=D0=B5", - $d = quoted_printable_encode(str_repeat('Ńтрока в юникоде', 50)) - ); - $this->assertEquals(str_repeat('Ńтрока в юникоде', 50), quoted_printable_decode($d)); - $this->assertEquals('this is a foo', quoted_printable_encode(new FooObject())); - } } // ------------------------------------------------------------------------ @@ -570,11 +376,3 @@ class FooHex { return '010203'; } } - -class FooObject -{ - public function __toString() - { - return 'this is a foo'; - } -} \ No newline at end of file diff --git a/tests/codeigniter/libraries/Upload_test.php b/tests/codeigniter/libraries/Upload_test.php index 4fbc11ef0..820bd37e2 100644 --- a/tests/codeigniter/libraries/Upload_test.php +++ b/tests/codeigniter/libraries/Upload_test.php @@ -25,14 +25,10 @@ class Upload_test extends CI_TestCase { ) ); - // ReflectionProperty::setAccessible() is not available in PHP 5.2.x - if (is_php('5.3')) - { - $reflection = new ReflectionClass($upload); - $reflection = $reflection->getProperty('_file_name_override'); - $reflection->setAccessible(TRUE); - $this->assertEquals('foo', $reflection->getValue($upload)); - } + $reflection = new ReflectionClass($upload); + $reflection = $reflection->getProperty('_file_name_override'); + $reflection->setAccessible(TRUE); + $this->assertEquals('foo', $reflection->getValue($upload)); $this->assertTrue($upload->file_ext_tolower); diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 434b0982f..936f2a24b 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -222,29 +222,6 @@ Function reference For more information, please refer to the `PHP manual for array_column() `_. -.. php:function:: array_replace(array $array1[, ...]) - - :param array $array1: Array in which to replace elements - :param array ...: Array (or multiple ones) from which to extract elements - :returns: Modified array - :rtype: array - - For more information, please refer to the `PHP manual for - array_replace() `_. - -.. php:function:: array_replace_recursive(array $array1[, ...]) - - :param array $array1: Array in which to replace elements - :param array ...: Array (or multiple ones) from which to extract elements - :returns: Modified array - :rtype: array - - For more information, please refer to the `PHP manual for - array_replace_recursive() `_. - - .. important:: Only PHP's native function can detect endless recursion. - Unless you are running PHP 5.3+, be careful with references! - .. php:function:: hex2bin($data) :param array $data: Hexadecimal representation of data @@ -253,12 +230,3 @@ Function reference For more information, please refer to the `PHP manual for hex2bin() `_. - -.. php:function:: quoted_printable_encode($str) - - :param string $str: Input string - :returns: 8bit-encoded string - :rtype: string - - For more information, please refer to the `PHP manual for - quoted_printable_encode() `_. \ No newline at end of file diff --git a/user_guide_src/source/general/hooks.rst b/user_guide_src/source/general/hooks.rst index ffe3fef39..6cc3407a3 100644 --- a/user_guide_src/source/general/hooks.rst +++ b/user_guide_src/source/general/hooks.rst @@ -56,8 +56,8 @@ defined in your associative hook array: - **params** Any parameters you wish to pass to your script. This item is optional. -If you're running PHP 5.3+, you can also use lambda/anoymous functions -(or closures) as hooks, with a simpler syntax:: +You can also use lambda/anoymous functions (or closures) as hooks, with +a simpler syntax:: $hook['post_controller'] = function() { diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 515368099..b53a85d31 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -133,8 +133,8 @@ might be a good starting point. Callbacks ========= -If you are using PHP >= 5.3 you can use callbacks in place of the normal -routing rules to process the back-references. Example:: +You can also use callbacks in place of the normal routing rules to process +the back-references. Example:: $route['products/([a-zA-Z]+)/edit/(\d+)'] = function ($product_type, $id) { diff --git a/user_guide_src/source/general/security.rst b/user_guide_src/source/general/security.rst index 8afdaca31..744a2c934 100644 --- a/user_guide_src/source/general/security.rst +++ b/user_guide_src/source/general/security.rst @@ -133,12 +133,7 @@ with that. Please read below. in PHP's own `Password Hashing `_ functions. Please use them, even if you're not running PHP 5.5+, CodeIgniter - provides them for you as long as you're running at least PHP version - 5.3.7 (and if you don't meet that requirement - please, upgrade). - - If you're one of the really unlucky people who can't even upgrade to a - more recent PHP version, use `hash_pbkdf() `, - which we also provide in our compatibility layer. + provides them for you. - DO NOT ever display or send a password in plain-text format! diff --git a/user_guide_src/source/libraries/encryption.rst b/user_guide_src/source/libraries/encryption.rst index cac4b7921..377e650a9 100644 --- a/user_guide_src/source/libraries/encryption.rst +++ b/user_guide_src/source/libraries/encryption.rst @@ -13,7 +13,7 @@ unfortunately not always available on all systems. You must meet one of the following dependencies in order to use this library: -- `OpenSSL `_ (and PHP 5.3.3) +- `OpenSSL `_ - `MCrypt `_ (and `MCRYPT_DEV_URANDOM` availability) If neither of the above dependencies is met, we simply cannot offer diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index b03b544e2..5b9a74273 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -495,8 +495,7 @@ The above code would use the ``valid_username()`` method from your This is just an example of course, and callbacks aren't limited to models. You can use any object/method that accepts the field value as its' first -parameter. Or if you're running PHP 5.3+, you can also use an anonymous -function:: +parameter. You can also use an anonymous function:: $this->form_validation->set_rules( 'username', 'Username', @@ -522,7 +521,7 @@ the second element of an array, with the first one being the rule name:: ) ); -Anonymous function (PHP 5.3+) version:: +Anonymous function version:: $this->form_validation->set_rules( 'username', 'Username', -- cgit v1.2.3-24-g4f1b From ca102a05b1403c573f03c4cdb7fbba15ab99fe87 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Jul 2016 17:22:21 +0300 Subject: [ci skip] Use const keyword to define CI_VERSION Because. --- system/core/CodeIgniter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 22072e983..804c6856d 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - define('CI_VERSION', '3.1.1-dev'); + const CI_VERSION = '3.1.1-dev'; /* * ------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From b9f53a8d7a96bad5c6f1ff7e41a075fcb5d8fb5c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jul 2016 11:31:05 +0300 Subject: [ci skip] Fix #4736 --- system/libraries/Image_lib.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 24fe8c68d..7ec8ba365 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -886,7 +886,7 @@ class CI_Image_lib { } } - $cmd .= ' "'.escapeshellarg($this->full_src_path).'" "'.escapeshellarg($this->full_dst_path).'" 2>&1'; + $cmd .= escapeshellarg($this->full_src_path).' '.escapeshellarg($this->full_dst_path).' 2>&1'; $retval = 1; // exec() might be disabled diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 400b36e09..0fc3138b7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Bug fixes for 3.1.1 ------------------- - Fixed a bug (#4732) - :doc:`Session Library ` triggered errors while writing data for a newly-created sessions with the 'memcached' driver. +- Fixed a regression (#4736) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. Version 3.1.0 -- cgit v1.2.3-24-g4f1b From acc6481807fc9cac56b7c1de16239d98af711575 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jul 2016 11:42:28 +0300 Subject: Fix #4737 --- system/database/DB_query_builder.php | 4 ++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 713bf18f3..7a008eeb8 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1271,7 +1271,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { */ protected function _limit($sql) { - return $sql.' LIMIT '.($this->qb_offset ? $this->qb_offset.', ' : '').$this->qb_limit; + return $sql.' LIMIT '.($this->qb_offset ? $this->qb_offset.', ' : '').(int) $this->qb_limit; } // -------------------------------------------------------------------- @@ -2340,7 +2340,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { .$this->_compile_order_by(); // ORDER BY // LIMIT - if ($this->qb_limit) + if ($this->qb_limit OR $this->qb_offset) { return $this->_limit($sql."\n"); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0fc3138b7..4f04d4b8b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4732) - :doc:`Session Library ` triggered errors while writing data for a newly-created sessions with the 'memcached' driver. - Fixed a regression (#4736) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. +- Fixed a bug (#4737) - :doc:`Query Builder ` didn't add an ``OFFSET`` when ``LIMIT`` is zero or unused. Version 3.1.0 -- cgit v1.2.3-24-g4f1b From 4a0ed97e26101bb5346972d2486668e1b5dfa561 Mon Sep 17 00:00:00 2001 From: Masterklavi Date: Sun, 31 Jul 2016 03:25:56 +0500 Subject: Changed the return value of CI_DB_result::_fetch_object(..) to object --- system/database/DB_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_result.php b/system/database/DB_result.php index d9d1fccc7..4e2429376 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -660,7 +660,7 @@ class CI_DB_result { */ protected function _fetch_object($class_name = 'stdClass') { - return array(); + return new $class_name(); } } -- cgit v1.2.3-24-g4f1b From ac8541b99be74c2870699221efbe898f132217e3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 1 Aug 2016 11:37:04 +0300 Subject: Merge pull request #4742 from masterklavi/db_fetch_object Change ... for the sake of change --- system/database/DB_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_result.php b/system/database/DB_result.php index d9d1fccc7..4e2429376 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -660,7 +660,7 @@ class CI_DB_result { */ protected function _fetch_object($class_name = 'stdClass') { - return array(); + return new $class_name(); } } -- cgit v1.2.3-24-g4f1b From 9b0f5fa0339eb1f74ff06e769d71e5911ba2be06 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 1 Aug 2016 13:54:06 +0300 Subject: [ci skip] Fix #4739 --- system/libraries/Email.php | 3 ++- user_guide_src/source/changelog.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 5049578ed..315200344 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1468,7 +1468,8 @@ class CI_Email { .'Content-Type: '.$this->_attachments[$i]['type'].'; name="'.$name.'"'.$this->newline .'Content-Disposition: '.$this->_attachments[$i]['disposition'].';'.$this->newline .'Content-Transfer-Encoding: base64'.$this->newline - .(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline.$this->newline) + .(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline) + .$this->newline .$this->_attachments[$i]['content'].$this->newline; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4f04d4b8b..8e047953d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,7 +15,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4732) - :doc:`Session Library ` triggered errors while writing data for a newly-created sessions with the 'memcached' driver. - Fixed a regression (#4736) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. - Fixed a bug (#4737) - :doc:`Query Builder ` didn't add an ``OFFSET`` when ``LIMIT`` is zero or unused. - +- Fixed a regression (#4739) - :doc:`Email Library ` doesn't properly separate attachment bodies from headers. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From de4686ab2cb4d8de9995eeba62a12f632c2e3324 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Tue, 9 Aug 2016 19:07:47 +0800 Subject: CI_Unit_test: Fix name of visible test items. Signed-off-by: tianhe1986 --- system/libraries/Unit_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 3ac6af78e..ea78e0d98 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -291,7 +291,7 @@ class CI_Unit_test { { continue; } - elseif (in_array($key, array('test_name', 'test_datatype', 'test_res_datatype', 'result'), TRUE)) + elseif (in_array($key, array('test_name', 'test_datatype', 'res_datatype', 'result'), TRUE)) { if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$val), FALSE))) { -- cgit v1.2.3-24-g4f1b From a40418b794843f9ab37c30a909f3118a5c1c63af Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Tue, 9 Aug 2016 19:25:07 +0800 Subject: CI_Unit_test: Do not replace "is_double" with "is_float". Signed-off-by: tianhe1986 --- system/libraries/Unit_test.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 3ac6af78e..eee0723a1 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -154,7 +154,6 @@ class CI_Unit_test { if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null', 'is_resource'), TRUE)) { - $expected = str_replace('is_double', 'is_float', $expected); $result = $expected($test); $extype = str_replace(array('true', 'false'), 'bool', str_replace('is_', '', $expected)); } -- cgit v1.2.3-24-g4f1b From 4e239a3913d161f560de9e20a3ef291ebf1c16fb Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Tue, 9 Aug 2016 22:34:42 +0530 Subject: URI schemes are not case sensitive Signed-off-by: Vivek Dinesh --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 04445f5b7..d5f67d1da 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1200,7 +1200,7 @@ class CI_Form_validation { { return FALSE; } - elseif ( ! in_array($matches[1], array('http', 'https'), TRUE)) + elseif ( ! in_array(strtolower($matches[1]), array('http', 'https'), TRUE)) { return FALSE; } -- cgit v1.2.3-24-g4f1b From fba242cf6bc99833c21fc3600fdff2691244e243 Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Tue, 9 Aug 2016 22:43:52 +0530 Subject: URI schemes are not case sensitive Signed-off-by: Vivek Dinesh --- system/libraries/Trackback.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index a9b256464..848f5b3c9 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -370,7 +370,7 @@ class CI_Trackback { { $url = trim($url); - if (strpos($url, 'http') !== 0) + if (strpos(strtolower($url), 'http') !== 0) { $url = 'http://'.$url; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index f965858e2..b01691ac2 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -352,7 +352,7 @@ class CI_Xmlrpc { */ public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080) { - if (strpos($url, 'http') !== 0) + if (strpos(strtolower($url), 'http') !== 0) { $url = 'http://'.$url; } -- cgit v1.2.3-24-g4f1b From b5e2410c54f867307fb88647729794a1ded7e552 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 13:21:15 +0300 Subject: Merge pull request #4754 from tianhe1986/develop_fix_unit_test_name CI_Unit_test: Fix translation of result datatype --- system/libraries/Unit_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 3ac6af78e..ea78e0d98 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -291,7 +291,7 @@ class CI_Unit_test { { continue; } - elseif (in_array($key, array('test_name', 'test_datatype', 'test_res_datatype', 'result'), TRUE)) + elseif (in_array($key, array('test_name', 'test_datatype', 'res_datatype', 'result'), TRUE)) { if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$val), FALSE))) { -- cgit v1.2.3-24-g4f1b From 7e6db8ef0dd87c11a77f674e77d8b47489eef8a5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 13:23:58 +0300 Subject: [ci skip] Add changelog entry for #4754 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8e047953d..75270489e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.1.1 - Fixed a regression (#4736) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. - Fixed a bug (#4737) - :doc:`Query Builder ` didn't add an ``OFFSET`` when ``LIMIT`` is zero or unused. - Fixed a regression (#4739) - :doc:`Email Library ` doesn't properly separate attachment bodies from headers. +- Fixed a bug (#4754) - :doc:`Unit Testing Library ` method ``result()`` didn't translate ``res_datatype``. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 353f7483c61e7e4d375d4637f1e97406669648ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 14:18:19 +0300 Subject: Merge pull request #4755 from tianhe1986/develop_not_replace_is_double CI_Unit_test: Do not replace "is_double" with "is_float". --- system/libraries/Unit_test.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index ea78e0d98..3122ed624 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -154,7 +154,6 @@ class CI_Unit_test { if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null', 'is_resource'), TRUE)) { - $expected = str_replace('is_double', 'is_float', $expected); $result = $expected($test); $extype = str_replace(array('true', 'false'), 'bool', str_replace('is_', '', $expected)); } -- cgit v1.2.3-24-g4f1b From 656fd7eef9624c3c07918b2d573d9ccb6f971c57 Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Wed, 10 Aug 2016 17:36:49 +0530 Subject: Better usage Based on GitHub discussion. Signed-off-by: Vivek Dinesh --- system/libraries/Trackback.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 848f5b3c9..7222c00c2 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -370,7 +370,7 @@ class CI_Trackback { { $url = trim($url); - if (strpos(strtolower($url), 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index b01691ac2..181a104d0 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -352,7 +352,7 @@ class CI_Xmlrpc { */ public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080) { - if (strpos(strtolower($url), 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } -- cgit v1.2.3-24-g4f1b From 878e23f8883b2510d573850deb7dca5761cc1848 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 15:15:49 +0300 Subject: Use getMockBuilder() in PHPUnit instead of the deprecated getMock() --- tests/codeigniter/core/Loader_test.php | 4 ++-- tests/codeigniter/helpers/date_helper_test.php | 4 ++-- tests/codeigniter/helpers/language_helper_test.php | 4 ++-- tests/codeigniter/helpers/number_helper_test.php | 4 ++-- tests/codeigniter/libraries/Calendar_test.php | 6 +++--- tests/codeigniter/libraries/Driver_test.php | 4 ++-- tests/codeigniter/libraries/Form_validation_test.php | 4 ++-- tests/codeigniter/libraries/Upload_test.php | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index db5088d80..c1c4997c4 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -291,7 +291,7 @@ class Loader_test extends CI_TestCase { $this->assertEquals($content.$value, $out); // Mock output class - $output = $this->getMock('CI_Output', array('append_output')); + $output = $this->getMockBuilder('CI_Output')->setMethods(array('append_output'))->getMock(); $output->expects($this->once())->method('append_output')->with($content.$value); $this->ci_instance_var('output', $output); @@ -441,7 +441,7 @@ class Loader_test extends CI_TestCase { { // Mock lang class and test load call $file = 'test'; - $lang = $this->getMock('CI_Lang', array('load')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); $lang->expects($this->once())->method('load')->with($file); $this->ci_instance_var('lang', $lang); $this->assertInstanceOf('CI_Loader', $this->load->language($file)); diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php index c80e92cd0..c4f99a97c 100644 --- a/tests/codeigniter/helpers/date_helper_test.php +++ b/tests/codeigniter/helpers/date_helper_test.php @@ -15,7 +15,7 @@ class Date_helper_test extends CI_TestCase { /* // This stub job, is simply to cater $config['time_reference'] - $config = $this->getMock('CI_Config'); + $config = $this->getMockBuilder('CI_Config')->getMock(); $config->expects($this->any()) ->method('item') ->will($this->returnValue('local')); @@ -37,7 +37,7 @@ class Date_helper_test extends CI_TestCase { /* // This stub job, is simply to cater $config['time_reference'] - $config = $this->getMock('CI_Config'); + $config = $this->getMockBuilder('CI_Config')->getMock(); $config->expects($this->any()) ->method('item') ->will($this->returnValue('UTC')); diff --git a/tests/codeigniter/helpers/language_helper_test.php b/tests/codeigniter/helpers/language_helper_test.php index 176da689a..1ddabea3d 100644 --- a/tests/codeigniter/helpers/language_helper_test.php +++ b/tests/codeigniter/helpers/language_helper_test.php @@ -5,7 +5,7 @@ class Language_helper_test extends CI_TestCase { public function test_lang() { $this->helper('language'); - $lang = $this->getMock('CI_Lang', array('line')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('line'))->getMock(); $lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->ci_instance_var('lang', $lang); @@ -13,4 +13,4 @@ class Language_helper_test extends CI_TestCase { $this->assertEquals('', lang(1, 'foo', array('class' => 'bar'))); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/helpers/number_helper_test.php b/tests/codeigniter/helpers/number_helper_test.php index 817db2c7e..663e354fe 100644 --- a/tests/codeigniter/helpers/number_helper_test.php +++ b/tests/codeigniter/helpers/number_helper_test.php @@ -11,7 +11,7 @@ class Number_helper_test extends CI_TestCase { // Mock away load, too much going on in there, // we'll just check for the expected parameter - $lang = $this->getMock($lang_cls, array('load')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); $lang->expects($this->once()) ->method('load') ->with($this->equalTo('number')); @@ -60,4 +60,4 @@ class Number_helper_test extends CI_TestCase { $this->assertEquals('112,283.3 TB', byte_format(123456789123456789)); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Calendar_test.php b/tests/codeigniter/libraries/Calendar_test.php index 54879fec9..ad1f45e8c 100644 --- a/tests/codeigniter/libraries/Calendar_test.php +++ b/tests/codeigniter/libraries/Calendar_test.php @@ -5,9 +5,9 @@ class Calendar_test extends CI_TestCase { public function set_up() { // Required for get_total_days() - $this->ci_instance_var('load', $this->getMock('CI_Loader', array('helper'))); + $this->ci_instance_var('load', $this->getMockBuilder('CI_Loader')->setMethods(array('helper'))->getMock()); - $lang = $this->getMock('CI_Lang', array('load', 'line')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load', 'line'))->getMock(); $lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->ci_instance_var('lang', $lang); @@ -219,4 +219,4 @@ class Calendar_test extends CI_TestCase { $this->assertEquals($array, $this->calendar->default_template()); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Driver_test.php b/tests/codeigniter/libraries/Driver_test.php index c62cbee45..e4401e688 100644 --- a/tests/codeigniter/libraries/Driver_test.php +++ b/tests/codeigniter/libraries/Driver_test.php @@ -16,7 +16,7 @@ class Driver_test extends CI_TestCase { // Mock Loader->get_package_paths $paths = 'get_package_paths'; - $ldr = $this->getMock('CI_Loader', array($paths)); + $ldr = $this->getMockBuilder('CI_Loader')->setMethods(array($paths))->getMock(); $ldr->expects($this->any())->method($paths)->will($this->returnValue(array(APPPATH, BASEPATH))); $this->ci_instance_var('load', $ldr); @@ -175,4 +175,4 @@ class Driver_test extends CI_TestCase { $this->assertEquals($return, $child->$method()); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index b87ca65ff..905f663e2 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -8,10 +8,10 @@ class Form_validation_test extends CI_TestCase { // Create a mock loader since load->helper() looks in the wrong directories for unit tests, // We'll use CI_TestCase->helper() instead - $loader = $this->getMock('CI_Loader', array('helper')); + $loader = $this->getMockBuilder('CI_Loader')->setMethods(array('helper'))->getMock(); // Same applies for lang - $lang = $this->getMock('CI_Lang', array('load')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); $this->ci_set_config('charset', 'UTF-8'); $utf8 = new Mock_Core_Utf8(); diff --git a/tests/codeigniter/libraries/Upload_test.php b/tests/codeigniter/libraries/Upload_test.php index 820bd37e2..8bac597b3 100644 --- a/tests/codeigniter/libraries/Upload_test.php +++ b/tests/codeigniter/libraries/Upload_test.php @@ -7,7 +7,7 @@ class Upload_test extends CI_TestCase { $ci = $this->ci_instance(); $ci->upload = new CI_Upload(); $ci->security = new Mock_Core_Security(); - $ci->lang = $this->getMock('CI_Lang', array('load', 'line')); + $ci->lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load', 'line'))->getMock(); $ci->lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->upload = $ci->upload; } @@ -296,4 +296,4 @@ class Upload_test extends CI_TestCase { $this->assertEquals('

Error test

', $this->upload->display_errors()); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From e33c82d62e5a56b2fe46096420de838eb74553e8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 15:18:31 +0300 Subject: Merge pull request #4758 from butane/uri_scheme_case URI schemes are not case-sensitive --- system/libraries/Form_validation.php | 2 +- system/libraries/Trackback.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 25dc0d41e..61f0298fd 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1200,7 +1200,7 @@ class CI_Form_validation { { return FALSE; } - elseif ( ! in_array($matches[1], array('http', 'https'), TRUE)) + elseif ( ! in_array(strtolower($matches[1]), array('http', 'https'), TRUE)) { return FALSE; } diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index a9b256464..7222c00c2 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -370,7 +370,7 @@ class CI_Trackback { { $url = trim($url); - if (strpos($url, 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index f965858e2..181a104d0 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -352,7 +352,7 @@ class CI_Xmlrpc { */ public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080) { - if (strpos($url, 'http') !== 0) + if (stripos($url, 'http') !== 0) { $url = 'http://'.$url; } -- cgit v1.2.3-24-g4f1b From 9180a1264dc536c34e5cc8a0e44bb399a8ba484f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 15:23:42 +0300 Subject: Add changelog entry and a test case for #4758 --- tests/codeigniter/libraries/Form_validation_test.php | 3 +++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 905f663e2..0815300e6 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -259,6 +259,9 @@ class Form_validation_test extends CI_TestCase { // https://github.com/bcit-ci/CodeIgniter/issues/4415 $this->assertTrue($this->form_validation->valid_url('http://[::1]/ipv6')); + // URI scheme case-sensitivity: https://github.com/bcit-ci/CodeIgniter/pull/4758 + $this->assertTrue($this->form_validation->valid_url('HtTp://127.0.0.1/')); + $this->assertFalse($this->form_validation->valid_url('htt://www.codeIgniter.com')); $this->assertFalse($this->form_validation->valid_url('')); $this->assertFalse($this->form_validation->valid_url('code igniter')); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 75270489e..e95d509f7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4737) - :doc:`Query Builder ` didn't add an ``OFFSET`` when ``LIMIT`` is zero or unused. - Fixed a regression (#4739) - :doc:`Email Library ` doesn't properly separate attachment bodies from headers. - Fixed a bug (#4754) - :doc:`Unit Testing Library ` method ``result()`` didn't translate ``res_datatype``. +- Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and `XML-RPC ` libraries treated URI schemes in a case-sensitive manner. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From e1f76634b6c658680c2ea869dc1bcc38828c7da0 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Thu, 11 Aug 2016 12:40:47 +0800 Subject: Cache_file: use is_file() for checking instead of file_exists(). Signed-off-by: tianhe1986 --- system/libraries/Cache/drivers/Cache_file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index e1ce16a5a..f579eaae4 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -120,7 +120,7 @@ class CI_Cache_file extends CI_Driver { */ public function delete($id) { - return file_exists($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE; + return is_file($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE; } // ------------------------------------------------------------------------ @@ -216,7 +216,7 @@ class CI_Cache_file extends CI_Driver { */ public function get_metadata($id) { - if ( ! file_exists($this->_cache_path.$id)) + if ( ! is_file($this->_cache_path.$id)) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 4c8a0eb32c2aa94eb621171a89084f1388e3c4c5 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Thu, 11 Aug 2016 12:54:15 +0800 Subject: Cache_file: use $data['time'] for calculating expired time. Signed-off-by: tianhe1986 --- system/libraries/Cache/drivers/Cache_file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index e1ce16a5a..c46de2f95 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -233,7 +233,7 @@ class CI_Cache_file extends CI_Driver { } return array( - 'expire' => $mtime + $data['ttl'], + 'expire' => $data['time'] + $data['ttl'], 'mtime' => $mtime ); } -- cgit v1.2.3-24-g4f1b From 04649d9dd5fbdf2d032eb3e4b969a4788d9451f0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 11 Aug 2016 14:13:11 +0300 Subject: Merge pull request #4761 from tianhe1986/develop_cache_file_check Cache_file: use is_file() for checking instead of file_exists(). --- system/libraries/Cache/drivers/Cache_file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index e1ce16a5a..f579eaae4 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -120,7 +120,7 @@ class CI_Cache_file extends CI_Driver { */ public function delete($id) { - return file_exists($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE; + return is_file($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE; } // ------------------------------------------------------------------------ @@ -216,7 +216,7 @@ class CI_Cache_file extends CI_Driver { */ public function get_metadata($id) { - if ( ! file_exists($this->_cache_path.$id)) + if ( ! is_file($this->_cache_path.$id)) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 87c50228998440b86f1ee4233ea8c6aacb0a8a3c Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Thu, 11 Aug 2016 20:03:34 +0800 Subject: Checking for $data['time']. Signed-off-by: tianhe1986 --- system/libraries/Cache/drivers/Cache_file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index c46de2f95..e5614f8bd 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -227,7 +227,7 @@ class CI_Cache_file extends CI_Driver { { $mtime = filemtime($this->_cache_path.$id); - if ( ! isset($data['ttl'])) + if ( ! isset($data['ttl']) OR ! isset($data['time'])) { return FALSE; } -- cgit v1.2.3-24-g4f1b From b6ed3d102dc7c8e2a591405e56aa780d64d385d6 Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Thu, 11 Aug 2016 17:40:45 +0530 Subject: URI schemes are not case-sensitive Signed-off-by: Vivek Dinesh --- system/helpers/url_helper.php | 2 +- system/libraries/Form_validation.php | 4 ++-- system/libraries/Javascript.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index fd7b5e116..82b9e02af 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -443,7 +443,7 @@ if ( ! function_exists('prep_url')) */ function prep_url($str = '') { - if ($str === 'http://' OR $str === '') + if (strtolower($str) === 'http://' OR $str === '') { return ''; } diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 61f0298fd..fa28a6207 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1523,12 +1523,12 @@ class CI_Form_validation { */ public function prep_url($str = '') { - if ($str === 'http://' OR $str === '') + if (strtolower($str) === 'http://' OR $str === '') { return ''; } - if (strpos($str, 'http://') !== 0 && strpos($str, 'https://') !== 0) + if (stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0) { return 'http://'.$str; } diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index dcf933779..2ddab38ee 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -650,11 +650,11 @@ class CI_Javascript { $this->_javascript_location = $this->CI->config->item('javascript_location'); } - if ($relative === TRUE OR strpos($external_file, 'http://') === 0 OR strpos($external_file, 'https://') === 0) + if ($relative === TRUE OR stripos($external_file, 'http://') === 0 OR stripos($external_file, 'https://') === 0) { $str = $this->_open_script($external_file); } - elseif (strpos($this->_javascript_location, 'http://') !== FALSE) + elseif (stripos($this->_javascript_location, 'http://') !== FALSE) { $str = $this->_open_script($this->_javascript_location.$external_file); } -- cgit v1.2.3-24-g4f1b From ae31a918a3c0eff331f3ae2f03afca25158e93ff Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Thu, 11 Aug 2016 20:13:06 +0800 Subject: Using "! isset($a, $b, ……)" instead of "! isset($a) OR ! isset($b) OR ……" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tianhe1986 --- system/libraries/Cache/drivers/Cache_file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index e5614f8bd..554f10b95 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -227,7 +227,7 @@ class CI_Cache_file extends CI_Driver { { $mtime = filemtime($this->_cache_path.$id); - if ( ! isset($data['ttl']) OR ! isset($data['time'])) + if ( ! isset($data['ttl'], $data['time'])) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 9514dc35154cdfd5e3380976a37c8a3640413e48 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 11 Aug 2016 15:14:33 +0300 Subject: Merge pull request #4762 from tianhe1986/develop_cache_file_metadata Cache_file: use $data['time'] for calculating expired time. --- system/libraries/Cache/drivers/Cache_file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index f579eaae4..93932d4cf 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -227,13 +227,13 @@ class CI_Cache_file extends CI_Driver { { $mtime = filemtime($this->_cache_path.$id); - if ( ! isset($data['ttl'])) + if ( ! isset($data['ttl'], $data['time'])) { return FALSE; } return array( - 'expire' => $mtime + $data['ttl'], + 'expire' => $data['time'] + $data['ttl'], 'mtime' => $mtime ); } -- cgit v1.2.3-24-g4f1b From 15a5e0db1fc00ad26516bd92f3c476bcc77fe5fe Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 11 Aug 2016 15:17:43 +0300 Subject: [ci skip] Add changelog entry for #4762 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e95d509f7..64ea521dd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Bug fixes for 3.1.1 - Fixed a regression (#4739) - :doc:`Email Library ` doesn't properly separate attachment bodies from headers. - Fixed a bug (#4754) - :doc:`Unit Testing Library ` method ``result()`` didn't translate ``res_datatype``. - Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and `XML-RPC ` libraries treated URI schemes in a case-sensitive manner. +- Fixed a bug (#4762) - :doc:`Cache Library ` 'file' driver method ``get_metadata()`` checked TTL time against ``mtime`` instead of the cache item's creation time. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 669cc5f881970ec3cc19b57f4da0382c7d8f5542 Mon Sep 17 00:00:00 2001 From: Vivek Dinesh Date: Thu, 11 Aug 2016 18:21:11 +0530 Subject: Removed useless checks Based on GitHub discussion. Signed-off-by: Vivek Dinesh --- system/helpers/url_helper.php | 2 +- system/libraries/Form_validation.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 82b9e02af..8a5a75c44 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -443,7 +443,7 @@ if ( ! function_exists('prep_url')) */ function prep_url($str = '') { - if (strtolower($str) === 'http://' OR $str === '') + if ($str === '') { return ''; } diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index fa28a6207..86a569ced 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1523,12 +1523,7 @@ class CI_Form_validation { */ public function prep_url($str = '') { - if (strtolower($str) === 'http://' OR $str === '') - { - return ''; - } - - if (stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0) + if ($str !== '' && stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0) { return 'http://'.$str; } -- cgit v1.2.3-24-g4f1b From a309badf3a73f427af030e790e5080347da67372 Mon Sep 17 00:00:00 2001 From: Kristaps V Date: Fri, 12 Aug 2016 17:55:36 +0300 Subject: Fix custom user agent not working Signed-off-by: Kristaps V --- system/libraries/Email.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 50d0cd04e..426731135 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1206,6 +1206,7 @@ class CI_Email { */ protected function _build_headers() { + $this->set_header('User-Agent', $this->useragent); $this->set_header('X-Sender', $this->clean_email($this->_headers['From'])); $this->set_header('X-Mailer', $this->useragent); $this->set_header('X-Priority', $this->_priorities[$this->priority]); -- cgit v1.2.3-24-g4f1b From abd7e295e65a27ae431641a7bbcbdc9b1fddedf5 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Fri, 19 Aug 2016 14:31:52 +0800 Subject: Common: Adding E_PARSE in error judgment. Signed-off-by: tianhe1986 --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index d66649f59..2c7651943 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -598,7 +598,7 @@ if ( ! function_exists('_error_handler')) */ function _error_handler($severity, $message, $filepath, $line) { - $is_error = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity); + $is_error = (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity); // When an error occurred, set the status header to '500 Internal Server Error' // to indicate to the client something went wrong. -- cgit v1.2.3-24-g4f1b From c114deba71fdbbb0b7087696960f15e5ae0a08c5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 19 Aug 2016 19:17:59 +0300 Subject: Merge pull request #4777 from tianhe1986/develop_error_handler Add E_PARSE to errors detected by shutdown handler --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index d66649f59..2c7651943 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -598,7 +598,7 @@ if ( ! function_exists('_error_handler')) */ function _error_handler($severity, $message, $filepath, $line) { - $is_error = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity); + $is_error = (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity); // When an error occurred, set the status header to '500 Internal Server Error' // to indicate to the client something went wrong. -- cgit v1.2.3-24-g4f1b From 69070510fb62887e5d06e446b50d3a941ee1e4f9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 19 Aug 2016 19:21:36 +0300 Subject: [ci skip] Add changelog entry for PR #4777 --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 64ea521dd..4870cb1a8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,7 +7,9 @@ Version 3.1.1 Release Date: Not Released +- General Changes + - Added ``E_PARSE`` to the list of error levels detected by the shutdown handler. Bug fixes for 3.1.1 ------------------- -- cgit v1.2.3-24-g4f1b From 2fb1551fe8eb73164d341909054cabe6c33a6fa8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 19 Aug 2016 19:26:27 +0300 Subject: Travis builds on PHP 7.1 (beta) --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54647689b..ba2d6b31d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ php: - 5.4 - 5.5 - 5.6 - - 7 + - 7.0 + - 7.1 - hhvm env: @@ -31,17 +32,16 @@ matrix: allow_failures: - php: 5.3 - php: hhvm + - php: 7.1 exclude: - php: hhvm env: DB=pgsql - php: hhvm env: DB=pdo/pgsql - - php: 7 + - php: 7.0 + env: DB=mysql + - php: 7.1 env: DB=mysql - - php: 5.2 - env: DB=sqlite - - php: 5.2 - env: DB=pdo/sqlite branches: only: -- cgit v1.2.3-24-g4f1b From b52ae04ae36b8d02b04b275cf34a73bf39bd5dff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 19 Aug 2016 19:26:27 +0300 Subject: Travis builds on PHP 7.1 (beta) --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22c3b6e18..334cb614f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,8 @@ php: - 5.4 - 5.5 - 5.6 - - 7 + - 7.0 + - 7.1 - hhvm env: @@ -29,12 +30,15 @@ script: phpunit -d zend.enable_gc=0 -d date.timezone=UTC --coverage-text --confi matrix: allow_failures: - php: hhvm + - php: 7.1 exclude: - php: hhvm env: DB=pgsql - php: hhvm env: DB=pdo/pgsql - - php: 7 + - php: 7.0 + env: DB=mysql + - php: 7.1 env: DB=mysql branches: -- cgit v1.2.3-24-g4f1b From 50e87ec848f27bb5e40093ade2b67dc104679fb9 Mon Sep 17 00:00:00 2001 From: Igor Ostapchuk Date: Sun, 21 Aug 2016 16:28:28 +0300 Subject: return fix --- system/libraries/Email.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 50d0cd04e..6a7e2b3a7 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1202,7 +1202,7 @@ class CI_Email { /** * Build final headers * - * @return string + * @return void */ protected function _build_headers() { @@ -2046,7 +2046,7 @@ class CI_Email { * * @param string * @param string - * @return string + * @return bool */ protected function _send_command($cmd, $data = '') { -- cgit v1.2.3-24-g4f1b From 1927709235ed11f51b700abcb390b660e2762053 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Aug 2016 11:34:56 +0300 Subject: Merge pull request #4778 from antydemant/patch-1 [ci skip] Docblock return type corrections --- system/libraries/Email.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 315200344..7f49c1b3d 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1202,7 +1202,7 @@ class CI_Email { /** * Build final headers * - * @return string + * @return void */ protected function _build_headers() { @@ -2046,7 +2046,7 @@ class CI_Email { * * @param string * @param string - * @return string + * @return bool */ protected function _send_command($cmd, $data = '') { -- cgit v1.2.3-24-g4f1b From 549a601bac3b1467168e0bb7b5642ba7fc59c35e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Aug 2016 13:18:36 +0300 Subject: Fix CI_Upload errors on PHP 7.1 --- system/libraries/Upload.php | 23 ++++++++++++++++++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index a8cf75264..23fd02ead 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1083,10 +1083,27 @@ class CI_Upload { return FALSE; } - if (memory_get_usage() && ($memory_limit = ini_get('memory_limit'))) + if (memory_get_usage() && ($memory_limit = ini_get('memory_limit')) > 0) { - $memory_limit *= 1024 * 1024; - $memory_limit = (int) ceil(filesize($file) + $memory_limit); + $memory_limit = str_split($memory_limit, strspn($memory_limit, '1234567890')); + if ( ! empty($memory_limit[1])) + { + switch ($memory_limit[1][0]) + { + case 'g': + case 'G': + $memory_limit[0] *= 1024 * 1024 * 1024; + break; + case 'm': + case 'M': + $memory_limit[0] *= 1024 * 1024; + break; + default: + break; + } + } + + $memory_limit = (int) ceil(filesize($file) + $memory_limit[0]); ini_set('memory_limit', $memory_limit); // When an integer is used, the value is measured in bytes. - PHP.net } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4870cb1a8..97b4d254d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -21,6 +21,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4754) - :doc:`Unit Testing Library ` method ``result()`` didn't translate ``res_datatype``. - Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and `XML-RPC ` libraries treated URI schemes in a case-sensitive manner. - Fixed a bug (#4762) - :doc:`Cache Library ` 'file' driver method ``get_metadata()`` checked TTL time against ``mtime`` instead of the cache item's creation time. +- Fixed a bug where :doc:`File Uploading Library ` generated error messages on PHP 7.1. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From c95df51c90dc9506ec9a37a43d87238965210550 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Aug 2016 13:19:24 +0300 Subject: Skip mcrypt-related testcases on PHP 7.1 ext/mcrypt is deprecated and the test cases in question trigger E_DEPRECATED messages as a result. --- tests/codeigniter/libraries/Encrypt_test.php | 6 +++++- tests/codeigniter/libraries/Encryption_test.php | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/codeigniter/libraries/Encrypt_test.php b/tests/codeigniter/libraries/Encrypt_test.php index ced763301..adbca31b2 100644 --- a/tests/codeigniter/libraries/Encrypt_test.php +++ b/tests/codeigniter/libraries/Encrypt_test.php @@ -10,6 +10,10 @@ class Encrypt_test extends CI_TestCase { { return; } + elseif (version_compare(PHP_VERSION, '7.1.0-alpha', '>=')) + { + return $this->markTestSkipped('ext/mcrypt is deprecated since PHP 7.1 and will generate notices here.'); + } $this->encrypt = new Mock_Libraries_Encrypt(); $this->ci_instance_var('encrypt', $this->encrypt); @@ -72,4 +76,4 @@ class Encrypt_test extends CI_TestCase { $this->assertEquals('cfb', $this->encrypt->get_mode()); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Encryption_test.php b/tests/codeigniter/libraries/Encryption_test.php index cbcae3133..96e52ada8 100644 --- a/tests/codeigniter/libraries/Encryption_test.php +++ b/tests/codeigniter/libraries/Encryption_test.php @@ -240,6 +240,10 @@ class Encryption_test extends CI_TestCase { { return $this->markTestSkipped('Cannot test MCrypt because it is not available.'); } + elseif (version_compare(PHP_VERSION, '7.1.0-alpha', '>=')) + { + return $this->markTestSkipped('ext/mcrypt is deprecated since PHP 7.1 and will generate notices here.'); + } $this->assertTrue(is_resource($this->encryption->__driver_get_handle('mcrypt', 'rijndael-128', 'cbc'))); } @@ -274,6 +278,10 @@ class Encryption_test extends CI_TestCase { $this->markTestSkipped('Both MCrypt and OpenSSL support are required for portability tests.'); return; } + elseif (version_compare(PHP_VERSION, '7.1.0-alpha', '>=')) + { + return $this->markTestSkipped('ext/mcrypt is deprecated since PHP 7.1 and will generate notices here.'); + } $message = 'This is a message encrypted via MCrypt and decrypted via OpenSSL, or vice-versa.'; @@ -377,4 +385,4 @@ class Encryption_test extends CI_TestCase { $this->assertEquals('stream', $this->encryption->mode); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From aed367157d396c8320e278d74227664e0af43d51 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Mon, 22 Aug 2016 19:04:27 +0800 Subject: Standard: filtering "resource" type in hex2bin() Signed-off-by: tianhe1986 --- system/core/compat/standard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index c839c9bc9..6b7caa485 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -153,7 +153,7 @@ if ( ! function_exists('hex2bin')) */ function hex2bin($data) { - if (in_array($type = gettype($data), array('array', 'double', 'object'), TRUE)) + if (in_array($type = gettype($data), array('array', 'double', 'object', 'resource'), TRUE)) { if ($type === 'object' && method_exists($data, '__toString')) { -- cgit v1.2.3-24-g4f1b From fa1ca8bdee7021a67f58a5278900266c16ef7cd7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Aug 2016 14:13:54 +0300 Subject: Merge pull request #4780 from tianhe1986/develop_standard_hex2bin [ci skip] Trigger error for "resource" type in hex2bin() inputs --- system/core/compat/standard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index c839c9bc9..6b7caa485 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -153,7 +153,7 @@ if ( ! function_exists('hex2bin')) */ function hex2bin($data) { - if (in_array($type = gettype($data), array('array', 'double', 'object'), TRUE)) + if (in_array($type = gettype($data), array('array', 'double', 'object', 'resource'), TRUE)) { if ($type === 'object' && method_exists($data, '__toString')) { -- cgit v1.2.3-24-g4f1b From 5ecf4f91caba105128405b784ceac93c1af69362 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Aug 2016 14:16:33 +0300 Subject: [ci skip] Add changelog entry for PR #4780 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 97b4d254d..aa9af21b6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and `XML-RPC ` libraries treated URI schemes in a case-sensitive manner. - Fixed a bug (#4762) - :doc:`Cache Library ` 'file' driver method ``get_metadata()`` checked TTL time against ``mtime`` instead of the cache item's creation time. - Fixed a bug where :doc:`File Uploading Library ` generated error messages on PHP 7.1. +- Fixed a bug (#4780) - :doc:`compatibility function ` ``hex2bin()`` didn't reject inputs of type "resource". Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 24ad2dd11ed66bafe3a8a9224b310d7e4b005446 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Tue, 23 Aug 2016 17:44:21 +0800 Subject: Hash: processing algorithm name case-insensitively in hash_pbkdf2(): Signed-off-by: tianhe1986 --- system/core/compat/hash.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 6854e4c26..6d4a0c19a 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -119,6 +119,7 @@ if ( ! function_exists('hash_pbkdf2')) */ function hash_pbkdf2($algo, $password, $salt, $iterations, $length = 0, $raw_output = FALSE) { + $algo = strtolower($algo); if ( ! in_array($algo, hash_algos(), TRUE)) { trigger_error('hash_pbkdf2(): Unknown hashing algorithm: '.$algo, E_USER_WARNING); -- cgit v1.2.3-24-g4f1b From 1de09516123b4ca1caeef667d58261105d854ffe Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Tue, 23 Aug 2016 18:21:35 +0800 Subject: Move strtolower() inside the is_array() check, Signed-off-by: tianhe1986 --- system/core/compat/hash.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 6d4a0c19a..d567d0f80 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -119,8 +119,7 @@ if ( ! function_exists('hash_pbkdf2')) */ function hash_pbkdf2($algo, $password, $salt, $iterations, $length = 0, $raw_output = FALSE) { - $algo = strtolower($algo); - if ( ! in_array($algo, hash_algos(), TRUE)) + if ( ! in_array(strtolower($algo), hash_algos(), TRUE)) { trigger_error('hash_pbkdf2(): Unknown hashing algorithm: '.$algo, E_USER_WARNING); return FALSE; -- cgit v1.2.3-24-g4f1b From a9d83fb0ddef91f0fb386cbe8bdb9cef69ca2af3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 23 Aug 2016 14:07:11 +0300 Subject: Merge pull request #4781 from tianhe1986/develop_hash_pbkdf2 Hash: processing algorithm name case-insensitively in hash_pbkdf2() --- system/core/compat/hash.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 6854e4c26..d567d0f80 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -119,7 +119,7 @@ if ( ! function_exists('hash_pbkdf2')) */ function hash_pbkdf2($algo, $password, $salt, $iterations, $length = 0, $raw_output = FALSE) { - if ( ! in_array($algo, hash_algos(), TRUE)) + if ( ! in_array(strtolower($algo), hash_algos(), TRUE)) { trigger_error('hash_pbkdf2(): Unknown hashing algorithm: '.$algo, E_USER_WARNING); return FALSE; -- cgit v1.2.3-24-g4f1b From 27210ea42f3aea0d2e52b2738181f3fb1170775e Mon Sep 17 00:00:00 2001 From: Antônio Date: Fri, 26 Aug 2016 17:00:23 -0300 Subject: fix typo --- system/core/Security.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index a29070095..3a5da4fde 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -230,7 +230,7 @@ class CI_Security { $this->csrf_show_error(); } - // We kill this since we're done and we don't want to polute the _POST array + // We kill this since we're done and we don't want to pollute the _POST array unset($_POST[$this->_csrf_token_name]); // Regenerate on every submission? -- cgit v1.2.3-24-g4f1b From 1d0bd83d0f4b9f133bf9657113fc50d57d767762 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Aug 2016 14:14:54 +0300 Subject: Merge pull request #4785 from guitarrist/develop [ci skip] Fix a comment typo --- system/core/Security.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index a29070095..3a5da4fde 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -230,7 +230,7 @@ class CI_Security { $this->csrf_show_error(); } - // We kill this since we're done and we don't want to polute the _POST array + // We kill this since we're done and we don't want to pollute the _POST array unset($_POST[$this->_csrf_token_name]); // Regenerate on every submission? -- cgit v1.2.3-24-g4f1b From 0abc0dfca3c4e9e17da07edc864e009c13222174 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Aug 2016 15:15:49 +0300 Subject: Fix #4787 --- system/libraries/Form_validation.php | 4 ++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 61f0298fd..c39b65d89 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1229,9 +1229,9 @@ class CI_Form_validation { */ public function valid_email($str) { - if (function_exists('idn_to_ascii') && $atpos = strpos($str, '@')) + if (function_exists('idn_to_ascii') && sscanf($str, '%[^@]@%s', $name, $domain) === 2) { - $str = substr($str, 0, ++$atpos).idn_to_ascii(substr($str, $atpos)); + $str = $name.'@'.idn_to_ascii($domain); } return (bool) filter_var($str, FILTER_VALIDATE_EMAIL); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index aa9af21b6..5bdcda934 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4762) - :doc:`Cache Library ` 'file' driver method ``get_metadata()`` checked TTL time against ``mtime`` instead of the cache item's creation time. - Fixed a bug where :doc:`File Uploading Library ` generated error messages on PHP 7.1. - Fixed a bug (#4780) - :doc:`compatibility function ` ``hex2bin()`` didn't reject inputs of type "resource". +- Fixed a bug (#4787) - :doc:`Form Validation Library ` method ``valid_email()`` triggered ``E_WARNING`` when input emails have empty domain names. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 19d033c5e32b0ab61041381c76b34f972513e525 Mon Sep 17 00:00:00 2001 From: "Éderson T. Szlachta" Date: Mon, 29 Aug 2016 19:04:34 -0300 Subject: OpenOffice mime-types According to IANA media types : http://www.iana.org/assignments/media-types/media-types.xhtml --- application/config/mimes.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index 8bac87251..017653335 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -163,5 +163,21 @@ return array( 'vcf' => 'text/x-vcard', 'srt' => array('text/srt', 'text/plain'), 'vtt' => array('text/vtt', 'text/plain'), - 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon') + 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'), + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'otf' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web' ); -- cgit v1.2.3-24-g4f1b From a70b9614e71c0060700ab99bfa752fa2b9fafaed Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 30 Aug 2016 10:58:19 +0300 Subject: Merge pull request #4788 from edtsz/patch-2 Add OpenOffice mime-types to config/mimes.php --- application/config/mimes.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index 8bac87251..017653335 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -163,5 +163,21 @@ return array( 'vcf' => 'text/x-vcard', 'srt' => array('text/srt', 'text/plain'), 'vtt' => array('text/vtt', 'text/plain'), - 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon') + 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'), + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'otf' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web' ); -- cgit v1.2.3-24-g4f1b From 9dc8cacf71ed228452da451b2cf216a4fa6c1cd1 Mon Sep 17 00:00:00 2001 From: intekhab Date: Fri, 9 Sep 2016 15:53:40 +0530 Subject: supplied flag to turn off mysqli SSL verification if ssl_verify passed as false --- system/database/drivers/mysqli/mysqli_driver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index c26f975c4..2dc2a9710 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -184,6 +184,7 @@ class CI_DB_mysqli_driver extends CI_DB { elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) { $this->_mysqli->options(MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT, TRUE); + $client_flags |= MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT; } } -- cgit v1.2.3-24-g4f1b From 24bd981e2fdbb22064f3d89c81367f69f9e52f6a Mon Sep 17 00:00:00 2001 From: intekhab Date: Fri, 9 Sep 2016 17:45:02 +0530 Subject: Removed mysqli options function for ssl certificate verification false --- system/database/drivers/mysqli/mysqli_driver.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 2dc2a9710..cf931a351 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -183,7 +183,6 @@ class CI_DB_mysqli_driver extends CI_DB { // https://bugs.php.net/bug.php?id=68344 elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) { - $this->_mysqli->options(MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT, TRUE); $client_flags |= MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT; } } -- cgit v1.2.3-24-g4f1b From 676072ea1a1d5806c19cd0f76aaf9b6bf48d2741 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Sep 2016 15:33:09 +0300 Subject: Merge pull request #4805 from intekhabrizvi/develop Use MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT as a connection flag instead of option --- system/database/drivers/mysqli/mysqli_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index f4597c746..4a14eea93 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -183,7 +183,7 @@ class CI_DB_mysqli_driver extends CI_DB { // https://bugs.php.net/bug.php?id=68344 elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) { - $this->_mysqli->options(MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT, TRUE); + $client_flags |= MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT; } } -- cgit v1.2.3-24-g4f1b From 8c61ec2fb48dc75a19a594c5c704e6f8e186357d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Sep 2016 15:35:26 +0300 Subject: [ci skip] Add changelog entry for PR #4805 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5bdcda934..51de7b7ab 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -24,6 +24,7 @@ Bug fixes for 3.1.1 - Fixed a bug where :doc:`File Uploading Library ` generated error messages on PHP 7.1. - Fixed a bug (#4780) - :doc:`compatibility function ` ``hex2bin()`` didn't reject inputs of type "resource". - Fixed a bug (#4787) - :doc:`Form Validation Library ` method ``valid_email()`` triggered ``E_WARNING`` when input emails have empty domain names. +- Fixed a bug (#4805) - :doc:`Database ` driver 'mysqli' didn't use the ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` flag properly. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From c771ea6e0dd663e95ccbb9792a5dc82f0eb67939 Mon Sep 17 00:00:00 2001 From: Hex Date: Mon, 12 Sep 2016 14:30:56 +0800 Subject: Fix small doc problem. --- user_guide_src/source/installation/upgrade_210.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_210.rst b/user_guide_src/source/installation/upgrade_210.rst index 866dcf4ae..421435452 100644 --- a/user_guide_src/source/installation/upgrade_210.rst +++ b/user_guide_src/source/installation/upgrade_210.rst @@ -17,10 +17,10 @@ Step 2: Replace config/mimes.php ================================ This config file has been updated to contain more user agent types, -please copy it to _application/config/mimes.php*. +please copy it to *application/config/mimes.php*. Step 3: Update your user guide ============================== Please also replace your local copy of the user guide with the new -version. \ No newline at end of file +version. -- cgit v1.2.3-24-g4f1b From 5f693cb38769b973f89cb8a40b43bb15ef3cd9cf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Sep 2016 12:35:57 +0300 Subject: Merge pull request #4806 from hex-ci/patch-1 [ci skip] Fix formatting in 2.1.0 upgrade instructions --- user_guide_src/source/installation/upgrade_210.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_210.rst b/user_guide_src/source/installation/upgrade_210.rst index 866dcf4ae..421435452 100644 --- a/user_guide_src/source/installation/upgrade_210.rst +++ b/user_guide_src/source/installation/upgrade_210.rst @@ -17,10 +17,10 @@ Step 2: Replace config/mimes.php ================================ This config file has been updated to contain more user agent types, -please copy it to _application/config/mimes.php*. +please copy it to *application/config/mimes.php*. Step 3: Update your user guide ============================== Please also replace your local copy of the user guide with the new -version. \ No newline at end of file +version. -- cgit v1.2.3-24-g4f1b From 442ea6861a5fdfb9780e79b00875e55cdab3f6ff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Sep 2016 11:51:25 +0300 Subject: [ci skip] Fix #4808 --- system/database/drivers/odbc/odbc_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 2 +- system/database/drivers/postgre/postgre_driver.php | 2 +- user_guide_src/source/changelog.rst | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 63df2963d..dbce1cf79 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -298,7 +298,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { */ public function is_write_type($sql) { - if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) { return FALSE; } diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index 82554ec80..ebe1ed6f0 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -181,7 +181,7 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { */ public function is_write_type($sql) { - if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) { return FALSE; } diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index ee8f76348..9483d2457 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -154,7 +154,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { */ public function is_write_type($sql) { - if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) { return FALSE; } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 58d445187..dfd87f95a 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -288,7 +288,7 @@ class CI_DB_postgre_driver extends CI_DB { */ public function is_write_type($sql) { - if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql)) + if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) { return FALSE; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 51de7b7ab..2c8a131ff 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4780) - :doc:`compatibility function ` ``hex2bin()`` didn't reject inputs of type "resource". - Fixed a bug (#4787) - :doc:`Form Validation Library ` method ``valid_email()`` triggered ``E_WARNING`` when input emails have empty domain names. - Fixed a bug (#4805) - :doc:`Database ` driver 'mysqli' didn't use the ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` flag properly. +- Fixed a bug (#4808) - :doc:`Database ` method ``is_write_type()`` only looked at the first line of a queries using ``RETURNING`` with the 'postgre', 'pdo/pgsql', 'odbc' and 'pdo/odbc' drivers. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 0a4dd844b8a3d6edb7712d3bb4edf1b4f0e9dc4c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Sep 2016 12:06:40 +0300 Subject: [ci skip] Don't try to insert_batch() when we know it's not supported on Firebird --- system/database/drivers/ibase/ibase_driver.php | 17 +++++++++++++++++ .../drivers/pdo/subdrivers/pdo_firebird_driver.php | 16 ++++++++++++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 34 insertions(+) diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index c1055c1e6..671a353bc 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -383,6 +383,23 @@ class CI_DB_ibase_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * Insert batch statement + * + * Generates a platform-specific insert string from the supplied data. + * + * @param string $table Table name + * @param array $keys INSERT keys + * @param array $values INSERT values + * @return string|bool + */ + protected function _insert_batch($table, $keys, $values) + { + return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; + } + + // -------------------------------------------------------------------- + /** * Close DB Connection * diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 96dcc5ec1..7811d3da4 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -260,4 +260,20 @@ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { return preg_replace('`SELECT`i', 'SELECT '.$select, $sql); } + // -------------------------------------------------------------------- + + /** + * Insert batch statement + * + * Generates a platform-specific insert string from the supplied data. + * + * @param string $table Table name + * @param array $keys INSERT keys + * @param array $values INSERT values + * @return string|bool + */ + protected function _insert_batch($table, $keys, $values) + { + return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; + } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2c8a131ff..d99e44276 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4787) - :doc:`Form Validation Library ` method ``valid_email()`` triggered ``E_WARNING`` when input emails have empty domain names. - Fixed a bug (#4805) - :doc:`Database ` driver 'mysqli' didn't use the ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` flag properly. - Fixed a bug (#4808) - :doc:`Database ` method ``is_write_type()`` only looked at the first line of a queries using ``RETURNING`` with the 'postgre', 'pdo/pgsql', 'odbc' and 'pdo/odbc' drivers. +- Fixed a bug where :doc:`Query Builder ` method ``insert_batch()`` tried to execute an unsupported SQL query with the 'ibase' and 'pdo/firebird' drivers. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From fd8d3987226bcde81db0682eee9c9acca0beb9a1 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Sun, 25 Sep 2016 19:52:58 +0300 Subject: - captcha helper uses now filemtime to get file timestamp - captcha generated files are a sha1 of current timestamp and word - changed the usage of microtime to time, as this is a more realistic approach Signed-off-by: George Petculescu --- system/helpers/captcha_helper.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 3c1e006f8..c2a1dcfbd 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -105,12 +105,13 @@ if ( ! function_exists('create_captcha')) // Remove old images // ----------------------------------- - $now = microtime(TRUE); + $now = time(); $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if (substr($filename, -4) === '.jpg' && (str_replace('.jpg', '', $filename) + $expiration) < $now) + if (in_array(substr($filename, -4), array('.jpg', '.png')) + && (filemtime($img_path.$filename) + $expiration) < $now) { @unlink($img_path.$filename); } @@ -319,12 +320,12 @@ if ( ! function_exists('create_captcha')) if (function_exists('imagejpeg')) { - $img_filename = $now.'.jpg'; + $img_filename = sha1($now.$word).'.jpg'; imagejpeg($im, $img_path.$img_filename); } elseif (function_exists('imagepng')) { - $img_filename = $now.'.png'; + $img_filename = sha1($now.$word).'.png'; imagepng($im, $img_path.$img_filename); } else -- cgit v1.2.3-24-g4f1b From 8d684c23364f2fd28700e0a5ae2e90dd7fab61fe Mon Sep 17 00:00:00 2001 From: Edwin Smulders Date: Tue, 27 Sep 2016 11:02:39 +0200 Subject: Remove inline styles from hidden form input This change fixes console errors when using a CSP header that disables inline styles. --- system/helpers/form_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8825ecc2c..aa7379f77 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -100,7 +100,7 @@ if ( ! function_exists('form_open')) { foreach ($hidden as $name => $value) { - $form .= ''."\n"; + $form .= ''."\n"; } } -- cgit v1.2.3-24-g4f1b From 7a49c0b0f12121be39001a13a97bd608f6a30a7a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 27 Sep 2016 14:00:26 +0300 Subject: Merge pull request #4810 from Dutchy-/patch-1 Remove inline style from form_open() hidden fields --- system/helpers/form_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8825ecc2c..aa7379f77 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -100,7 +100,7 @@ if ( ! function_exists('form_open')) { foreach ($hidden as $name => $value) { - $form .= ''."\n"; + $form .= ''."\n"; } } -- cgit v1.2.3-24-g4f1b From 8a15f5af819424087b6676709d98de6fa5fc6115 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 27 Sep 2016 14:12:05 +0300 Subject: Fix #4809 --- .../drivers/pdo/subdrivers/pdo_mysql_driver.php | 49 ++++++++++++++++++++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 50 insertions(+) diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 3631cdf7a..6452b787b 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -215,6 +215,55 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { // -------------------------------------------------------------------- + /** + * Begin Transaction + * + * @return bool + */ + protected function _trans_begin() + { + $this->conn_id->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE); + return $this->conn_id->beginTransaction(); + } + + // -------------------------------------------------------------------- + + /** + * Commit Transaction + * + * @return bool + */ + protected function _trans_commit() + { + if ($this->conn_id->commit()) + { + $this->conn_id->setAttribute(PDO::ATTR_AUTOCOMMIT, TRUE); + return TRUE; + } + + return FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Rollback Transaction + * + * @return bool + */ + protected function _trans_rollback() + { + if ($this->conn_id->rollBack()) + { + $this->conn_id->setAttribute(PDO::ATTR_AUTOCOMMIT, TRUE); + return TRUE; + } + + return FALSE; + } + + // -------------------------------------------------------------------- + /** * Show table query * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d99e44276..d41e79945 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4805) - :doc:`Database ` driver 'mysqli' didn't use the ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` flag properly. - Fixed a bug (#4808) - :doc:`Database ` method ``is_write_type()`` only looked at the first line of a queries using ``RETURNING`` with the 'postgre', 'pdo/pgsql', 'odbc' and 'pdo/odbc' drivers. - Fixed a bug where :doc:`Query Builder ` method ``insert_batch()`` tried to execute an unsupported SQL query with the 'ibase' and 'pdo/firebird' drivers. +- Fixed a bug (#4809) - :doc:`Database ` driver 'pdo/mysql' didn't turn off ``AUTOCOMMIT`` when starting a transaction. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From eea02de557834006c5d6a0bfccca7f39e75bf3a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 27 Sep 2016 14:59:37 +0300 Subject: Fix entity_decode() issue --- system/core/Security.php | 39 ++++++++++++++++++-------------- tests/codeigniter/core/Security_test.php | 6 +++++ user_guide_src/source/changelog.rst | 4 ++++ 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 3a5da4fde..4a69daa18 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -669,6 +669,22 @@ class CI_Security { ? ENT_COMPAT | ENT_HTML5 : ENT_COMPAT; + if ( ! isset($_entities)) + { + $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset)); + + // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 + // entities to the array manually + if ($flag === ENT_COMPAT) + { + $_entities[':'] = ':'; + $_entities['('] = '('; + $_entities[')'] = ')'; + $_entities["\n"] = ' '; + $_entities["\t"] = ' '; + } + } + do { $str_compare = $str; @@ -676,22 +692,6 @@ class CI_Security { // Decode standard entities, avoiding false positives if (preg_match_all('/&[a-z]{2,}(?![a-z;])/i', $str, $matches)) { - if ( ! isset($_entities)) - { - $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset)); - - // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 - // entities to the array manually - if ($flag === ENT_COMPAT) - { - $_entities[':'] = ':'; - $_entities['('] = '('; - $_entities[')'] = ')'; - $_entities["\n"] = '&newline;'; - $_entities["\t"] = '&tab;'; - } - } - $replace = array(); $matches = array_unique(array_map('strtolower', $matches[0])); foreach ($matches as &$match) @@ -702,7 +702,7 @@ class CI_Security { } } - $str = str_ireplace(array_keys($replace), array_values($replace), $str); + $str = str_replace(array_keys($replace), array_values($replace), $str); } // Decode numeric & UTF16 two byte entities @@ -711,6 +711,11 @@ class CI_Security { $flag, $charset ); + + if ($flag === ENT_COMPAT) + { + $str = str_replace(array_values($_entities), array_keys($_entities), $str); + } } while ($str_compare !== $str); return $str; diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 8328c37cb..cbf0285ec 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -270,6 +270,12 @@ class Security_test extends CI_TestCase { $this->assertEquals('
Hello Booya
', $decoded); + $this->assertEquals('colon:', $this->security->entity_decode('colon:')); + $this->assertEquals("NewLine\n", $this->security->entity_decode('NewLine ')); + $this->assertEquals("Tab\t", $this->security->entity_decode('Tab ')); + $this->assertEquals("lpar(", $this->security->entity_decode('lpar(')); + $this->assertEquals("rpar)", $this->security->entity_decode('rpar)')); + // Issue #3057 (https://github.com/bcit-ci/CodeIgniter/issues/3057) $this->assertEquals( '&foo should not include a semicolon', diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d41e79945..a0ed34a2f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.1 Release Date: Not Released +- **Security** + + - Fixed a flaw in :doc:`Security Library ` method ``entity_decode()`` (used by ``xss_clean()``) that affects HTML 5 entities when using PHP 5.3. + - General Changes - Added ``E_PARSE`` to the list of error levels detected by the shutdown handler. -- cgit v1.2.3-24-g4f1b From 7ed227b9075498e307c91a3ae0345755f935a520 Mon Sep 17 00:00:00 2001 From: logach Date: Tue, 27 Sep 2016 15:56:22 +0300 Subject: Add database index by default Select database if exists --- system/libraries/Cache/drivers/Cache_redis.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index ec4432437..2d1ead452 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -58,7 +58,8 @@ class CI_Cache_redis extends CI_Driver 'host' => '127.0.0.1', 'password' => NULL, 'port' => 6379, - 'timeout' => 0 + 'timeout' => 0, + 'database' => 0 ); /** @@ -113,6 +114,11 @@ class CI_Cache_redis extends CI_Driver { log_message('error', 'Cache: Redis authentication failed.'); } + + if (isset($config['database']) && $config['database'] > 0 && ! $this->_redis->select($config['database'])) + { + log_message('error', 'Cache: Redis select database failed.'); + } } catch (RedisException $e) { -- cgit v1.2.3-24-g4f1b From 49ef8402ffed15fd7d6cbf18f0dd5b04352344dd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 27 Sep 2016 16:36:37 +0300 Subject: [ci skip] Add changelog entry for PR #4821 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 35dc76476..484e6a13b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Release Date: Not Released - :doc:`Cache Library ` changes include: - Added UNIX socket connection support to the 'memcached' driver. + - Added 'database' configuration option to the 'redis' driver, allowing to auto-select another database. - 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. -- cgit v1.2.3-24-g4f1b From 6ed047335d216a74162aab488002239235dfe95e Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Tue, 27 Sep 2016 20:07:58 +0300 Subject: - revert --- system/helpers/captcha_helper.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index c2a1dcfbd..3c1e006f8 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -105,13 +105,12 @@ if ( ! function_exists('create_captcha')) // Remove old images // ----------------------------------- - $now = time(); + $now = microtime(TRUE); $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if (in_array(substr($filename, -4), array('.jpg', '.png')) - && (filemtime($img_path.$filename) + $expiration) < $now) + if (substr($filename, -4) === '.jpg' && (str_replace('.jpg', '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } @@ -320,12 +319,12 @@ if ( ! function_exists('create_captcha')) if (function_exists('imagejpeg')) { - $img_filename = sha1($now.$word).'.jpg'; + $img_filename = $now.'.jpg'; imagejpeg($im, $img_path.$img_filename); } elseif (function_exists('imagepng')) { - $img_filename = sha1($now.$word).'.png'; + $img_filename = $now.'.png'; imagepng($im, $img_path.$img_filename); } else -- cgit v1.2.3-24-g4f1b From 89eb04b5f09f4d7fb2d319e417bc188f0ed915d0 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Tue, 27 Sep 2016 20:25:43 +0300 Subject: - captcha helper will now look for .png files too when deleting old files --- system/helpers/captcha_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 3c1e006f8..f6c42b4f7 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -110,7 +110,8 @@ if ( ! function_exists('create_captcha')) $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if (substr($filename, -4) === '.jpg' && (str_replace('.jpg', '', $filename) + $expiration) < $now) + if (in_array(substr($filename, -4), array('.jpg', '.png')) + && (str_replace(array('.jpg', '.png'), '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } -- cgit v1.2.3-24-g4f1b From f394b9e0a764d47532363cae8f3e491718fcf8fa Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Tue, 27 Sep 2016 20:28:24 +0300 Subject: - fixed identation --- system/helpers/captcha_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index f6c42b4f7..f2ff4dccf 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -111,7 +111,7 @@ if ( ! function_exists('create_captcha')) while ($filename = @readdir($current_dir)) { if (in_array(substr($filename, -4), array('.jpg', '.png')) - && (str_replace(array('.jpg', '.png'), '', $filename) + $expiration) < $now) + && (str_replace(array('.jpg', '.png'), '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } -- cgit v1.2.3-24-g4f1b From e36664c07896a9a9ef69daad5dc9f880ea08e5c4 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 29 Sep 2016 00:01:59 +0300 Subject: - download helper uses better file buffering when the content of a local file is output'd --- system/helpers/download_helper.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a6463dfd7..3701e0b8b 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -121,11 +121,6 @@ if ( ! function_exists('force_download')) $filename = implode('.', $x); } - if ($data === NULL && ($fp = @fopen($filepath, 'rb')) === FALSE) - { - return; - } - // Clean output buffer if (ob_get_level() !== 0 && @ob_end_clean() === FALSE) { @@ -146,13 +141,12 @@ if ( ! function_exists('force_download')) exit($data); } - // Flush 1MB chunks of data - while ( ! feof($fp) && ($data = fread($fp, 1048576)) !== FALSE) - { - echo $data; - } + // Flush the file + if (@readfile($filepath) === FALSE) + { + return; + } - fclose($fp); exit; } } -- cgit v1.2.3-24-g4f1b From bdf21c4e4cae0c232661f783c2f7070a03a7a912 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 29 Sep 2016 00:26:46 +0300 Subject: - reverting changes, wrong branch selected. --- system/helpers/download_helper.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 3701e0b8b..a6463dfd7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -121,6 +121,11 @@ if ( ! function_exists('force_download')) $filename = implode('.', $x); } + if ($data === NULL && ($fp = @fopen($filepath, 'rb')) === FALSE) + { + return; + } + // Clean output buffer if (ob_get_level() !== 0 && @ob_end_clean() === FALSE) { @@ -141,12 +146,13 @@ if ( ! function_exists('force_download')) exit($data); } - // Flush the file - if (@readfile($filepath) === FALSE) - { - return; - } + // Flush 1MB chunks of data + while ( ! feof($fp) && ($data = fread($fp, 1048576)) !== FALSE) + { + echo $data; + } + fclose($fp); exit; } } -- cgit v1.2.3-24-g4f1b From 7e669e67636a1d5cb10fa4288cdb9b0c39ad2124 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Sep 2016 12:23:03 +0300 Subject: Merge pull request #4822 from gxgpet/develop Fix PNG file deletion on captcha helper --- system/helpers/captcha_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 3c1e006f8..f2ff4dccf 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -110,7 +110,8 @@ if ( ! function_exists('create_captcha')) $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if (substr($filename, -4) === '.jpg' && (str_replace('.jpg', '', $filename) + $expiration) < $now) + if (in_array(substr($filename, -4), array('.jpg', '.png')) + && (str_replace(array('.jpg', '.png'), '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } -- cgit v1.2.3-24-g4f1b From 386e8e0356a50b0f5ef18632533b9410613b9f65 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Sep 2016 12:26:27 +0300 Subject: [ci skip] Add a changelog entry for #4822 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d41e79945..2f08de072 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4808) - :doc:`Database ` method ``is_write_type()`` only looked at the first line of a queries using ``RETURNING`` with the 'postgre', 'pdo/pgsql', 'odbc' and 'pdo/odbc' drivers. - Fixed a bug where :doc:`Query Builder ` method ``insert_batch()`` tried to execute an unsupported SQL query with the 'ibase' and 'pdo/firebird' drivers. - Fixed a bug (#4809) - :doc:`Database ` driver 'pdo/mysql' didn't turn off ``AUTOCOMMIT`` when starting a transaction. +- Fixed a bug (#4822) - :doc:`CAPTCHA Helper ` didn't clear expired PNG images. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 826b6196b748c2c1ccca0dbb5703fd50c600afa5 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Fri, 30 Sep 2016 21:34:44 +0300 Subject: - download helper uses better file buffering when the content of a local file is output'd --- system/helpers/download_helper.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a6463dfd7..7f5c2397a 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -121,11 +121,6 @@ if ( ! function_exists('force_download')) $filename = implode('.', $x); } - if ($data === NULL && ($fp = @fopen($filepath, 'rb')) === FALSE) - { - return; - } - // Clean output buffer if (ob_get_level() !== 0 && @ob_end_clean() === FALSE) { @@ -146,13 +141,12 @@ if ( ! function_exists('force_download')) exit($data); } - // Flush 1MB chunks of data - while ( ! feof($fp) && ($data = fread($fp, 1048576)) !== FALSE) + // Flush the file + if (@readfile($filepath) === FALSE) { - echo $data; + return; } - fclose($fp); exit; } } -- cgit v1.2.3-24-g4f1b From 8800fedd37be6fe4267ed7635fc536ff91a94c62 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Sat, 1 Oct 2016 10:10:04 +0300 Subject: - small fix for HTML Table library: caption is not clearing properly and method chaining has been fixed for set_caption method. --- system/libraries/Table.php | 2 ++ user_guide_src/source/libraries/table.rst | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 3bce294d8..37a639d1d 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -277,6 +277,7 @@ class CI_Table { public function set_caption($caption) { $this->caption = $caption; + return $this; } // -------------------------------------------------------------------- @@ -426,6 +427,7 @@ class CI_Table { $this->rows = array(); $this->heading = array(); $this->auto_heading = TRUE; + $this->caption = NULL; return $this; } diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst index 91ae1ae8d..fb6fefadb 100644 --- a/user_guide_src/source/libraries/table.rst +++ b/user_guide_src/source/libraries/table.rst @@ -275,11 +275,12 @@ Class Reference :returns: CI_Table instance (method chaining) :rtype: CI_Table - Lets you clear the table heading and row data. If you need to show multiple tables with different data you should to call this method + Lets you clear the table heading, row data, and the caption. If you need to show multiple tables with different data you should to call this method after each table has been generated to clear the previous table information. Example:: $this->load->library('table'); + $this->table->set_caption('Preferences'); $this->table->set_heading('Name', 'Color', 'Size'); $this->table->add_row('Fred', 'Blue', 'Small'); $this->table->add_row('Mary', 'Red', 'Large'); @@ -289,6 +290,7 @@ Class Reference $this->table->clear(); + $this->table->set_caption('Shipping'); $this->table->set_heading('Name', 'Day', 'Delivery'); $this->table->add_row('Fred', 'Wednesday', 'Express'); $this->table->add_row('Mary', 'Monday', 'Air'); -- cgit v1.2.3-24-g4f1b From 4cf8d4d4b2e4a5cb09b65a8ab4f6f4c2f59b4b1e Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Sat, 1 Oct 2016 10:11:33 +0300 Subject: - fixed codingstyle --- system/libraries/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 37a639d1d..08e530800 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -427,7 +427,7 @@ class CI_Table { $this->rows = array(); $this->heading = array(); $this->auto_heading = TRUE; - $this->caption = NULL; + $this->caption = NULL; return $this; } -- cgit v1.2.3-24-g4f1b From e67855fffea9496e2aaf8bdd1bdcc9a891986186 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Sat, 1 Oct 2016 10:13:08 +0300 Subject: - fixed codingstyle (2) ... --- system/libraries/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 08e530800..2f1b3b414 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -277,7 +277,7 @@ class CI_Table { public function set_caption($caption) { $this->caption = $caption; - return $this; + return $this; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 103a4263fe8c2715f622355ee7d76114d015f242 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 3 Oct 2016 11:19:11 +0300 Subject: Fix #4823 --- .../Session/drivers/Session_files_driver.php | 27 ++++++++++++++++++++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index bf4df8b20..5f05396c0 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -76,6 +76,13 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle */ protected $_file_new; + /** + * mbstring.func_override flag + * + * @var bool + */ + protected static $func_override; + // ------------------------------------------------------------------------ /** @@ -98,6 +105,8 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle log_message('debug', 'Session: "sess_save_path" is empty; using "session.save_path" value from php.ini.'); $this->_config['save_path'] = rtrim(ini_get('session.save_path'), '/\\'); } + + isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); } // ------------------------------------------------------------------------ @@ -187,7 +196,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle } $session_data = ''; - for ($read = 0, $length = filesize($this->_file_path.$session_id); $read < $length; $read += strlen($buffer)) + for ($read = 0, $length = filesize($this->_file_path.$session_id); $read < $length; $read += self::strlen($buffer)) { if (($buffer = fread($this->_file_handle, $length - $read)) === FALSE) { @@ -368,4 +377,18 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle return $this->_success; } -} \ No newline at end of file + // -------------------------------------------------------------------- + + /** + * Byte-safe strlen() + * + * @param string $str + * @return int + */ + protected static function strlen($str) + { + return (self::$func_override) + ? mb_strlen($str, '8bit') + : strlen($str); + } +} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2f08de072..080b51c68 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -29,6 +29,7 @@ Bug fixes for 3.1.1 - Fixed a bug where :doc:`Query Builder ` method ``insert_batch()`` tried to execute an unsupported SQL query with the 'ibase' and 'pdo/firebird' drivers. - Fixed a bug (#4809) - :doc:`Database ` driver 'pdo/mysql' didn't turn off ``AUTOCOMMIT`` when starting a transaction. - Fixed a bug (#4822) - :doc:`CAPTCHA Helper ` didn't clear expired PNG images. +- Fixed a bug (#4823) - :doc:`Session Library ` 'files' driver could enter an infinite loop if ``mbstring.func_override`` is enabled. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 8dc32005f0364a07a0d472106e350826c651ea8d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 3 Oct 2016 11:19:49 +0300 Subject: [ci skip] Alter a docblock --- system/libraries/Encryption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index 06284c2ed..545081b3b 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -907,7 +907,7 @@ class CI_Encryption { * Byte-safe strlen() * * @param string $str - * @return integer + * @return int */ protected static function strlen($str) { -- cgit v1.2.3-24-g4f1b From bc838a9b08d6dae677ba036c2f640358843b14b2 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Fri, 7 Oct 2016 17:56:31 +0300 Subject: - fixed small typo --- user_guide_src/source/libraries/table.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst index fb6fefadb..3cd120f95 100644 --- a/user_guide_src/source/libraries/table.rst +++ b/user_guide_src/source/libraries/table.rst @@ -275,7 +275,7 @@ Class Reference :returns: CI_Table instance (method chaining) :rtype: CI_Table - Lets you clear the table heading, row data, and the caption. If you need to show multiple tables with different data you should to call this method + Lets you clear the table heading, row data and the caption. If you need to show multiple tables with different data you should to call this method after each table has been generated to clear the previous table information. Example:: $this->load->library('table'); -- cgit v1.2.3-24-g4f1b From 7e302394b21ea16b2dce9c42d4431a180c4a58aa Mon Sep 17 00:00:00 2001 From: René de Kat Date: Mon, 10 Oct 2016 14:46:23 +0100 Subject: Updated list of words that aren't countable Updated list of words that are the same in plural and singular form in English. --- system/helpers/inflector_helper.php | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index c064d8de4..6dc3b5030 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -238,8 +238,37 @@ if ( ! function_exists('is_countable')) return ! in_array( strtolower($word), array( - 'equipment', 'information', 'rice', 'money', - 'species', 'series', 'fish', 'meta' + 'audio', + 'bison', + 'chassis', + 'compensation', + 'coreopsis', + 'data', + 'deer', + 'education', + 'emoji', + 'equipment', + 'fish', + 'furniture', + 'gold', + 'information', + 'knowledge', + 'love', + 'rain', + 'money', + 'moose', + 'nutrition', + 'offspring', + 'plankton', + 'pokemon', + 'police', + 'rice', + 'series', + 'sheep', + 'species', + 'swine', + 'traffic', + 'wheat', ) ); } -- cgit v1.2.3-24-g4f1b From 6b33b232aa21f4db38ead696321287768751cfd1 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Mon, 10 Oct 2016 19:25:25 +0300 Subject: - revert: set_caption method chaining will be fixed lately. --- system/libraries/Table.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 2f1b3b414..c9851813a 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -277,7 +277,6 @@ class CI_Table { public function set_caption($caption) { $this->caption = $caption; - return $this; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 727051267a83f6781745316ea4b749af09c8737f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 11 Oct 2016 15:18:40 +0300 Subject: Merge pull request #4834 from renedekat/patch-1 Updated list of words that aren't countable in is_countable() inflector helper --- system/helpers/inflector_helper.php | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index c064d8de4..6dc3b5030 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -238,8 +238,37 @@ if ( ! function_exists('is_countable')) return ! in_array( strtolower($word), array( - 'equipment', 'information', 'rice', 'money', - 'species', 'series', 'fish', 'meta' + 'audio', + 'bison', + 'chassis', + 'compensation', + 'coreopsis', + 'data', + 'deer', + 'education', + 'emoji', + 'equipment', + 'fish', + 'furniture', + 'gold', + 'information', + 'knowledge', + 'love', + 'rain', + 'money', + 'moose', + 'nutrition', + 'offspring', + 'plankton', + 'pokemon', + 'police', + 'rice', + 'series', + 'sheep', + 'species', + 'swine', + 'traffic', + 'wheat', ) ); } -- cgit v1.2.3-24-g4f1b From 5e22caa8d00165a63999cd828739f71758fba4e2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 11 Oct 2016 15:20:27 +0300 Subject: [ci skip] Add changelog entry for PR #4834 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 080b51c68..07815e851 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - General Changes - Added ``E_PARSE`` to the list of error levels detected by the shutdown handler. + - Updated :doc:`Inflector Helper ` function ``is_countable()`` with more words. Bug fixes for 3.1.1 ------------------- -- cgit v1.2.3-24-g4f1b From f2f6d8a70ca35930da798c1e2da134c810a17158 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 11 Oct 2016 16:00:57 +0300 Subject: [ci skip] Add new HTTP status codes https://tools.ietf.org/html/rfc2817 https://tools.ietf.org/html/rfc6585 Requested in #4835 --- system/core/Common.php | 7 ++++++- user_guide_src/source/changelog.rst | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/system/core/Common.php b/system/core/Common.php index 2c7651943..257763dd3 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -544,13 +544,18 @@ if ( ! function_exists('set_status_header')) 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 422 => 'Unprocessable Entity', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported' + 505 => 'HTTP Version Not Supported', + 511 => 'Network Authentication Required', ); if (isset($stati[$code])) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 07815e851..019adad91 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,7 +10,10 @@ Release Date: Not Released - General Changes - Added ``E_PARSE`` to the list of error levels detected by the shutdown handler. - - Updated :doc:`Inflector Helper ` function ``is_countable()`` with more words. + - Updated :doc:`Inflector Helper ` :php:func:`is_countable()` with more words. + - Updated :doc:`common function ` :php:func:`set_status_header()` with new status codes from IETF RFCs + `2817 https://tools.ietf.org/html/rfc2817>`_ (426) + and `6585 `_ (428, 429, 431, 511). Bug fixes for 3.1.1 ------------------- @@ -40,7 +43,7 @@ Release Date: July 26, 2016 - **Security** - Fixed an SQL injection in the 'odbc' database driver. - - Updated :php:func:`set_realpath()` :doc:`Path Helpr ` function to filter-out ``php://`` wrapper inputs. + - Updated :php:func:`set_realpath()` :doc:`Path Helper ` function to filter-out ``php://`` wrapper inputs. - Officially dropped any kind of support for PHP 5.2.x and anything under 5.3.7. - General Changes -- cgit v1.2.3-24-g4f1b From af88d57cf07e54f996d84da1926f252e963fa49b Mon Sep 17 00:00:00 2001 From: ihatehandles Date: Wed, 12 Oct 2016 05:25:24 +0200 Subject: Fixed typos --- user_guide_src/source/general/cli.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/general/cli.rst b/user_guide_src/source/general/cli.rst index b45be1aa8..764a6b835 100644 --- a/user_guide_src/source/general/cli.rst +++ b/user_guide_src/source/general/cli.rst @@ -47,11 +47,11 @@ in it:: Then save the file to your *application/controllers/* folder. -Now normally you would visit the your site using a URL similar to this:: +Now normally you would visit the site using a URL similar to this:: example.com/index.php/tools/message/to -Instead, we are going to open Terminal in Mac/Linux or go to Run > "cmd" +Instead, we are going to open the terminal in Mac/Linux or go to Run > "cmd" in Windows and navigate to our CodeIgniter project. .. code-block:: bash @@ -75,4 +75,4 @@ That's it! That, in a nutshell, is all there is to know about controllers on the command line. Remember that this is just a normal controller, so routing -and ``_remap()`` works fine. \ No newline at end of file +and ``_remap()`` works fine. -- cgit v1.2.3-24-g4f1b From c34a3d6d052d2b7ba7955ea2bc70039ce0405b68 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 14 Oct 2016 14:23:10 +0300 Subject: Merge pull request #4840 from ihatehandles/patch-2 [ci skip] Fixed some typos --- user_guide_src/source/general/cli.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/general/cli.rst b/user_guide_src/source/general/cli.rst index b45be1aa8..764a6b835 100644 --- a/user_guide_src/source/general/cli.rst +++ b/user_guide_src/source/general/cli.rst @@ -47,11 +47,11 @@ in it:: Then save the file to your *application/controllers/* folder. -Now normally you would visit the your site using a URL similar to this:: +Now normally you would visit the site using a URL similar to this:: example.com/index.php/tools/message/to -Instead, we are going to open Terminal in Mac/Linux or go to Run > "cmd" +Instead, we are going to open the terminal in Mac/Linux or go to Run > "cmd" in Windows and navigate to our CodeIgniter project. .. code-block:: bash @@ -75,4 +75,4 @@ That's it! That, in a nutshell, is all there is to know about controllers on the command line. Remember that this is just a normal controller, so routing -and ``_remap()`` works fine. \ No newline at end of file +and ``_remap()`` works fine. -- cgit v1.2.3-24-g4f1b From da270b26d7cb9c55385150659ecfb7d2d97b4c63 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 17 Oct 2016 18:22:43 +0300 Subject: Fix #4851 --- system/database/DB_forge.php | 4 ++-- system/database/drivers/ibase/ibase_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php | 4 ++-- system/database/drivers/sqlite/sqlite_forge.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_forge.php | 4 ++-- user_guide_src/source/changelog.rst | 1 + 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 826aa1ebf..ed6f4b672 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -184,7 +184,7 @@ abstract class CI_DB_forge { { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } - elseif ( ! $this->db->query(sprintf($this->_create_database, $db_name, $this->db->char_set, $this->db->dbcollat))) + elseif ( ! $this->db->query(sprintf($this->_create_database, $this->db->escape_identifiers($db_name), $this->db->char_set, $this->db->dbcollat))) { return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; } @@ -211,7 +211,7 @@ abstract class CI_DB_forge { { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } - elseif ( ! $this->db->query(sprintf($this->_drop_database, $db_name))) + elseif ( ! $this->db->query(sprintf($this->_drop_database, $this->db->escape_identifiers($db_name)))) { return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; } diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php index 9c358c365..b35cc3749 100644 --- a/system/database/drivers/ibase/ibase_forge.php +++ b/system/database/drivers/ibase/ibase_forge.php @@ -111,7 +111,7 @@ class CI_DB_ibase_forge extends CI_DB_forge { * @param string $db_name (ignored) * @return bool */ - public function drop_database($db_name = '') + public function drop_database($db_name) { if ( ! ibase_drop_db($this->conn_id)) { diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 256fa1413..50df76905 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -97,7 +97,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { * @param string $db_name (ignored) * @return bool */ - public function drop_database($db_name = '') + public function drop_database($db_name) { if ( ! ibase_drop_db($this->conn_id)) { diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index f6f9bb481..b124bcad1 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -101,7 +101,7 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { * @param string $db_name (ignored) * @return bool */ - public function create_database($db_name = '') + public function create_database($db_name) { // In SQLite, a database is created when you connect to the database. // We'll return TRUE so that an error isn't generated @@ -116,7 +116,7 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { * @param string $db_name (ignored) * @return bool */ - public function drop_database($db_name = '') + public function drop_database($db_name) { // In SQLite, a database is dropped when we delete a file if (file_exists($this->db->database)) diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 8a1659430..3ad3477e4 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -75,7 +75,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { * @param string $db_name (ignored) * @return bool */ - public function create_database($db_name = '') + public function create_database($db_name) { // In SQLite, a database is created when you connect to the database. // We'll return TRUE so that an error isn't generated @@ -90,7 +90,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge { * @param string $db_name (ignored) * @return bool */ - public function drop_database($db_name = '') + public function drop_database($db_name) { if ( ! file_exists($this->db->database) OR ! @unlink($this->db->database)) { diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index 43cbe33e5..c45472f54 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -87,7 +87,7 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { * @param string $db_name * @return bool */ - public function create_database($db_name = '') + public function create_database($db_name) { // In SQLite, a database is created when you connect to the database. // We'll return TRUE so that an error isn't generated @@ -102,7 +102,7 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { * @param string $db_name (ignored) * @return bool */ - public function drop_database($db_name = '') + public function drop_database($db_name) { // In SQLite, a database is dropped when we delete a file if (file_exists($this->db->database)) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 019adad91..9aa716c89 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -34,6 +34,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4809) - :doc:`Database ` driver 'pdo/mysql' didn't turn off ``AUTOCOMMIT`` when starting a transaction. - Fixed a bug (#4822) - :doc:`CAPTCHA Helper ` didn't clear expired PNG images. - Fixed a bug (#4823) - :doc:`Session Library ` 'files' driver could enter an infinite loop if ``mbstring.func_override`` is enabled. +- Fixed a bug (#4851) - :doc:`Database Forge ` didn't quote schema names passed to its ``create_database()`` method. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 2e57058329d6b8a76db8d6f04ff7467ff204a637 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Tue, 18 Oct 2016 14:06:22 -0700 Subject: Fix xmlrpc timeout, #4843 Signed-off-by:Master Yoda --- system/libraries/Xmlrpc.php | 5 ++--- user_guide_src/source/libraries/xmlrpc.rst | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 181a104d0..4be926f0e 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -734,6 +734,8 @@ class XML_RPC_Client extends CI_Xmlrpc .'User-Agent: '.$this->xmlrpcName.$r .'Content-Length: '.strlen($msg->payload).$r.$r .$msg->payload; + + stream_set_timeout($fp,$this->timeout); // set timeout for subsequent operations for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result) { @@ -753,9 +755,6 @@ class XML_RPC_Client extends CI_Xmlrpc $result = FALSE; break; } - - usleep(250000); - continue; } else { diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst index 4d7ed66d5..04be8d52d 100644 --- a/user_guide_src/source/libraries/xmlrpc.rst +++ b/user_guide_src/source/libraries/xmlrpc.rst @@ -490,6 +490,10 @@ Class Reference $this->xmlrpc->timeout(6); + This timeout period will be used both for an initial connection to + the remote server, as well as for getting a response from it. + Make sure you set the timeout before calling `send_request`. + .. php:method:: method($function) :param string $function: Method name -- cgit v1.2.3-24-g4f1b From d933c9eb04752496124ef4a5f5df6ffbaf0a1d87 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 20 Oct 2016 00:52:50 +0300 Subject: added ordinal_format() to Number helper; added to docs the info. --- system/helpers/number_helper.php | 29 +++++++++++++++++++++++++ user_guide_src/source/helpers/number_helper.rst | 17 ++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index e7810c706..8e77c91ab 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -92,3 +92,32 @@ if ( ! function_exists('byte_format')) return number_format($num, $precision).' '.$unit; } } + +// ------------------------------------------------------------------------ + +if ( ! function_exists('ordinal_format')) +{ + /** + * Returns the English ordinal numeral for a given number + * + * @param int $number + * @return string + */ + function ordinal_format($number) + { + if ( ! is_int($number) OR $number < 1) + { + return FALSE; + } + + $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'); + if ((($number % 100) >= 11) && (($number % 100) <= 13)) + { + return $number.'th'; + } + else + { + return $number.$ends[$number % 10]; + } + } +} diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index 9d5e98cfb..20acdec18 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -49,4 +49,19 @@ The following functions are available: echo byte_format(45678, 2); // Returns 44.61 KB .. note:: The text generated by this function is found in the following - language file: *language//number_lang.php* \ No newline at end of file + language file: *language//number_lang.php* + +.. php:function:: ordinal_format($number) + + :param int $number: Non-negative natural number to be converted + :returns: Ordinal numeral for given number or FALSE on failure + :rtype: string + + Returns the ordinal numeral (1st, 2nd, 3rd etc.) for a + non-negative natural number. If the input is not a natural number + greater than 0, the function will return boolean FALSE. Examples:: + + echo ordinal_format(1); // Returns 1st + echo ordinal_format(3); // Returns 3rd + echo ordinal_format(21); // Returns 21st + echo ordinal_format(102); // Returns 102nd -- cgit v1.2.3-24-g4f1b From 85e6be1fea7970b39971dc3bd12587d4f032c65a Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 20 Oct 2016 01:02:17 +0300 Subject: - fixed method chaining for set_caption in Table helper. --- system/libraries/Table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 3bce294d8..f2fa434d9 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -277,6 +277,7 @@ class CI_Table { public function set_caption($caption) { $this->caption = $caption; + return $this; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From fb4cec2f9184af60791eaaae612e1ffcb9a4ee4f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 11:47:58 +0300 Subject: Merge pull request #4863 from gxgpet/develop4 Add missing method chaining support to CI_Table::set_caption() --- system/libraries/Table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 3bce294d8..f2fa434d9 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -277,6 +277,7 @@ class CI_Table { public function set_caption($caption) { $this->caption = $caption; + return $this; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From a9e57732f000e4c90e4cdfbe9e747f6dc416d28c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 11:51:50 +0300 Subject: [ci skip] Add changelog entry for #4863 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9aa716c89..61a982a4c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -35,6 +35,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4822) - :doc:`CAPTCHA Helper ` didn't clear expired PNG images. - Fixed a bug (#4823) - :doc:`Session Library ` 'files' driver could enter an infinite loop if ``mbstring.func_override`` is enabled. - Fixed a bug (#4851) - :doc:`Database Forge ` didn't quote schema names passed to its ``create_database()`` method. +- Fixed a bug (#4863) - :doc:`HTML Table Library ` method ``set_caption()`` was missing method chaining support. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From a09ffbc3bc91acd60735c6f1289b97125dae5ed6 Mon Sep 17 00:00:00 2001 From: "Instructor, Computer Systems Technology" Date: Tue, 18 Oct 2016 15:28:05 -0700 Subject: Merge pull request #4855 from jim-parry/fix/xmlrpc-timeout Fix xmlrpc timeout, #4843 --- system/libraries/Xmlrpc.php | 5 ++--- user_guide_src/source/libraries/xmlrpc.rst | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 181a104d0..4be926f0e 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -734,6 +734,8 @@ class XML_RPC_Client extends CI_Xmlrpc .'User-Agent: '.$this->xmlrpcName.$r .'Content-Length: '.strlen($msg->payload).$r.$r .$msg->payload; + + stream_set_timeout($fp,$this->timeout); // set timeout for subsequent operations for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result) { @@ -753,9 +755,6 @@ class XML_RPC_Client extends CI_Xmlrpc $result = FALSE; break; } - - usleep(250000); - continue; } else { diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst index 4d7ed66d5..04be8d52d 100644 --- a/user_guide_src/source/libraries/xmlrpc.rst +++ b/user_guide_src/source/libraries/xmlrpc.rst @@ -490,6 +490,10 @@ Class Reference $this->xmlrpc->timeout(6); + This timeout period will be used both for an initial connection to + the remote server, as well as for getting a response from it. + Make sure you set the timeout before calling `send_request`. + .. php:method:: method($function) :param string $function: Method name -- cgit v1.2.3-24-g4f1b From 433ebc5814cda44a93664812f28e030f61732564 Mon Sep 17 00:00:00 2001 From: gxgpet Date: Thu, 20 Oct 2016 11:54:19 +0300 Subject: Accepting strings too, 0 allowed. --- system/helpers/number_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index 8e77c91ab..d7b96c322 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -105,7 +105,7 @@ if ( ! function_exists('ordinal_format')) */ function ordinal_format($number) { - if ( ! is_int($number) OR $number < 1) + if ( ! is_numeric($number) OR $number < 0) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 4b2b27199025d3c5a6f9b1eee19340c45ec7f2a2 Mon Sep 17 00:00:00 2001 From: gxgpet Date: Thu, 20 Oct 2016 11:56:03 +0300 Subject: - fixed docs --- user_guide_src/source/helpers/number_helper.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index 20acdec18..47f616690 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -53,13 +53,13 @@ The following functions are available: .. php:function:: ordinal_format($number) - :param int $number: Non-negative natural number to be converted + :param int $number: natural number to be converted :returns: Ordinal numeral for given number or FALSE on failure :rtype: string - Returns the ordinal numeral (1st, 2nd, 3rd etc.) for a - non-negative natural number. If the input is not a natural number - greater than 0, the function will return boolean FALSE. Examples:: + Returns the ordinal numeral (0th, 1st, 2nd, 3rd etc.) for a + natural number. If the input is not a natural number, the + function will return boolean FALSE. Examples:: echo ordinal_format(1); // Returns 1st echo ordinal_format(3); // Returns 3rd -- cgit v1.2.3-24-g4f1b From dc44b922dfda28d72879f6e5d2ef509e8bb51275 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 11:56:20 +0300 Subject: [ci skip] Polish changes and add a changelog entry for PR #4855 --- system/libraries/Xmlrpc.php | 4 ++-- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/xmlrpc.rst | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 4be926f0e..7186646da 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -734,8 +734,8 @@ class XML_RPC_Client extends CI_Xmlrpc .'User-Agent: '.$this->xmlrpcName.$r .'Content-Length: '.strlen($msg->payload).$r.$r .$msg->payload; - - stream_set_timeout($fp,$this->timeout); // set timeout for subsequent operations + + stream_set_timeout($fp, $this->timeout); // set timeout for subsequent operations for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 61a982a4c..4d2cad662 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -36,6 +36,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4823) - :doc:`Session Library ` 'files' driver could enter an infinite loop if ``mbstring.func_override`` is enabled. - Fixed a bug (#4851) - :doc:`Database Forge ` didn't quote schema names passed to its ``create_database()`` method. - Fixed a bug (#4863) - :doc:`HTML Table Library ` method ``set_caption()`` was missing method chaining support. +- Fixed a bug (#4843) - :doc:`XML-RPC Library ` client class didn't set a read/write socket timeout. Version 3.1.0 ============= diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst index 04be8d52d..2fe07c49d 100644 --- a/user_guide_src/source/libraries/xmlrpc.rst +++ b/user_guide_src/source/libraries/xmlrpc.rst @@ -492,7 +492,7 @@ Class Reference This timeout period will be used both for an initial connection to the remote server, as well as for getting a response from it. - Make sure you set the timeout before calling `send_request`. + Make sure you set the timeout before calling ``send_request()``. .. php:method:: method($function) @@ -579,4 +579,4 @@ Class Reference 'struct' ); - return $this->xmlrpc->send_response($response); \ No newline at end of file + return $this->xmlrpc->send_response($response); -- cgit v1.2.3-24-g4f1b From 020ede13e33e6c91d27ee2468ad26e98fe711100 Mon Sep 17 00:00:00 2001 From: "Instructor, Computer Systems Technology" Date: Thu, 20 Oct 2016 01:57:38 -0700 Subject: Update Xmlrpc.php Fix style --- system/libraries/Xmlrpc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 4be926f0e..5435bde8d 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -735,7 +735,7 @@ class XML_RPC_Client extends CI_Xmlrpc .'Content-Length: '.strlen($msg->payload).$r.$r .$msg->payload; - stream_set_timeout($fp,$this->timeout); // set timeout for subsequent operations + stream_set_timeout($fp, $this->timeout); // set timeout for subsequent operations for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result) { -- cgit v1.2.3-24-g4f1b From d958ee1590e6d4e1cfc6030ff735e0be5a8685ca Mon Sep 17 00:00:00 2001 From: "Instructor, Computer Systems Technology" Date: Thu, 20 Oct 2016 01:58:33 -0700 Subject: Update xmlrpc.rst Fix markdown notation --- user_guide_src/source/libraries/xmlrpc.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst index 04be8d52d..4460bb53e 100644 --- a/user_guide_src/source/libraries/xmlrpc.rst +++ b/user_guide_src/source/libraries/xmlrpc.rst @@ -492,7 +492,7 @@ Class Reference This timeout period will be used both for an initial connection to the remote server, as well as for getting a response from it. - Make sure you set the timeout before calling `send_request`. + Make sure you set the timeout before calling ``send_request``. .. php:method:: method($function) @@ -579,4 +579,4 @@ Class Reference 'struct' ); - return $this->xmlrpc->send_response($response); \ No newline at end of file + return $this->xmlrpc->send_response($response); -- cgit v1.2.3-24-g4f1b From 7534aa85c2c8a4359f6df0a6f421fb15ca981877 Mon Sep 17 00:00:00 2001 From: gxgpet Date: Thu, 20 Oct 2016 12:19:48 +0300 Subject: small refactorisations --- system/helpers/number_helper.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index d7b96c322..e94a5ffbc 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -110,14 +110,24 @@ if ( ! function_exists('ordinal_format')) return FALSE; } - $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'); + $last_digit = array( + 0 => 'th', + 1 => 'st', + 2 => 'nd', + 3 => 'rd', + 4 => 'th', + 5 => 'th', + 6 => 'th', + 7 => 'th', + 8 => 'th', + 9 => 'th'); if ((($number % 100) >= 11) && (($number % 100) <= 13)) { return $number.'th'; } else { - return $number.$ends[$number % 10]; + return $number.$last_digit[$number % 10]; } } } -- cgit v1.2.3-24-g4f1b From 1ff88001bead0ff4187a5b121d9d36a25a45c313 Mon Sep 17 00:00:00 2001 From: gxgpet Date: Thu, 20 Oct 2016 12:21:05 +0300 Subject: fixed floating for ordinal_format() --- system/helpers/number_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index e94a5ffbc..af8b70f86 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -105,7 +105,7 @@ if ( ! function_exists('ordinal_format')) */ function ordinal_format($number) { - if ( ! is_numeric($number) OR $number < 0) + if ( ! ctype_digit((string) $number) OR $number < 0) { return FALSE; } -- cgit v1.2.3-24-g4f1b From 7de46d4d99017b42ba172cebff8998163ee6295f Mon Sep 17 00:00:00 2001 From: gxgpet Date: Thu, 20 Oct 2016 12:31:44 +0300 Subject: fixed coding style + removal of extra paranthesis --- system/helpers/number_helper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index af8b70f86..20e262e66 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -120,8 +120,9 @@ if ( ! function_exists('ordinal_format')) 6 => 'th', 7 => 'th', 8 => 'th', - 9 => 'th'); - if ((($number % 100) >= 11) && (($number % 100) <= 13)) + 9 => 'th' + ); + if (($number % 100) >= 11 && ($number % 100) <= 13) { return $number.'th'; } -- cgit v1.2.3-24-g4f1b From 6513701f21e72fadbbadc4bfea501dd871fa5149 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 12:36:06 +0300 Subject: [ci skip] Document FV set_rules() fourth parameter --- user_guide_src/source/libraries/form_validation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 5b9a74273..7792369b2 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1027,11 +1027,12 @@ Class Reference .. php:class:: CI_Form_validation - .. php:method:: set_rules($field[, $label = ''[, $rules = '']]) + .. php:method:: set_rules($field[, $label = ''[, $rules = ''[, $errors = array()]]]) :param string $field: Field name :param string $label: Field label :param mixed $rules: Validation rules, as a string list separated by a pipe "|", or as an array or rules + :param array $errors: A list of custom error messages :returns: CI_Form_validation instance (method chaining) :rtype: CI_Form_validation -- cgit v1.2.3-24-g4f1b From 2bd99a68fc253bd7dfad94aa0575b4dcbeec89d9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 11:56:20 +0300 Subject: [ci skip] Polish changes and add a changelog entry for PR #4855 --- system/libraries/Xmlrpc.php | 2 +- user_guide_src/source/changelog.rst | 11 +++++++++++ user_guide_src/source/libraries/xmlrpc.rst | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 5435bde8d..7186646da 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -734,7 +734,7 @@ class XML_RPC_Client extends CI_Xmlrpc .'User-Agent: '.$this->xmlrpcName.$r .'Content-Length: '.strlen($msg->payload).$r.$r .$msg->payload; - + stream_set_timeout($fp, $this->timeout); // set timeout for subsequent operations for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 484e6a13b..3e7749f5b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -59,6 +59,17 @@ Bug fixes for 3.1.1 - Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and `XML-RPC ` libraries treated URI schemes in a case-sensitive manner. - Fixed a bug (#4762) - :doc:`Cache Library ` 'file' driver method ``get_metadata()`` checked TTL time against ``mtime`` instead of the cache item's creation time. - Fixed a bug where :doc:`File Uploading Library ` generated error messages on PHP 7.1. +- Fixed a bug (#4780) - :doc:`compatibility function ` ``hex2bin()`` didn't reject inputs of type "resource". +- Fixed a bug (#4787) - :doc:`Form Validation Library ` method ``valid_email()`` triggered ``E_WARNING`` when input emails have empty domain names. +- Fixed a bug (#4805) - :doc:`Database ` driver 'mysqli' didn't use the ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` flag properly. +- Fixed a bug (#4808) - :doc:`Database ` method ``is_write_type()`` only looked at the first line of a queries using ``RETURNING`` with the 'postgre', 'pdo/pgsql', 'odbc' and 'pdo/odbc' drivers. +- Fixed a bug where :doc:`Query Builder ` method ``insert_batch()`` tried to execute an unsupported SQL query with the 'ibase' and 'pdo/firebird' drivers. +- Fixed a bug (#4809) - :doc:`Database ` driver 'pdo/mysql' didn't turn off ``AUTOCOMMIT`` when starting a transaction. +- Fixed a bug (#4822) - :doc:`CAPTCHA Helper ` didn't clear expired PNG images. +- Fixed a bug (#4823) - :doc:`Session Library ` 'files' driver could enter an infinite loop if ``mbstring.func_override`` is enabled. +- Fixed a bug (#4851) - :doc:`Database Forge ` didn't quote schema names passed to its ``create_database()`` method. +- Fixed a bug (#4863) - :doc:`HTML Table Library ` method ``set_caption()`` was missing method chaining support. +- Fixed a bug (#4843) - :doc:`XML-RPC Library ` client class didn't set a read/write socket timeout. Version 3.1.0 ============= diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst index 4460bb53e..2fe07c49d 100644 --- a/user_guide_src/source/libraries/xmlrpc.rst +++ b/user_guide_src/source/libraries/xmlrpc.rst @@ -492,7 +492,7 @@ Class Reference This timeout period will be used both for an initial connection to the remote server, as well as for getting a response from it. - Make sure you set the timeout before calling ``send_request``. + Make sure you set the timeout before calling ``send_request()``. .. php:method:: method($function) -- cgit v1.2.3-24-g4f1b From 34fe402ea28e928865ec15242e8f20f760b7a334 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 12:36:06 +0300 Subject: [ci skip] Document FV set_rules() fourth parameter --- user_guide_src/source/libraries/form_validation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 5b9a74273..7792369b2 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1027,11 +1027,12 @@ Class Reference .. php:class:: CI_Form_validation - .. php:method:: set_rules($field[, $label = ''[, $rules = '']]) + .. php:method:: set_rules($field[, $label = ''[, $rules = ''[, $errors = array()]]]) :param string $field: Field name :param string $label: Field label :param mixed $rules: Validation rules, as a string list separated by a pipe "|", or as an array or rules + :param array $errors: A list of custom error messages :returns: CI_Form_validation instance (method chaining) :rtype: CI_Form_validation -- cgit v1.2.3-24-g4f1b From 5d05372f4f59d27fdd93249d813970fcf181a4af Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2016 13:40:57 +0300 Subject: FV: throw BadMethodCallException when set_rules() called without --- system/libraries/Form_validation.php | 6 +++++- tests/codeigniter/libraries/Form_validation_test.php | 6 ++++++ user_guide_src/source/changelog.rst | 4 ++++ user_guide_src/source/libraries/form_validation.rst | 3 ++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 86a569ced..4380dd276 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -164,7 +164,7 @@ class CI_Form_validation { * @param array $errors * @return CI_Form_validation */ - public function set_rules($field, $label = '', $rules = array(), $errors = array()) + public function set_rules($field, $label = null, $rules = null, $errors = array()) { // No reason to set rules if we have no POST data // or a validation array has not been specified @@ -197,6 +197,10 @@ class CI_Form_validation { return $this; } + elseif ( ! isset($rules)) + { + throw new BadMethodCallException('Form_validation: set_rules() called without a $rules parameter'); + } // No fields or no rules? Nothing to do... if ( ! is_string($field) OR $field === '' OR empty($rules)) diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 0815300e6..5f4bb9316 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -435,6 +435,12 @@ class Form_validation_test extends CI_TestCase { $this->assertFalse($form_validation->run('fail')); } + public function test_set_rules_exception() + { + $this->setExpectedException('BadMethodCallException'); + $this->form_validation->set_rules('foo', 'bar'); + } + public function test_has_rule() { $this->form_validation->reset_validation(); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3e7749f5b..4bff51a93 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,10 @@ Release Date: Not Released - Removed the *socket_type* configuration setting from the 'redis' driver. - Changed data serialization logic in 'redis' driver for better performance. + - :doc:`Form Validation Library ` changes include: + + - Changed method ``set_rules()`` to throw a ``BadMethodCallException`` when its first parameter is not an array and the ``$rules`` one is unused. + - Database - Changed method ``initialize()`` to return void and instead throw a ``RuntimeException`` in case of failure. diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 7792369b2..b503b9be0 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1027,13 +1027,14 @@ Class Reference .. php:class:: CI_Form_validation - .. php:method:: set_rules($field[, $label = ''[, $rules = ''[, $errors = array()]]]) + .. php:method:: set_rules($field[, $label = null[, $rules = null[, $errors = array()]]]) :param string $field: Field name :param string $label: Field label :param mixed $rules: Validation rules, as a string list separated by a pipe "|", or as an array or rules :param array $errors: A list of custom error messages :returns: CI_Form_validation instance (method chaining) + :throws: BadMethodCallException If $field is not an array and $rules was not used :rtype: CI_Form_validation Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From 11954d2521475f6964bfa9c65dcd2f3e53a65af5 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 20 Oct 2016 20:53:11 +0300 Subject: moved ordinal_format() helper function from Number helper to Inflector helper --- system/helpers/inflector_helper.php | 40 +++++++++++++++++++++ system/helpers/number_helper.php | 42 +--------------------- user_guide_src/source/helpers/inflector_helper.rst | 17 ++++++++- user_guide_src/source/helpers/number_helper.rst | 17 +-------- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index 6dc3b5030..c71516564 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -273,3 +273,43 @@ if ( ! function_exists('is_countable')) ); } } + +// ------------------------------------------------------------------------ + +if ( ! function_exists('ordinal_format')) +{ + /** + * Returns the English ordinal numeral for a given number + * + * @param int $number + * @return string + */ + function ordinal_format($number) + { + if ( ! ctype_digit((string) $number) OR $number < 0) + { + return FALSE; + } + + $last_digit = array( + 0 => 'th', + 1 => 'st', + 2 => 'nd', + 3 => 'rd', + 4 => 'th', + 5 => 'th', + 6 => 'th', + 7 => 'th', + 8 => 'th', + 9 => 'th' + ); + if (($number % 100) >= 11 && ($number % 100) <= 13) + { + return $number.'th'; + } + else + { + return $number.$last_digit[$number % 10]; + } + } +} \ No newline at end of file diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index 20e262e66..219124cb5 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -91,44 +91,4 @@ if ( ! function_exists('byte_format')) return number_format($num, $precision).' '.$unit; } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('ordinal_format')) -{ - /** - * Returns the English ordinal numeral for a given number - * - * @param int $number - * @return string - */ - function ordinal_format($number) - { - if ( ! ctype_digit((string) $number) OR $number < 0) - { - return FALSE; - } - - $last_digit = array( - 0 => 'th', - 1 => 'st', - 2 => 'nd', - 3 => 'rd', - 4 => 'th', - 5 => 'th', - 6 => 'th', - 7 => 'th', - 8 => 'th', - 9 => 'th' - ); - if (($number % 100) >= 11 && ($number % 100) <= 13) - { - return $number.'th'; - } - else - { - return $number.$last_digit[$number % 10]; - } - } -} +} \ No newline at end of file diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index df0c568c0..8a6ca7a92 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -93,4 +93,19 @@ The following functions are available: Checks if the given word has a plural version. Example:: - is_countable('equipment'); // Returns FALSE \ No newline at end of file + is_countable('equipment'); // Returns FALSE + +.. php:function:: ordinal_format($number) + + :param int $number: natural number to be converted + :returns: Ordinal numeral for given number or FALSE on failure + :rtype: string + + Returns the ordinal numeral (0th, 1st, 2nd, 3rd etc.) for a + natural number. If the input is not a natural number, the + function will return boolean FALSE. Examples:: + + echo ordinal_format(1); // Returns 1st + echo ordinal_format(3); // Returns 3rd + echo ordinal_format(21); // Returns 21st + echo ordinal_format(102); // Returns 102nd diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index 47f616690..9d5e98cfb 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -49,19 +49,4 @@ The following functions are available: echo byte_format(45678, 2); // Returns 44.61 KB .. note:: The text generated by this function is found in the following - language file: *language//number_lang.php* - -.. php:function:: ordinal_format($number) - - :param int $number: natural number to be converted - :returns: Ordinal numeral for given number or FALSE on failure - :rtype: string - - Returns the ordinal numeral (0th, 1st, 2nd, 3rd etc.) for a - natural number. If the input is not a natural number, the - function will return boolean FALSE. Examples:: - - echo ordinal_format(1); // Returns 1st - echo ordinal_format(3); // Returns 3rd - echo ordinal_format(21); // Returns 21st - echo ordinal_format(102); // Returns 102nd + language file: *language//number_lang.php* \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 4fe5e99f437fe79cc40cebd08277eb319d8a6095 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 20 Oct 2016 20:58:10 +0300 Subject: fixed unnecessary file termination for Number helper --- system/helpers/number_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index 219124cb5..e7810c706 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -91,4 +91,4 @@ if ( ! function_exists('byte_format')) return number_format($num, $precision).' '.$unit; } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From 03a1eac3b7bed8ed6df59109364a3eebe3f1cceb Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Thu, 20 Oct 2016 21:03:38 +0300 Subject: ordinal_format will accept only non-negative natural numbers and return original value on failure + docs update regarding this. --- system/helpers/inflector_helper.php | 4 ++-- user_guide_src/source/helpers/inflector_helper.rst | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index c71516564..04e178aec 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -286,9 +286,9 @@ if ( ! function_exists('ordinal_format')) */ function ordinal_format($number) { - if ( ! ctype_digit((string) $number) OR $number < 0) + if ( ! ctype_digit((string) $number) OR $number < 1) { - return FALSE; + return $number; } $last_digit = array( diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index 8a6ca7a92..76cce6f4d 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -97,15 +97,16 @@ The following functions are available: .. php:function:: ordinal_format($number) - :param int $number: natural number to be converted - :returns: Ordinal numeral for given number or FALSE on failure + :param int $number: non-negative natural number to be converted + :returns: Ordinal numeral for given number or original value on failure :rtype: string - Returns the ordinal numeral (0th, 1st, 2nd, 3rd etc.) for a - natural number. If the input is not a natural number, the - function will return boolean FALSE. Examples:: + Returns the ordinal numeral (1st, 2nd, 3rd etc.) for a + non-negative natural number. If the input is not a natural number + greater than 0, the function will return the original value. Examples:: echo ordinal_format(1); // Returns 1st echo ordinal_format(3); // Returns 3rd echo ordinal_format(21); // Returns 21st echo ordinal_format(102); // Returns 102nd + echo ordinal_format(-5); // Invalid input, will return -5 -- cgit v1.2.3-24-g4f1b From 4ffe6345690f81872d0937e562faaf75f3185b6a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 21 Oct 2016 16:30:31 +0300 Subject: Fix #4865 --- system/core/Common.php | 1 + system/core/Exceptions.php | 1 - user_guide_src/source/changelog.rst | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index 257763dd3..91c585f7d 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -661,6 +661,7 @@ if ( ! function_exists('_exception_handler')) $_error =& load_class('Exceptions', 'core'); $_error->log_exception('error', 'Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine()); + is_cli() OR set_status_header(500); // Should we display the error? if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index a1c6a1970..4e10f2831 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -207,7 +207,6 @@ class CI_Exceptions { } else { - set_status_header(500); $templates_path .= 'html'.DIRECTORY_SEPARATOR; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4d2cad662..1b3820cb0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -37,6 +37,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4851) - :doc:`Database Forge ` didn't quote schema names passed to its ``create_database()`` method. - Fixed a bug (#4863) - :doc:`HTML Table Library ` method ``set_caption()`` was missing method chaining support. - Fixed a bug (#4843) - :doc:`XML-RPC Library ` client class didn't set a read/write socket timeout. +- Fixed a bug (#4865) - uncaught exceptions didn't set the HTTP Response status code to 500 unless ``display_errors`` was turned On. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b From 25dc0937dd27c6d3c9f4d4483a857c218d6a9dad Mon Sep 17 00:00:00 2001 From: gxgpet Date: Fri, 21 Oct 2016 17:44:03 +0300 Subject: fixed small coding style issues --- system/helpers/inflector_helper.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index 04e178aec..83bf28098 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -303,13 +303,12 @@ if ( ! function_exists('ordinal_format')) 8 => 'th', 9 => 'th' ); + if (($number % 100) >= 11 && ($number % 100) <= 13) { return $number.'th'; } - else - { - return $number.$last_digit[$number % 10]; - } + + return $number.$last_digit[$number % 10]; } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From e7e70c3532f06ac008cfc038791fcb46d4a551ed Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 21 Oct 2016 18:06:26 +0300 Subject: [ci skip] Add changelog entry for PR #4862 --- system/helpers/inflector_helper.php | 6 +++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index 83bf28098..f14f57c54 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -268,7 +268,7 @@ if ( ! function_exists('is_countable')) 'species', 'swine', 'traffic', - 'wheat', + 'wheat' ) ); } @@ -303,12 +303,12 @@ if ( ! function_exists('ordinal_format')) 8 => 'th', 9 => 'th' ); - + if (($number % 100) >= 11 && ($number % 100) <= 13) { return $number.'th'; } - + return $number.$last_digit[$number % 10]; } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4bff51a93..f60387cd5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -35,6 +35,7 @@ Release Date: Not Released - Helpers + - Added new function :php:func:`ordinal_format()` to :doc:`Inflector Helper `. - Updated :doc:`HTML Helper ` function :php:func:`meta()` with support for "charset" and "property" properties. - Changed :doc:`HTML Helper ` function :php:func:`doctype()` default document type to HTML 5. -- cgit v1.2.3-24-g4f1b From dae08b59fd808c3baf838161223fdba2a80f1610 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 22 Oct 2016 15:37:15 +0300 Subject: Allow binding 0, null out of array in query() --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 848516adc..7ae52a307 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -980,7 +980,7 @@ abstract class CI_DB_driver { */ public function compile_binds($sql, $binds) { - if (empty($binds) OR empty($this->bind_marker) OR strpos($sql, $this->bind_marker) === FALSE) + if (empty($this->bind_marker) OR strpos($sql, $this->bind_marker) === FALSE) { return $sql; } -- cgit v1.2.3-24-g4f1b From 6c6ee1a1e73b3f8a93ca031107bec35e56272a0a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 22 Oct 2016 16:33:06 +0300 Subject: Close #4830, #3649 --- system/libraries/Session/Session.php | 36 ++++++++++++++++++++-- .../Session/drivers/Session_files_driver.php | 18 +++++++++-- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/sessions.rst | 4 +-- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 3b391a8ef..5aac12f36 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -57,6 +57,7 @@ class CI_Session { protected $_driver = 'files'; protected $_config; + protected $_sid_regexp; // ------------------------------------------------------------------------ @@ -99,6 +100,7 @@ class CI_Session { // Configuration ... $this->_configure($params); + $this->_config['_sid_regexp'] = $this->_sid_regexp; $class = new $class($this->_config); if ($class instanceof SessionHandlerInterface) @@ -131,7 +133,7 @@ class CI_Session { if (isset($_COOKIE[$this->_config['cookie_name']]) && ( ! is_string($_COOKIE[$this->_config['cookie_name']]) - OR ! preg_match('/^[0-9a-f]{40}$/', $_COOKIE[$this->_config['cookie_name']]) + OR ! preg_match('#\A'.$this->_sid_regexp.'\z#', $_COOKIE[$this->_config['cookie_name']]) ) ) { @@ -315,8 +317,36 @@ class CI_Session { ini_set('session.use_strict_mode', 1); ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 1); - ini_set('session.hash_function', 1); - ini_set('session.hash_bits_per_character', 4); + + if (PHP_VERSION_ID < 70100) + { + if ((int) ini_get('session.hash_function') === 0) + { + ini_set('session.hash_function', 1); + ini_set('session.hash_bits_per_character', $bits_per_character = 4); + } + else + { + $bits_per_character = (int) ini_get('session.hash_bits_per_character'); + } + } + elseif ((int) ini_get('session.sid_length') < 40 && ($bits_per_character = (int) ini_get('session.sid_bits_per_character')) === 4) + { + ini_set('session.sid_length', 40); + } + + switch ($bits_per_character) + { + case 4: + $this->_sid_regexp = '[0-9a-f]{40,}'; + break; + case 5: + $this->_sid_regexp = '[0-9a-v]{40,}'; + break; + case 6: + $this->_sid_regexp = '[0-9a-zA-Z,-]{40,}'; + break; + } } // ------------------------------------------------------------------------ diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 5f05396c0..37315d3cd 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -76,6 +76,13 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle */ protected $_file_new; + /** + * Validate SID regular expression + * + * @var string + */ + protected $_sid_regexp; + /** * mbstring.func_override flag * @@ -106,6 +113,8 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle $this->_config['save_path'] = rtrim(ini_get('session.save_path'), '/\\'); } + $this->_sid_regexp = $this->_config['_sid_regexp']; + isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); } @@ -352,10 +361,13 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle $ts = time() - $maxlifetime; + $pattern = ($this->_config['match_ip'] === TRUE) + ? '[0-9a-f]{32}' + : ''; + $pattern = sprintf( - '/^%s[0-9a-f]{%d}$/', - preg_quote($this->_config['cookie_name'], '/'), - ($this->_config['match_ip'] === TRUE ? 72 : 40) + '#\A%s'.$pattern.$this->_sid_regexp.'\z#', + preg_quote($this->_config['cookie_name']) ); while (($file = readdir($directory)) !== FALSE) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1b3820cb0..d025d52f1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -38,6 +38,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4863) - :doc:`HTML Table Library ` method ``set_caption()`` was missing method chaining support. - Fixed a bug (#4843) - :doc:`XML-RPC Library ` client class didn't set a read/write socket timeout. - Fixed a bug (#4865) - uncaught exceptions didn't set the HTTP Response status code to 500 unless ``display_errors`` was turned On. +- Fixed a bug (#4830) - :doc:`Session Library ` didn't take into account the new session INI settings in PHP 7.1. Version 3.1.0 ============= diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 082828c4e..a95cd5a19 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -594,7 +594,7 @@ And then of course, create the database table ... For MySQL:: CREATE TABLE IF NOT EXISTS `ci_sessions` ( - `id` varchar(40) NOT NULL, + `id` varchar(128) NOT NULL, `ip_address` varchar(45) NOT NULL, `timestamp` int(10) unsigned DEFAULT 0 NOT NULL, `data` blob NOT NULL, @@ -604,7 +604,7 @@ For MySQL:: For PostgreSQL:: CREATE TABLE "ci_sessions" ( - "id" varchar(40) NOT NULL, + "id" varchar(128) NOT NULL, "ip_address" varchar(45) NOT NULL, "timestamp" bigint DEFAULT 0 NOT NULL, "data" text DEFAULT '' NOT NULL -- cgit v1.2.3-24-g4f1b From 378627bb0e0cfb433299a6d832c18099e5c1dc9c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 22 Oct 2016 16:48:35 +0300 Subject: [ci skip] Prepare for 3.1.1 release --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/conf.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 804c6856d..c5d26e52b 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - const CI_VERSION = '3.1.1-dev'; + const CI_VERSION = '3.1.1'; /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1e59d4ca2..c7bd50240 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.1.1 ============= -Release Date: Not Released +Release Date: Oct 22, 2016 - **Security** diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 0c4901d8f..a685c4442 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.1.1' # The full version, including alpha/beta/rc tags. -release = '3.1.1-dev' +release = '3.1.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3-24-g4f1b From 6c33f22983a60a046c7de580bebb9b95c4ea106a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 22 Oct 2016 17:08:13 +0300 Subject: [ci skip] Fix a changelog link --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c7bd50240..559c12884 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,7 +16,7 @@ Release Date: Oct 22, 2016 - Added ``E_PARSE`` to the list of error levels detected by the shutdown handler. - Updated :doc:`Inflector Helper ` :php:func:`is_countable()` with more words. - Updated :doc:`common function ` :php:func:`set_status_header()` with new status codes from IETF RFCs - `2817 https://tools.ietf.org/html/rfc2817>`_ (426) + `2817 `_ (426) and `6585 `_ (428, 429, 431, 511). Bug fixes for 3.1.1 -- cgit v1.2.3-24-g4f1b From 255e4c073fcd82f4c35ef0789aa2f98a16ee8092 Mon Sep 17 00:00:00 2001 From: vkeranov Date: Sun, 23 Oct 2016 20:47:32 +0300 Subject: Small Changelog Fix --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 559c12884..2d9ef69b5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,7 +27,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4737) - :doc:`Query Builder ` didn't add an ``OFFSET`` when ``LIMIT`` is zero or unused. - Fixed a regression (#4739) - :doc:`Email Library ` doesn't properly separate attachment bodies from headers. - Fixed a bug (#4754) - :doc:`Unit Testing Library ` method ``result()`` didn't translate ``res_datatype``. -- Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and `XML-RPC ` libraries treated URI schemes in a case-sensitive manner. +- Fixed a bug (#4759) - :doc:`Form Validation `, :doc:`Trackback ` and :doc:`XML-RPC ` libraries treated URI schemes in a case-sensitive manner. - Fixed a bug (#4762) - :doc:`Cache Library ` 'file' driver method ``get_metadata()`` checked TTL time against ``mtime`` instead of the cache item's creation time. - Fixed a bug where :doc:`File Uploading Library ` generated error messages on PHP 7.1. - Fixed a bug (#4780) - :doc:`compatibility function ` ``hex2bin()`` didn't reject inputs of type "resource". -- cgit v1.2.3-24-g4f1b From 75b812f85b266dbe77518e56a4ad754a0d09eaff Mon Sep 17 00:00:00 2001 From: Hex Date: Mon, 24 Oct 2016 14:21:44 +0800 Subject: Fix small doc problem. --- user_guide_src/source/general/compatibility_functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 936f2a24b..584968663 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -10,7 +10,7 @@ Being custom implementations, these functions will also have some set of dependencies on their own, but are still useful if your PHP setup doesn't offer them natively. -.. note:: Much like the `common functions `, the +.. note:: Much like the :doc:`common functions `, the compatibility functions are always available, as long as their dependencies are met. -- cgit v1.2.3-24-g4f1b From b6359a6edc03e4959ab7ae0918b89e49b4b39b8d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 24 Oct 2016 09:41:29 +0300 Subject: Merge pull request #4868 from hex-ci/patch-2 [ci skip] Fix a doc link --- user_guide_src/source/general/compatibility_functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 936f2a24b..584968663 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -10,7 +10,7 @@ Being custom implementations, these functions will also have some set of dependencies on their own, but are still useful if your PHP setup doesn't offer them natively. -.. note:: Much like the `common functions `, the +.. note:: Much like the :doc:`common functions `, the compatibility functions are always available, as long as their dependencies are met. -- cgit v1.2.3-24-g4f1b From d81b59ef02dab9072e44eec2dec519e5178e7759 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 24 Oct 2016 09:45:54 +0300 Subject: [ci skip] Fix 3.1.1 download link --- user_guide_src/source/installation/downloads.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 7380dcb28..d04bccb7c 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.1.1 (Current version) `_ +- `CodeIgniter v3.1.1 (Current version) `_ - `CodeIgniter v3.1.0 `_ - `CodeIgniter v3.0.6 `_ - `CodeIgniter v3.0.5 `_ @@ -32,4 +32,4 @@ Please note that while every effort is made to keep this code base functional, we cannot guarantee the functionality of code taken from the develop branch. -Beginning with version 2.0.3, stable versions are also available via `GitHub Releases `_. \ No newline at end of file +Beginning with version 2.0.3, stable versions are also available via `GitHub Releases `_. -- cgit v1.2.3-24-g4f1b From 777bb986d9e252dcc4dde3c76c03b0e0c7c1f8ef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 24 Oct 2016 10:11:22 +0300 Subject: [ci skip] Update docs on trans_off() --- user_guide_src/source/database/transactions.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/user_guide_src/source/database/transactions.rst b/user_guide_src/source/database/transactions.rst index 2e6d4b477..e25b8ed14 100644 --- a/user_guide_src/source/database/transactions.rst +++ b/user_guide_src/source/database/transactions.rst @@ -75,12 +75,11 @@ debugging is turned off, you can manage your own errors like this:: // generate an error... or use the log_message() function to log your error } -Enabling Transactions -===================== +Disabling Transactions +====================== -Transactions are enabled automatically the moment you use -$this->db->trans_start(). If you would like to disable transactions you -can do so using $this->db->trans_off():: +If you would like to disable transactions you can do so using +``$this->db->trans_off()``:: $this->db->trans_off(); @@ -88,8 +87,9 @@ can do so using $this->db->trans_off():: $this->db->query('AN SQL QUERY...'); $this->db->trans_complete(); -When transactions are disabled, your queries will be auto-commited, just -as they are when running queries without transactions. +When transactions are disabled, your queries will be auto-commited, just as +they are when running queries without transactions, practically ignoring +any calls to ``trans_start()``, ``trans_complete()``, etc. Test Mode ========= -- cgit v1.2.3-24-g4f1b From 40282340cd7de02cbe8297f557b7d3e23cbc652a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 26 Oct 2016 17:41:18 +0300 Subject: Fix #4877 --- system/core/Security.php | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 4a69daa18..b9160a252 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -371,11 +371,17 @@ class CI_Security { * * Note: Use rawurldecode() so it does not remove plus signs */ - do + if (stripos($str, '%') !== false) { - $str = rawurldecode($str); + do + { + $oldstr = $str; + $str = rawurldecode($str); + $str = preg_replace_callback('#%(?:\s*[0-9a-f]){2,}#i', array($this, '_urldecodespaces'), $str); + } + while ($oldstr !== $str); + unset($oldstr); } - while (preg_match('/%[0-9a-f]{2,}/i', $str)); /* * Convert character entities to ASCII @@ -466,7 +472,7 @@ class CI_Security { if (preg_match('/
]+([^>]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); + $str = preg_replace_callback('#]+([^>]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); } if (preg_match('/ Date: Thu, 27 Oct 2016 15:06:46 +0300 Subject: [ci skip] This is 3.1.2-dev --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_312.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 3 ++- 5 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_312.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index c5d26e52b..6562e99a2 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - const CI_VERSION = '3.1.1'; + const CI_VERSION = '3.1.2-dev'; /* * ------------------------------------------------------ diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index a685c4442..17771fa9e 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' +version = '3.1.2-dev' # The full version, including alpha/beta/rc tags. -release = '3.1.1' +release = '3.1.2-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index d04bccb7c..1eacd4d33 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) `_ +- `CodeIgniter v3.1.2-dev (Current version) `_ +- `CodeIgniter v3.1.1 `_ - `CodeIgniter v3.1.0 `_ - `CodeIgniter v3.0.6 `_ - `CodeIgniter v3.0.5 `_ diff --git a/user_guide_src/source/installation/upgrade_312.rst b/user_guide_src/source/installation/upgrade_312.rst new file mode 100644 index 000000000..91467233e --- /dev/null +++ b/user_guide_src/source/installation/upgrade_312.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.1.1 to 3.1.2 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 727d054d1..61b16e038 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -8,8 +8,9 @@ upgrading from. .. toctree:: :titlesonly: + Upgrading from 3.1.2 to 3.1.2 Upgrading from 3.1.0 to 3.1.1 - Upgrading from 3.0.6 to 3.1.0 + Upgrading from 3.0.6 to 3.1.x Upgrading from 3.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 -- cgit v1.2.3-24-g4f1b From 098412502a966597631470a2f0cf935d9ecfe16d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 27 Oct 2016 15:10:30 +0300 Subject: [ci skip] Add changelog entry for #4877 --- user_guide_src/source/changelog.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2d9ef69b5..ee66cc0a4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,15 @@ Change Log ########## +Version 3.1.2 +============= + +Release Date: Not Released + +- **Security** + + - Fixed a new URL-encoding attack vector in :doc:`Security Library ` method ``xss_clean()`` affecting Firefox. + Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From 7bc882384ef4c442fb4edd699c8dd15bbd22e429 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 27 Oct 2016 15:41:23 +0300 Subject: Close #4875 --- system/core/CodeIgniter.php | 21 ++++++++++++++++++++- user_guide_src/source/changelog.rst | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 6562e99a2..32ad61899 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -416,10 +416,29 @@ if ( ! is_php('5.4')) $params = array($method, array_slice($URI->rsegments, 2)); $method = '_remap'; } - elseif ( ! is_callable(array($class, $method))) + elseif ( ! method_exists($class, $method)) { $e404 = TRUE; } + /** + * DO NOT CHANGE THIS, NOTHING ELSE WORKS! + * + * - method_exists() returns true for non-public methods, which passes the previous elseif + * - is_callable() returns false for PHP 4-style constructors, even if there's a __construct() + * - method_exists($class, '__construct') won't work because CI_Controller::__construct() is inherited + * - People will only complain if this doesn't work, even though it is documented that it shouldn't. + * + * ReflectionMethod::isConstructor() is the ONLY reliable check, + * knowing which method will be executed as a constructor. + */ + elseif ( ! is_callable(array($class, $method)) && strcasecmp($class, $method) === 0) + { + $reflection = new ReflectionMethod($class, $method); + if ( ! $reflection->isPublic() OR $reflection->isConstructor()) + { + $e404 = TRUE; + } + } } if ($e404) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ee66cc0a4..b7be0866f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,10 @@ Release Date: Not Released - Fixed a new URL-encoding attack vector in :doc:`Security Library ` method ``xss_clean()`` affecting Firefox. +- General Changes + + - Allowed PHP 4-style constructors (``Mathching_name::Matching_name()`` methods) to be used as routes, if there's a ``__construct()`` to override them. + Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From 2f760877c313871e5066b93b0b1aa76428c09fb6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 27 Oct 2016 16:39:12 +0300 Subject: Fix #4874 --- system/libraries/Session/Session.php | 63 ++++++++++++++++++++++++++++++------ user_guide_src/source/changelog.rst | 5 +++ 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 5aac12f36..ea7853108 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -318,35 +318,80 @@ class CI_Session { ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 1); + $this->_configure_sid_length(); + } + + // ------------------------------------------------------------------------ + + /** + * Configure session ID length + * + * To make life easier, we used to force SHA-1 and 4 bits per + * character on everyone. And of course, someone was unhappy. + * + * Then PHP 7.1 broke backwards-compatibility because ext/session + * is such a mess that nobody wants to touch it with a pole stick, + * and the one guy who does, nobody has the energy to argue with. + * + * So we were forced to make changes, and OF COURSE something was + * going to break and now we have this pile of shit. -- Narf + * + * @return void + */ + protected function _configure_sid_length() + { if (PHP_VERSION_ID < 70100) { - if ((int) ini_get('session.hash_function') === 0) + $hash_function = ini_get('session.hash_function'); + if (ctype_digit($hash_function)) + { + if ($hash_function !== '1') + { + ini_set('session.hash_function', 1); + $bits = 160; + } + } + elseif ( ! in_array($hash_function, hash_algos(), TRUE)) { ini_set('session.hash_function', 1); - ini_set('session.hash_bits_per_character', $bits_per_character = 4); + $bits = 160; } - else + elseif (($bits = strlen(hash($hash_function, 'dummy', false)) * 4) < 160) { - $bits_per_character = (int) ini_get('session.hash_bits_per_character'); + ini_set('session.hash_function', 1); + $bits = 160; } + + $bits_per_character = (int) ini_get('session.hash_bits_per_character'); + $sid_length = $bits * $bits_per_character; } - elseif ((int) ini_get('session.sid_length') < 40 && ($bits_per_character = (int) ini_get('session.sid_bits_per_character')) === 4) + else { - ini_set('session.sid_length', 40); + $bits_per_character = (int) ini_get('session.sid_bits_per_character'); + $sid_length = (int) ini_get('session.sid_length'); + if (($bits = $sid_length * $bits_per_character) < 160) + { + // Add as many more characters as necessary to reach at least 160 bits + $sid_length += (int) ceil((160 % $bits) / $bits_per_character); + ini_set('session.sid_length', $sid_length); + } } + // Yes, 4,5,6 are the only known possible values as of 2016-10-27 switch ($bits_per_character) { case 4: - $this->_sid_regexp = '[0-9a-f]{40,}'; + $this->_sid_regexp = '[0-9a-f]'; break; case 5: - $this->_sid_regexp = '[0-9a-v]{40,}'; + $this->_sid_regexp = '[0-9a-v]'; break; case 6: - $this->_sid_regexp = '[0-9a-zA-Z,-]{40,}'; + $this->_sid_regexp = '[0-9a-zA-Z,-]'; break; } + + $this->_sid_regexp .= '{'.$sid_length.'}'; } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b7be0866f..4c6143c59 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,11 @@ Release Date: Not Released - Allowed PHP 4-style constructors (``Mathching_name::Matching_name()`` methods) to be used as routes, if there's a ``__construct()`` to override them. +Bug fixes for 3.1.2 +------------------- + +- Fixed a regression (#4874) - :doc:`Session Library ` didn't take into account `session.hash_bits_per_character` when validating session IDs. + Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From 2b9d88c3fe78218bb9d8bcbb6ea114d190bc0d0e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 27 Oct 2016 16:47:57 +0300 Subject: [ci skip] Fix changelog entry formatting from last commit --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4c6143c59..51242efa3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,7 +18,7 @@ Release Date: Not Released Bug fixes for 3.1.2 ------------------- -- Fixed a regression (#4874) - :doc:`Session Library ` didn't take into account `session.hash_bits_per_character` when validating session IDs. +- Fixed a regression (#4874) - :doc:`Session Library ` didn't take into account ``session.hash_bits_per_character`` when validating session IDs. Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From 0c23e9122666a30797079bea9415da135d4f7e12 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 27 Oct 2016 16:55:19 +0300 Subject: Fix #4871 --- system/database/DB_query_builder.php | 8 +++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 7a008eeb8..5491b2000 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1915,7 +1915,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $affected_rows = 0; for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) { - if ($this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, $batch_size), $this->protect_identifiers($index)))) + if ($this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, $batch_size), $index))) { $affected_rows += $this->affected_rows(); } @@ -1941,6 +1941,8 @@ abstract class CI_DB_query_builder extends CI_DB_driver { */ protected function _update_batch($table, $values, $index) { + $index_escaped = $this->protect_identifiers($index); + $ids = array(); foreach ($values as $key => $val) { @@ -1950,7 +1952,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { if ($field !== $index) { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; + $final[$field][] = 'WHEN '.$index_escaped.' = '.$val[$index].' THEN '.$val[$field]; } } } @@ -1963,7 +1965,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { .'ELSE '.$k.' END, '; } - $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE); + $this->where($index_escaped.' IN('.implode(',', $ids).')', NULL, FALSE); return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 51242efa3..58ca20ee9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Bug fixes for 3.1.2 ------------------- - Fixed a regression (#4874) - :doc:`Session Library ` didn't take into account ``session.hash_bits_per_character`` when validating session IDs. +- Fixed a bug (#4871) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From dbc025b6c2c9b0b085bb79dc126bc58fb2a8c2a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 27 Oct 2016 17:37:25 +0300 Subject: [ci skip] Another attempt at #4874 --- system/libraries/Session/Session.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index ea7853108..01989d2d7 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -348,8 +348,9 @@ class CI_Session { if ($hash_function !== '1') { ini_set('session.hash_function', 1); - $bits = 160; } + + $bits = 160; } elseif ( ! in_array($hash_function, hash_algos(), TRUE)) { @@ -363,7 +364,7 @@ class CI_Session { } $bits_per_character = (int) ini_get('session.hash_bits_per_character'); - $sid_length = $bits * $bits_per_character; + $sid_length = (int) ceil($bits / $bits_per_character); } else { -- cgit v1.2.3-24-g4f1b From be4bab99fc8165858568e0278492aaebecee68f0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 12:50:03 +0300 Subject: Fix #4884 --- system/database/DB_query_builder.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 5491b2000..5a86ce50f 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -679,7 +679,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // value appears not to have been set, assign the test to IS NULL $k .= ' IS NULL'; } - elseif (preg_match('/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) + elseif (preg_match('/\s*(!?=|<>|\sIS(?:\s+NOT)?\s)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) { $k = substr($k, 0, $match[0][1]).($match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL'); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 58ca20ee9..0a8160acb 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -20,6 +20,7 @@ Bug fixes for 3.1.2 - Fixed a regression (#4874) - :doc:`Session Library ` didn't take into account ``session.hash_bits_per_character`` when validating session IDs. - Fixed a bug (#4871) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. +- Fixed a bug (#4884) - :doc:`Query Builder ` didn't properly parse field names ending in 'is' when used inside WHERE and HAVING statements. Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From 8bb7f7f50e99407c5f4def6e2f8e429245bd8613 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 13:16:38 +0300 Subject: [ci skip] Add upgrade instructions for CI_Sessions --- user_guide_src/source/installation/upgrade_312.rst | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/user_guide_src/source/installation/upgrade_312.rst b/user_guide_src/source/installation/upgrade_312.rst index 91467233e..e0b2191dd 100644 --- a/user_guide_src/source/installation/upgrade_312.rst +++ b/user_guide_src/source/installation/upgrade_312.rst @@ -12,3 +12,29 @@ 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: Update your "ci_sessions" database table +================================================ + +If you're using the :doc:`Session Library ` with the +'database' driver, you may have to ``ALTER`` your sessions table for your +sessions to continue to work. + +.. note:: The table in question is not necessarily named "ci_sessions". + It is what you've set as your ``$config['sess_save_path']``. + +This will only affect you if you've changed your ``session.hash_function`` +*php.ini* setting to something like 'sha512'. Or if you've been running +an older CodeIgniter version on PHP 7.1+. + +It is recommended that you do this anyway, just to avoid potential issues +in the future if you do change your configuration. + +Just execute the one of the following SQL queries, depending on your +database:: + + // MySQL: + ALTER TABLE ci_sessions CHANGE id id varchar(128) NOT NULL; + + // PostgreSQL + ALTER TABLE ci_sessions ALTER COLUMN id SET DATA TYPE varchar(128); -- cgit v1.2.3-24-g4f1b From 4c7323e2e0ff8f39e4b14233903c3bba878240b7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 13:18:17 +0300 Subject: [ci skip] Clear trailing whitespace from PR #4834 --- system/helpers/inflector_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index 6dc3b5030..f54dac019 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -268,7 +268,7 @@ if ( ! function_exists('is_countable')) 'species', 'swine', 'traffic', - 'wheat', + 'wheat' ) ); } -- cgit v1.2.3-24-g4f1b From c274a8fc7f8f0a012e8c535eab976af01d6e106b Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Fri, 28 Oct 2016 18:43:30 +0800 Subject: Match both single and double quote in compile_binds(). Signed-off-by: tianhe1986 --- system/database/DB_driver.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 43e8eeac6..465d8db7b 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -938,7 +938,7 @@ abstract class CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/'[^']*'/i", $sql, $matches)) + if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 63df2963d..3a893ace4 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -172,7 +172,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/'[^']*'/i", $sql, $matches)) + if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], -- cgit v1.2.3-24-g4f1b From eef5951ae313c2c4080e94b8c1aa743a6d6c93b7 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Fri, 28 Oct 2016 18:48:35 +0800 Subject: Match single quote in is_write_type(). Signed-off-by: tianhe1986 --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 465d8db7b..a9a3f29e5 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -982,7 +982,7 @@ abstract class CI_DB_driver { */ public function is_write_type($sql) { - return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql); + return (bool) preg_match('/^\s*["\']?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 4e2cdec6ff4b4af5f994be4c348ad3b9a9a2942f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 14:19:08 +0300 Subject: Improve byte-safety --- system/core/Log.php | 53 +++++++++++++++++++++- system/core/Output.php | 62 +++++++++++++++++++++++--- system/libraries/Email.php | 87 +++++++++++++++++++++++++++++-------- system/libraries/Zip.php | 74 +++++++++++++++++++++++++------ user_guide_src/source/changelog.rst | 1 + 5 files changed, 236 insertions(+), 41 deletions(-) diff --git a/system/core/Log.php b/system/core/Log.php index 986121526..cf6c75a95 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -104,6 +104,13 @@ class CI_Log { */ protected $_levels = array('ERROR' => 1, 'DEBUG' => 2, 'INFO' => 3, 'ALL' => 4); + /** + * mbstring.func_override flag + * + * @var bool + */ + protected static $func_override; + // -------------------------------------------------------------------- /** @@ -115,6 +122,8 @@ class CI_Log { { $config =& get_config(); + isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); + $this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/'; $this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '') ? ltrim($config['log_file_extension'], '.') : 'php'; @@ -208,9 +217,9 @@ class CI_Log { $message .= $this->_format_line($level, $date, $msg); - for ($written = 0, $length = strlen($message); $written < $length; $written += $result) + for ($written = 0, $length = self::strlen($message); $written < $length; $written += $result) { - if (($result = fwrite($fp, substr($message, $written))) === FALSE) + if (($result = fwrite($fp, self::substr($message, $written))) === FALSE) { break; } @@ -244,4 +253,44 @@ class CI_Log { { return $level.' - '.$date.' --> '.$message."\n"; } + + // -------------------------------------------------------------------- + + /** + * Byte-safe strlen() + * + * @param string $str + * @return int + */ + protected static function strlen($str) + { + return (self::$func_override) + ? mb_strlen($str, '8bit') + : strlen($str); + } + + // -------------------------------------------------------------------- + + /** + * Byte-safe substr() + * + * @param string $str + * @param int $start + * @param int $length + * @return string + */ + protected static function substr($str, $start, $length = NULL) + { + if (self::$func_override) + { + // mb_substr($str, $start, null, '8bit') returns an empty + // string on PHP 5.3 + isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); + return mb_substr($str, $start, $length, '8bit'); + } + + return isset($length) + ? substr($str, $start, $length) + : substr($str, $start); + } } diff --git a/system/core/Output.php b/system/core/Output.php index 06ff1011c..cf6510ff1 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -122,6 +122,13 @@ class CI_Output { */ public $parse_exec_vars = TRUE; + /** + * mbstring.func_override flag + * + * @var bool + */ + protected static $func_override; + /** * Class constructor * @@ -138,6 +145,8 @@ class CI_Output { && extension_loaded('zlib') ); + isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); + // Get mime types for later $this->mimes =& get_mimes(); @@ -304,9 +313,9 @@ class CI_Output { for ($i = 0, $c = count($headers); $i < $c; $i++) { - if (strncasecmp($header, $headers[$i], $l = strlen($header)) === 0) + if (strncasecmp($header, $headers[$i], $l = self::strlen($header)) === 0) { - return trim(substr($headers[$i], $l+1)); + return trim(self::substr($headers[$i], $l+1)); } } @@ -480,13 +489,13 @@ class CI_Output { if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) { header('Content-Encoding: gzip'); - header('Content-Length: '.strlen($output)); + header('Content-Length: '.self::strlen($output)); } else { // User agent doesn't support gzip compression, // so we'll have to decompress our cache - $output = gzinflate(substr($output, 10, -8)); + $output = gzinflate(self::substr($output, 10, -8)); } } @@ -601,9 +610,9 @@ class CI_Output { $output = $cache_info.'ENDCI--->'.$output; - for ($written = 0, $length = strlen($output); $written < $length; $written += $result) + for ($written = 0, $length = self::strlen($output); $written < $length; $written += $result) { - if (($result = fwrite($fp, substr($output, $written))) === FALSE) + if (($result = fwrite($fp, self::substr($output, $written))) === FALSE) { break; } @@ -711,7 +720,7 @@ class CI_Output { } // Display the cache - $this->_display(substr($cache, strlen($match[0]))); + $this->_display(self::substr($cache, self::strlen($match[0]))); log_message('debug', 'Cache file is current. Sending it to browser.'); return TRUE; } @@ -797,4 +806,43 @@ class CI_Output { } } + // -------------------------------------------------------------------- + + /** + * Byte-safe strlen() + * + * @param string $str + * @return int + */ + protected static function strlen($str) + { + return (self::$func_override) + ? mb_strlen($str, '8bit') + : strlen($str); + } + + // -------------------------------------------------------------------- + + /** + * Byte-safe substr() + * + * @param string $str + * @param int $start + * @param int $length + * @return string + */ + protected static function substr($str, $start, $length = NULL) + { + if (self::$func_override) + { + // mb_substr($str, $start, null, '8bit') returns an empty + // string on PHP 5.3 + isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); + return mb_substr($str, $start, $length, '8bit'); + } + + return isset($length) + ? substr($str, $start, $length) + : substr($str, $start); + } } diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 7f49c1b3d..676bbcafb 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -374,6 +374,13 @@ class CI_Email { 5 => '5 (Lowest)' ); + /** + * mbstring.func_override flag + * + * @var bool + */ + protected static $func_override; + // -------------------------------------------------------------------- /** @@ -390,6 +397,8 @@ class CI_Email { $this->initialize($config); $this->_safe_mode = ( ! is_php('5.4') && ini_get('safe_mode')); + isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); + log_message('info', 'Email Class Initialized'); } @@ -1037,7 +1046,7 @@ class CI_Email { { if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@')) { - $email = substr($email, 0, ++$atpos).idn_to_ascii(substr($email, $atpos)); + $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos)); } return (bool) filter_var($email, FILTER_VALIDATE_EMAIL); @@ -1154,7 +1163,7 @@ class CI_Email { { // Is the line within the allowed character count? // If so we'll join it to the output and continue - if (mb_strlen($line) <= $charlim) + if (self::strlen($line) <= $charlim) { $output .= $line.$this->newline; continue; @@ -1170,10 +1179,10 @@ class CI_Email { } // Trim the word down - $temp .= mb_substr($line, 0, $charlim - 1); - $line = mb_substr($line, $charlim - 1); + $temp .= self::substr($line, 0, $charlim - 1); + $line = self::substr($line, $charlim - 1); } - while (mb_strlen($line) > $charlim); + while (self::strlen($line) > $charlim); // If $temp contains data it means we had to split up an over-length // word into smaller chunks so we'll add it back to our current line @@ -1385,7 +1394,7 @@ class CI_Email { $this->_header_str .= $hdr; } - strlen($body) && $body .= $this->newline.$this->newline; + self::strlen($body) && $body .= $this->newline.$this->newline; $body .= $this->_get_mime_message().$this->newline.$this->newline .'--'.$last_boundary.$this->newline @@ -1532,7 +1541,7 @@ class CI_Email { foreach (explode("\n", $str) as $line) { - $length = strlen($line); + $length = self::strlen($line); $temp = ''; // Loop through each character in the line to add soft-wrap @@ -1567,7 +1576,7 @@ class CI_Email { // If we're at the character limit, add the line to the output, // reset our temp variable, and keep on chuggin' - if ((strlen($temp) + strlen($char)) >= 76) + if ((self::strlen($temp) + self::strlen($char)) >= 76) { $output .= $temp.$escape.$this->crlf; $temp = ''; @@ -1582,7 +1591,7 @@ class CI_Email { } // get rid of extra CRLF tacked onto the end - return substr($output, 0, strlen($this->crlf) * -1); + return self::substr($output, 0, self::strlen($this->crlf) * -1); } // -------------------------------------------------------------------- @@ -1624,7 +1633,7 @@ class CI_Email { // iconv_mime_encode() will always put a header field name. // We've passed it an empty one, but it still prepends our // encoded string with ': ', so we need to strip it. - return substr($output, 2); + return self::substr($output, 2); } $chars = iconv_strlen($str, 'UTF-8'); @@ -1636,10 +1645,10 @@ class CI_Email { } // We might already have this set for UTF-8 - isset($chars) OR $chars = strlen($str); + isset($chars) OR $chars = self::strlen($str); $output = '=?'.$this->charset.'?Q?'; - for ($i = 0, $length = strlen($output); $i < $chars; $i++) + for ($i = 0, $length = self::strlen($output); $i < $chars; $i++) { $chr = ($this->charset === 'UTF-8' && ICONV_ENABLED === TRUE) ? '='.implode('=', str_split(strtoupper(bin2hex(iconv_substr($str, $i, 1, $this->charset))), 2)) @@ -1647,11 +1656,11 @@ class CI_Email { // RFC 2045 sets a limit of 76 characters per line. // We'll append ?= to the end of each line though. - if ($length + ($l = strlen($chr)) > 74) + if ($length + ($l = self::strlen($chr)) > 74) { $output .= '?='.$this->crlf // EOL .' =?'.$this->charset.'?Q?'.$chr; // New line - $length = 6 + strlen($this->charset) + $l; // Reset the length for the new line + $length = 6 + self::strlen($this->charset) + $l; // Reset the length for the new line } else { @@ -1744,14 +1753,14 @@ class CI_Email { if ($i === $float) { - $chunk[] = substr($set, 1); + $chunk[] = self::substr($set, 1); $float += $this->bcc_batch_size; $set = ''; } if ($i === $c-1) { - $chunk[] = substr($set, 1); + $chunk[] = self::substr($set, 1); } } @@ -2109,7 +2118,7 @@ class CI_Email { $this->_debug_msg[] = '
'.$cmd.': '.$reply.'
'; - if ((int) substr($reply, 0, 3) !== $resp) + if ((int) self::substr($reply, 0, 3) !== $resp) { $this->_set_error_message('lang:email_smtp_error', $reply); return FALSE; @@ -2196,9 +2205,9 @@ class CI_Email { protected function _send_data($data) { $data .= $this->newline; - for ($written = $timestamp = 0, $length = strlen($data); $written < $length; $written += $result) + for ($written = $timestamp = 0, $length = self::strlen($data); $written < $length; $written += $result) { - if (($result = fwrite($this->_smtp_connect, substr($data, $written))) === FALSE) + if (($result = fwrite($this->_smtp_connect, self::substr($data, $written))) === FALSE) { break; } @@ -2382,4 +2391,44 @@ class CI_Email { { is_resource($this->_smtp_connect) && $this->_send_command('quit'); } + + // -------------------------------------------------------------------- + + /** + * Byte-safe strlen() + * + * @param string $str + * @return int + */ + protected static function strlen($str) + { + return (self::$func_override) + ? mb_strlen($str, '8bit') + : strlen($str); + } + + // -------------------------------------------------------------------- + + /** + * Byte-safe substr() + * + * @param string $str + * @param int $start + * @param int $length + * @return string + */ + protected static function substr($str, $start, $length = NULL) + { + if (self::$func_override) + { + // mb_substr($str, $start, null, '8bit') returns an empty + // string on PHP 5.3 + isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); + return mb_substr($str, $start, $length, '8bit'); + } + + return isset($length) + ? substr($str, $start, $length) + : substr($str, $start); + } } diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 140ad7212..25315c92e 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -105,6 +105,13 @@ class CI_Zip { */ public $compression_level = 2; + /** + * mbstring.func_override flag + * + * @var bool + */ + protected static $func_override; + /** * Initialize zip compression class * @@ -112,6 +119,8 @@ class CI_Zip { */ public function __construct() { + isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); + $this->now = time(); log_message('info', 'Zip Compression Class Initialized'); } @@ -182,7 +191,7 @@ class CI_Zip { .pack('V', 0) // crc32 .pack('V', 0) // compressed filesize .pack('V', 0) // uncompressed filesize - .pack('v', strlen($dir)) // length of pathname + .pack('v', self::strlen($dir)) // length of pathname .pack('v', 0) // extra field length .$dir // below is "data descriptor" segment @@ -197,7 +206,7 @@ class CI_Zip { .pack('V',0) // crc32 .pack('V',0) // compressed filesize .pack('V',0) // uncompressed filesize - .pack('v', strlen($dir)) // length of pathname + .pack('v', self::strlen($dir)) // length of pathname .pack('v', 0) // extra field length .pack('v', 0) // file comment length .pack('v', 0) // disk number start @@ -206,7 +215,7 @@ class CI_Zip { .pack('V', $this->offset) // relative offset of local header .$dir; - $this->offset = strlen($this->zipdata); + $this->offset = self::strlen($this->zipdata); $this->entries++; } @@ -255,10 +264,10 @@ class CI_Zip { { $filepath = str_replace('\\', '/', $filepath); - $uncompressed_size = strlen($data); + $uncompressed_size = self::strlen($data); $crc32 = crc32($data); - $gzdata = substr(gzcompress($data, $this->compression_level), 2, -4); - $compressed_size = strlen($gzdata); + $gzdata = self::substr(gzcompress($data, $this->compression_level), 2, -4); + $compressed_size = self::strlen($gzdata); $this->zipdata .= "\x50\x4b\x03\x04\x14\x00\x00\x00\x08\x00" @@ -267,7 +276,7 @@ class CI_Zip { .pack('V', $crc32) .pack('V', $compressed_size) .pack('V', $uncompressed_size) - .pack('v', strlen($filepath)) // length of filename + .pack('v', self::strlen($filepath)) // length of filename .pack('v', 0) // extra field length .$filepath .$gzdata; // "file data" segment @@ -279,7 +288,7 @@ class CI_Zip { .pack('V', $crc32) .pack('V', $compressed_size) .pack('V', $uncompressed_size) - .pack('v', strlen($filepath)) // length of filename + .pack('v', self::strlen($filepath)) // length of filename .pack('v', 0) // extra field length .pack('v', 0) // file comment length .pack('v', 0) // disk number start @@ -288,7 +297,7 @@ class CI_Zip { .pack('V', $this->offset) // relative offset of local header .$filepath; - $this->offset = strlen($this->zipdata); + $this->offset = self::strlen($this->zipdata); $this->entries++; $this->file_num++; } @@ -401,8 +410,8 @@ class CI_Zip { .$this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00" .pack('v', $this->entries) // total # of entries "on this disk" .pack('v', $this->entries) // total # of entries overall - .pack('V', strlen($this->directory)) // size of central dir - .pack('V', strlen($this->zipdata)) // offset to start of central dir + .pack('V', self::strlen($this->directory)) // size of central dir + .pack('V', self::strlen($this->zipdata)) // offset to start of central dir ."\x00\x00"; // .zip file comment length } @@ -425,9 +434,9 @@ class CI_Zip { flock($fp, LOCK_EX); - for ($result = $written = 0, $data = $this->get_zip(), $length = strlen($data); $written < $length; $written += $result) + for ($result = $written = 0, $data = $this->get_zip(), $length = self::strlen($data); $written < $length; $written += $result) { - if (($result = fwrite($fp, substr($data, $written))) === FALSE) + if (($result = fwrite($fp, self::substr($data, $written))) === FALSE) { break; } @@ -481,4 +490,43 @@ class CI_Zip { return $this; } + // -------------------------------------------------------------------- + + /** + * Byte-safe strlen() + * + * @param string $str + * @return int + */ + protected static function strlen($str) + { + return (self::$func_override) + ? mb_strlen($str, '8bit') + : strlen($str); + } + + // -------------------------------------------------------------------- + + /** + * Byte-safe substr() + * + * @param string $str + * @param int $start + * @param int $length + * @return string + */ + protected static function substr($str, $start, $length = NULL) + { + if (self::$func_override) + { + // mb_substr($str, $start, null, '8bit') returns an empty + // string on PHP 5.3 + isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); + return mb_substr($str, $start, $length, '8bit'); + } + + return isset($length) + ? substr($str, $start, $length) + : substr($str, $start); + } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0a8160acb..4be0b31d3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -21,6 +21,7 @@ Bug fixes for 3.1.2 - Fixed a regression (#4874) - :doc:`Session Library ` didn't take into account ``session.hash_bits_per_character`` when validating session IDs. - Fixed a bug (#4871) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. - Fixed a bug (#4884) - :doc:`Query Builder ` didn't properly parse field names ending in 'is' when used inside WHERE and HAVING statements. +- 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_override`` is enabled. Version 3.1.1 ============= -- cgit v1.2.3-24-g4f1b From df34b547c97ba1ce1ddb819495d299cb845a87de Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 14:47:20 +0300 Subject: [ci skip] Add changelog entry for & polish doc changes from PR #4826 --- user_guide_src/source/changelog.rst | 4 ++++ user_guide_src/source/libraries/table.rst | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f60387cd5..518569097 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,10 @@ Release Date: Not Released - Changed method ``set_rules()`` to throw a ``BadMethodCallException`` when its first parameter is not an array and the ``$rules`` one is unused. + - :doc:`HTML Table Library ` changes include: + + - Changed method ``clear()`` to also reset captions. + - Database - Changed method ``initialize()`` to return void and instead throw a ``RuntimeException`` in case of failure. diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst index 3cd120f95..06dfe59de 100644 --- a/user_guide_src/source/libraries/table.rst +++ b/user_guide_src/source/libraries/table.rst @@ -275,8 +275,12 @@ Class Reference :returns: CI_Table instance (method chaining) :rtype: CI_Table - Lets you clear the table heading, row data and the caption. If you need to show multiple tables with different data you should to call this method - after each table has been generated to clear the previous table information. Example:: + Lets you clear the table heading, row data and caption. If + you need to show multiple tables with different data you + should to call this method after each table has been + generated to clear the previous table information. + + Example :: $this->load->library('table'); -- cgit v1.2.3-24-g4f1b From e02ebabb19242e1cfc6b37217bc799ff7591e941 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 16:35:12 +0300 Subject: [ci skip] Add a bash script to help with releases --- build-release.sh | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100755 build-release.sh diff --git a/build-release.sh b/build-release.sh new file mode 100755 index 000000000..490680e79 --- /dev/null +++ b/build-release.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +cd $(dirname $BASH_SOURCE) + +if [ $# -eq 0 ]; then + echo 'Usage: '$BASH_SOURCE' ' + exit 1 +fi + +version_number=$1 + +if [ ${#version_number} -lt 5 ] +then + echo "Provided version number is too short" + exit 1 +elif [ ${version_number: -4} == "-dev" ] +then + echo "'-dev' releases are not allowed" + exit 1 +fi + +version_id=${version_number:0:5} +version_id=${version_id//./} +upgrade_rst='user_guide_src/source/installation/upgrade_'$version_id'.rst' + +if [ ${#version_id} -ne 3 ] +then + echo "Invalid version number format" + exit 1 +elif [ `grep -c -F --regexp="'$version_number'" system/core/CodeIgniter.php` -ne 1 ] +then + echo "Provided version number doesn't match in system/core/CodeIgniter.php" + exit 1 +elif [ `grep -c -F --regexp="'$version_number'" user_guide_src/source/conf.py` -ne 2 ] +then + echo "Provided version number doesn't match in user_guide_src/source/conf.py" + exit 1 +elif [ ! -f "$upgrade_rst" ] +then + echo "${upgrade_rst} doesn't exist" + exit 1 +fi + +echo "Running tests ..." + +cd tests/ +phpunit + +if [ $? -ne 0 ] +then + echo "Build FAILED!" + exit 1 +fi + +cd .. +cd user_guide_src/ + +echo "" +echo "Building HTML docs; please check output for warnings ..." +echo "" + +make html + +echo "" + +if [ $? -ne 0 ] +then + echo "Build FAILED!" + exit 1 +fi + +echo "Building EPUB docs; please check output for warnings ..." +echo "" + +make epub + +echo "" + +if [ $? -ne 0 ] +then + echo "Build FAILED!" + exit 1 +fi + +cd .. + +if [ -d user_guide/ ] +then + rm -r user_guide/ +fi + +cp -r user_guide_src/build/html/ user_guide/ +cp user_guide_src/build/epub/CodeIgniter.epub "CodeIgniter ${version_number}.epub" + +echo "Build complete." -- cgit v1.2.3-24-g4f1b From 57fa143448577b670d8dd0e02b6e4cf31c4a7cff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 17:46:31 +0300 Subject: [ci skip] xss_clean() hardening - percent-sign tag (IE) - data: URI scheme inclinding whitespace (Chrome) --- system/core/Security.php | 21 +++++++++++---------- user_guide_src/source/changelog.rst | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index b9160a252..d0308c5f9 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -133,15 +133,16 @@ class CI_Security { * @var array */ protected $_never_allowed_str = array( - 'document.cookie' => '[removed]', - 'document.write' => '[removed]', - '.parentNode' => '[removed]', - '.innerHTML' => '[removed]', - '-moz-binding' => '[removed]', - '' => '-->', - ' '<![CDATA[', - '' => '<comment>' + 'document.cookie' => '[removed]', + 'document.write' => '[removed]', + '.parentNode' => '[removed]', + '.innerHTML' => '[removed]', + '-moz-binding' => '[removed]', + '' => '-->', + ' '<![CDATA[', + '' => '<comment>', + '<%' => '<%' ); /** @@ -924,7 +925,7 @@ class CI_Security { return str_replace( $match[1], preg_replace( - '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) ), diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4be0b31d3..2482c493c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -9,7 +9,7 @@ Release Date: Not Released - **Security** - - Fixed a new URL-encoding attack vector in :doc:`Security Library ` method ``xss_clean()`` affecting Firefox. + - Fixed a number of new vulnerabilities in :doc:`Security Library ` method ``xss_clean()``. - General Changes -- cgit v1.2.3-24-g4f1b From f52ad7a1a6340ea9d0e63dbf5fbf054b082fa3e9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 17:56:50 +0300 Subject: [ci skip] Add download link check to build-release.sh --- build-release.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-release.sh b/build-release.sh index 490680e79..6b3b31d12 100755 --- a/build-release.sh +++ b/build-release.sh @@ -35,6 +35,10 @@ elif [ `grep -c -F --regexp="'$version_number'" user_guide_src/source/conf.py` - then echo "Provided version number doesn't match in user_guide_src/source/conf.py" exit 1 +elif [ `grep -c -F --regexp="$version_number (Current version) " user_guide_src/source/installation/downloads.rst` -ne 1 ] +then + echo "user_guide_src/source/installation/downloads.rst doesn't appear to contain a link for this version" + exit 1 elif [ ! -f "$upgrade_rst" ] then echo "${upgrade_rst} doesn't exist" -- cgit v1.2.3-24-g4f1b From c877ac5d961831a087242ff780731c7372f84b6f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 17:56:50 +0300 Subject: [ci skip] Add download link check to build-release.sh --- build-release.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-release.sh b/build-release.sh index 490680e79..6b3b31d12 100755 --- a/build-release.sh +++ b/build-release.sh @@ -35,6 +35,10 @@ elif [ `grep -c -F --regexp="'$version_number'" user_guide_src/source/conf.py` - then echo "Provided version number doesn't match in user_guide_src/source/conf.py" exit 1 +elif [ `grep -c -F --regexp="$version_number (Current version) " user_guide_src/source/installation/downloads.rst` -ne 1 ] +then + echo "user_guide_src/source/installation/downloads.rst doesn't appear to contain a link for this version" + exit 1 elif [ ! -f "$upgrade_rst" ] then echo "${upgrade_rst} doesn't exist" -- cgit v1.2.3-24-g4f1b From a1f830dedc53e31a48c8722ed11e3e645526bdcc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 17:59:47 +0300 Subject: [ci skip] Prepare for 3.1.2 release --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 32ad61899..a2067fb10 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - const CI_VERSION = '3.1.2-dev'; + const CI_VERSION = '3.1.2'; /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2482c493c..437fdbabe 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.1.2 ============= -Release Date: Not Released +Release Date: Oct 28, 2016 - **Security** diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 17771fa9e..2f44e0cbe 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.2-dev' +version = '3.1.2' # The full version, including alpha/beta/rc tags. -release = '3.1.2-dev' +release = '3.1.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 1eacd4d33..6c1f007e3 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.1.2-dev (Current version) `_ +- `CodeIgniter v3.1.2 (Current version) `_ - `CodeIgniter v3.1.1 `_ - `CodeIgniter v3.1.0 `_ - `CodeIgniter v3.0.6 `_ -- cgit v1.2.3-24-g4f1b From b6995a6a1bdfb2275b3befb89d51da0a1769771e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 18:05:24 +0300 Subject: [ci skip] Fix upgrading instruction link titles --- user_guide_src/source/installation/upgrading.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 61b16e038..4e0b0453d 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -8,9 +8,9 @@ upgrading from. .. toctree:: :titlesonly: - Upgrading from 3.1.2 to 3.1.2 + Upgrading from 3.1.1 to 3.1.2 Upgrading from 3.1.0 to 3.1.1 - Upgrading from 3.0.6 to 3.1.x + Upgrading from 3.0.6 to 3.1.0 Upgrading from 3.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 -- cgit v1.2.3-24-g4f1b From 014be1e8726ebce6dd19284ae3deaee866d6b0e5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 18:05:24 +0300 Subject: [ci skip] Fix upgrading instruction link titles --- user_guide_src/source/installation/upgrading.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 61b16e038..4e0b0453d 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -8,9 +8,9 @@ upgrading from. .. toctree:: :titlesonly: - Upgrading from 3.1.2 to 3.1.2 + Upgrading from 3.1.1 to 3.1.2 Upgrading from 3.1.0 to 3.1.1 - Upgrading from 3.0.6 to 3.1.x + Upgrading from 3.0.6 to 3.1.0 Upgrading from 3.0.5 to 3.0.6 Upgrading from 3.0.4 to 3.0.5 Upgrading from 3.0.3 to 3.0.4 -- cgit v1.2.3-24-g4f1b From 499c6080cd41927df088206155e4055d4da3e58e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Oct 2016 18:28:34 +0300 Subject: [ci skip] Mark the start of 3.1.3-dev --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_313.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_313.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index a2067fb10..71656be29 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - const CI_VERSION = '3.1.2'; + const CI_VERSION = '3.1.3-dev'; /* * ------------------------------------------------------ diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 2f44e0cbe..4d2edbe60 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.2' +version = '3.1.3-dev' # The full version, including alpha/beta/rc tags. -release = '3.1.2' +release = '3.1.3-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 6c1f007e3..5992ba291 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.2 (Current version) `_ +- `CodeIgniter v3.1.3 (Current version) `_ +- `CodeIgniter v3.1.2 `_ - `CodeIgniter v3.1.1 `_ - `CodeIgniter v3.1.0 `_ - `CodeIgniter v3.0.6 `_ diff --git a/user_guide_src/source/installation/upgrade_313.rst b/user_guide_src/source/installation/upgrade_313.rst new file mode 100644 index 000000000..71afc6f6a --- /dev/null +++ b/user_guide_src/source/installation/upgrade_313.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.1.2 to 3.1.3 +############################# + +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. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 4e0b0453d..bc96e209f 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.2 to 3.1.3 Upgrading from 3.1.1 to 3.1.2 Upgrading from 3.1.0 to 3.1.1 Upgrading from 3.0.6 to 3.1.0 -- cgit v1.2.3-24-g4f1b From e791c2dd5112594d423342ceb29d6586acdffba3 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Sat, 29 Oct 2016 01:47:23 +0800 Subject: Revert "Match single quote in is_write_type()." This reverts commit eef5951ae313c2c4080e94b8c1aa743a6d6c93b7. Signed-off-by: tianhe1986 --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index a9a3f29e5..465d8db7b 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -982,7 +982,7 @@ abstract class CI_DB_driver { */ public function is_write_type($sql) { - return (bool) preg_match('/^\s*["\']?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql); + return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From c867754cbb2260efeaa25ff9c339989807e8c713 Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Mon, 31 Oct 2016 01:38:18 +0200 Subject: download helper should be able to offer a download by reading a local file and also a custom destination filename. --- system/helpers/download_helper.php | 28 +++++++++++++++++------ user_guide_src/source/helpers/download_helper.rst | 14 +++++++++--- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a6463dfd7..289ea199a 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -56,7 +56,7 @@ if ( ! function_exists('force_download')) * * Generates headers that force a download to happen * - * @param string filename + * @param mixed filename (or an array of local file path => destination filename) * @param mixed the data to be downloaded * @param bool whether to try and send the actual file MIME type * @return void @@ -69,14 +69,28 @@ if ( ! function_exists('force_download')) } elseif ($data === NULL) { - if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) + // Is $filename an array as ['local source path' => 'destination filename']? + if(is_array($filename)) { - return; - } + $filepath = key($filename); + $filename = current($filename); - $filepath = $filename; - $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); - $filename = end($filename); + if ( ! @is_file($filepath) OR ($filesize = @filesize($filepath)) === FALSE) + { + return; + } + } + else + { + if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) + { + return; + } + + $filepath = $filename; + $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); + $filename = end($filename); + } } else { diff --git a/user_guide_src/source/helpers/download_helper.rst b/user_guide_src/source/helpers/download_helper.rst index 1a4065073..83182a256 100644 --- a/user_guide_src/source/helpers/download_helper.rst +++ b/user_guide_src/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,9 @@ 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 array containing a single entry, the key being the existing, readable file path + and the value as the downloading file name. 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 @@ -53,4 +55,10 @@ The following functions are available: do the following:: // Contents of photo.jpg will be automatically read - force_download('/path/to/photo.jpg', NULL); \ No newline at end of file + force_download('/path/to/photo.jpg', NULL); + + If you want to download an existing file from your server, but change the name + of the actual file sent to browser, you will need this:: + + // Contents of photo.jpg will be automatically read and sent as my-photo.jpg + force_download(array('/path/to/photo.jpg' => 'my-photo.jpg'), NULL); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 214a537e4df19f3885943604c1b8a49c3f64993d Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Mon, 31 Oct 2016 01:42:41 +0200 Subject: single entry restriction if $filename is an array --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 289ea199a..a1d149f91 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,7 +70,7 @@ if ( ! function_exists('force_download')) elseif ($data === NULL) { // Is $filename an array as ['local source path' => 'destination filename']? - if(is_array($filename)) + if(is_array($filename) && count($filename) === 1) { $filepath = key($filename); $filename = current($filename); -- cgit v1.2.3-24-g4f1b From 31d28fda8bd01ff0c7a2f196bf072bf9d84a83fe Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Oct 2016 09:35:29 +0200 Subject: Merge pull request #4886 from tianhe1986/develop_dbdriver_quote Detect double-quoted strings in DB::compile_binds() --- system/database/DB_driver.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 7ae52a307..fcc15eee5 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1000,7 +1000,7 @@ abstract class CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/'[^']*'/i", $sql, $matches)) + if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index dbce1cf79..b5512fd76 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -172,7 +172,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/'[^']*'/i", $sql, $matches)) + if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], -- cgit v1.2.3-24-g4f1b From 6488fc75567b93b4ad1a9ec9ff153c646c379da2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Oct 2016 09:38:25 +0200 Subject: [ci skip] Add changelog entry for #4886 --- user_guide_src/source/changelog.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 437fdbabe..47b8fecf2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,16 @@ Change Log ########## +Version 3.1.3 +============= + +Release Date: Not Released + +Bug fixes for 3.1.3 +------------------- + +- Fixed a bug (#4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. + Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 14a6c2e2925724b5bf814dc895e14535dfa0aa09 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Oct 2016 10:04:17 +0200 Subject: Fix #4890 --- system/libraries/Xmlrpcs.php | 8 ++++---- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index afcdbe68c..f343a7ec0 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -339,11 +339,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc { //------------------------------------- $method_parts = explode('.', $this->methods[$methName]['function']); - $objectCall = (isset($method_parts[1]) && $method_parts[1] !== ''); + $objectCall = ! empty($method_parts[1]); if ($system_call === TRUE) { - if ( ! is_callable(array($this,$method_parts[1]))) + if ( ! is_callable(array($this, $method_parts[1]))) { return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']); } @@ -400,11 +400,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc { } elseif ($this->object === FALSE) { - return get_instance()->$method_parts[1]($m); + return get_instance()->{$method_parts[1]}($m); } else { - return $this->object->$method_parts[1]($m); + return $this->object->{$method_parts[1]}($m); } } else diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 47b8fecf2..4a1ce3461 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Bug fixes for 3.1.3 ------------------- - Fixed a bug (#4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. +- Fixed a bug (#4890) - :doc:`XML-RPC Library ` didn't work on PHP 7. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 17e662951c25ae2c83328508e90b9a0b99d49603 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Mon, 31 Oct 2016 18:56:59 +0800 Subject: Fix compile_binds: do not use back references inside a character class. Signed-off-by: tianhe1986 --- system/database/DB_driver.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 064d4070e..c142a1354 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -938,7 +938,7 @@ abstract class CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) + if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index b5512fd76..82efa498c 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -172,7 +172,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) + if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], -- cgit v1.2.3-24-g4f1b From 6b5464c5b8a97268aab3814b56a1413a9463a97f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Oct 2016 13:09:33 +0200 Subject: Merge pull request #4893 from tianhe1986/develop_fix_dbdriver_quote Fix compile_binds: do not use back references inside a character class. --- system/database/DB_driver.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index fcc15eee5..151340596 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1000,7 +1000,7 @@ abstract class CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) + if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index b5512fd76..82efa498c 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -172,7 +172,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { $ml = strlen($this->bind_marker); // Make sure not to replace a chunk inside a string that happens to match the bind marker - if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches)) + if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', str_replace($matches[0], -- cgit v1.2.3-24-g4f1b From c953c128649e06bb1a3594e56459cf14bdb6e048 Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Mon, 31 Oct 2016 14:06:48 +0200 Subject: fixed coding style --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a1d149f91..32ee773bb 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,7 +70,7 @@ if ( ! function_exists('force_download')) elseif ($data === NULL) { // Is $filename an array as ['local source path' => 'destination filename']? - if(is_array($filename) && count($filename) === 1) + if(is_array($filename) && count($filename)) { $filepath = key($filename); $filename = current($filename); -- cgit v1.2.3-24-g4f1b From b907c8ad41dfb4a9394b3a73182f0abf7fe14f94 Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Mon, 31 Oct 2016 14:08:36 +0200 Subject: fixed coding style (2) --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 32ee773bb..9158272ef 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,7 +70,7 @@ if ( ! function_exists('force_download')) elseif ($data === NULL) { // Is $filename an array as ['local source path' => 'destination filename']? - if(is_array($filename) && count($filename)) + if(is_array($filename) && count($filename) == 1) { $filepath = key($filename); $filename = current($filename); -- cgit v1.2.3-24-g4f1b From 5d1c2123fdc575d70e9db38ce30b34d4b291469c Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Mon, 31 Oct 2016 14:16:35 +0200 Subject: refactorised Docs (parts) of Download helper. --- user_guide_src/source/helpers/download_helper.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/helpers/download_helper.rst b/user_guide_src/source/helpers/download_helper.rst index 83182a256..e11d92a14 100644 --- a/user_guide_src/source/helpers/download_helper.rst +++ b/user_guide_src/source/helpers/download_helper.rst @@ -38,9 +38,10 @@ The following functions are available: If you set the second parameter to NULL and ``$filename`` is an existing, readable file path, then its content will be read instead. You may also set ``$filename`` - as an array containing a single entry, the key being the existing, readable file path - and the value as the downloading file name. - + 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 handler for that type - it can use it. -- cgit v1.2.3-24-g4f1b From 7cc08237c2a15daf283e2bc61501bdc086740311 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 31 Oct 2016 16:19:46 +0200 Subject: [ci skip] Fix #4887 --- system/libraries/Upload.php | 36 +++++++++++++++++++++++------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 23fd02ead..778ed6892 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1218,21 +1218,31 @@ class CI_Upload { // We'll need this to validate the MIME info string (e.g. text/plain; charset=us-ascii) $regexp = '/^([a-z\-]+\/[a-z0-9\-\.\+]+)(;\s.+)?$/'; - // Fileinfo extension - most reliable method - $finfo = @finfo_open(FILEINFO_MIME); - if (is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system + /** + * Fileinfo extension - most reliable method + * + * Apparently XAMPP, CentOS, cPanel and who knows what + * other PHP distribution channels EXPLICITLY DISABLE + * ext/fileinfo, which is otherwise enabled by default + * since PHP 5.3 ... + */ + if (function_exists('finfo_file')) { - $mime = @finfo_file($finfo, $file['tmp_name']); - finfo_close($finfo); - - /* According to the comments section of the PHP manual page, - * it is possible that this function returns an empty string - * for some files (e.g. if they don't exist in the magic MIME database) - */ - if (is_string($mime) && preg_match($regexp, $mime, $matches)) + $finfo = @finfo_open(FILEINFO_MIME); + if (is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system { - $this->file_type = $matches[1]; - return; + $mime = @finfo_file($finfo, $file['tmp_name']); + finfo_close($finfo); + + /* According to the comments section of the PHP manual page, + * it is possible that this function returns an empty string + * for some files (e.g. if they don't exist in the magic MIME database) + */ + if (is_string($mime) && preg_match($regexp, $mime, $matches)) + { + $this->file_type = $matches[1]; + return; + } } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4a1ce3461..ffa0597b7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,6 +12,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. - Fixed a bug (#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. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 627b050e89ea3e9794e7ad03c28aeb770417357a Mon Sep 17 00:00:00 2001 From: George Petculescu Date: Tue, 1 Nov 2016 08:16:47 +0200 Subject: if download helper receives a numeric array now it won't work --- system/helpers/download_helper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 9158272ef..4bab69005 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -75,6 +75,11 @@ if ( ! function_exists('force_download')) $filepath = key($filename); $filename = current($filename); + if(is_int($filepath)) + { + return; + } + if ( ! @is_file($filepath) OR ($filesize = @filesize($filepath)) === FALSE) { return; -- cgit v1.2.3-24-g4f1b From 54a1138a864a9d2d3ce7ef6d4b9d22df86440bb5 Mon Sep 17 00:00:00 2001 From: gxgpet Date: Tue, 1 Nov 2016 10:44:32 +0200 Subject: Fixed coding style (this time for real) --- system/helpers/download_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 4bab69005..eb714c1ff 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,12 +70,12 @@ if ( ! function_exists('force_download')) elseif ($data === NULL) { // Is $filename an array as ['local source path' => 'destination filename']? - if(is_array($filename) && count($filename) == 1) + if (is_array($filename) && count($filename) == 1) { $filepath = key($filename); $filename = current($filename); - if(is_int($filepath)) + if (is_int($filepath)) { return; } -- cgit v1.2.3-24-g4f1b From b18492be397373de452999f34a200cc24fb751ed Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Tue, 1 Nov 2016 11:19:24 +0200 Subject: added tests for ordinal_format() helper function (Inflector helper) --- tests/codeigniter/helpers/inflector_helper_test.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/codeigniter/helpers/inflector_helper_test.php b/tests/codeigniter/helpers/inflector_helper_test.php index 81ce5e394..a5bb80532 100644 --- a/tests/codeigniter/helpers/inflector_helper_test.php +++ b/tests/codeigniter/helpers/inflector_helper_test.php @@ -93,4 +93,23 @@ class Inflector_helper_test extends CI_TestCase { } } + // -------------------------------------------------------------------- + + public function test_ordinal_format() + { + $strs = array( + 1 => '1st', + 2 => '2nd', + 4 => '4th', + 11 => '1th', + 12 => '12th', + 13 => '13th', + 'something else' => 'something else', + ); + + foreach ($strs as $str => $expect) + { + $this->assertEquals($expect, ordinal_format($str)); + } + } } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b2c3a0063d02edfec79ab9aa5619c9f40cdd21d0 Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Tue, 1 Nov 2016 11:22:38 +0200 Subject: small typo --- tests/codeigniter/helpers/inflector_helper_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codeigniter/helpers/inflector_helper_test.php b/tests/codeigniter/helpers/inflector_helper_test.php index a5bb80532..4a1e64fae 100644 --- a/tests/codeigniter/helpers/inflector_helper_test.php +++ b/tests/codeigniter/helpers/inflector_helper_test.php @@ -101,7 +101,7 @@ class Inflector_helper_test extends CI_TestCase { 1 => '1st', 2 => '2nd', 4 => '4th', - 11 => '1th', + 11 => '11th', 12 => '12th', 13 => '13th', 'something else' => 'something else', -- cgit v1.2.3-24-g4f1b From 3e86cc27d531e15c7d7dc7c606f87e1694272f92 Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Tue, 1 Nov 2016 14:02:46 +0200 Subject: fixed when $filename is an array with a different count than 1. --- system/helpers/download_helper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index eb714c1ff..43c3924a3 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,8 +70,13 @@ if ( ! function_exists('force_download')) elseif ($data === NULL) { // Is $filename an array as ['local source path' => 'destination filename']? - if (is_array($filename) && count($filename) == 1) + if (is_array($filename)) { + if (count($filename) != 1) + { + return; + } + $filepath = key($filename); $filename = current($filename); -- cgit v1.2.3-24-g4f1b From 49407be71a80d67151a296be25fff2468c68ab55 Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Tue, 1 Nov 2016 16:10:59 +0200 Subject: strict comparison of 1. --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 43c3924a3..9619c61b1 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -72,7 +72,7 @@ if ( ! function_exists('force_download')) // Is $filename an array as ['local source path' => 'destination filename']? if (is_array($filename)) { - if (count($filename) != 1) + if (count($filename) !== 1) { return; } -- cgit v1.2.3-24-g4f1b From 8d11232616fdf984ff8b9bb295693bdea91d7d8e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Nov 2016 16:14:35 +0200 Subject: [ci skip] Add changelog entry for PR #4891 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 618dd604a..9c3058ce5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -40,6 +40,7 @@ Release Date: Not Released - Helpers - Added new function :php:func:`ordinal_format()` to :doc:`Inflector Helper `. + - Updated :doc:`Download Helper ` :php:func:`force_download()` to allow existing files to be renamed for download. - Updated :doc:`HTML Helper ` function :php:func:`meta()` with support for "charset" and "property" properties. - Changed :doc:`HTML Helper ` function :php:func:`doctype()` default document type to HTML 5. -- cgit v1.2.3-24-g4f1b From 3a89d3c05303d25486576de3d056f39585decfe4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 3 Nov 2016 16:26:31 +0200 Subject: Fix #4679, for real --- system/core/Input.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/Input.php b/system/core/Input.php index b81d51ebf..24fe8a9cc 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -521,7 +521,7 @@ class CI_Input { $netaddr = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($netaddr, ':')), $netaddr)); for ($j = 0; $j < 8; $j++) { - $netaddr[$i] = intval($netaddr[$j], 16); + $netaddr[$j] = intval($netaddr[$j], 16); } } else diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ffa0597b7..e5c5ae050 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. - Fixed a bug (#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. +- Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From be8bd923329cf233fb3828afab5c3b4ceef296ec Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Nov 2016 12:31:31 +0200 Subject: Fix #4902 --- system/libraries/Image_lib.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 7ec8ba365..06cdde0b8 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -886,7 +886,7 @@ class CI_Image_lib { } } - $cmd .= escapeshellarg($this->full_src_path).' '.escapeshellarg($this->full_dst_path).' 2>&1'; + $cmd .= ' '.escapeshellarg($this->full_src_path).' '.escapeshellarg($this->full_dst_path).' 2>&1'; $retval = 1; // exec() might be disabled diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e5c5ae050..e3183204c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#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. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. +- Fixed a bug (#4902) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 4015f9bd8342ad9e05ceae517967719907997434 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Nov 2016 10:22:59 +0200 Subject: Fix #4905 --- system/core/Loader.php | 40 ++++++++----------------------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index d2c350816..1111481b7 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -591,15 +591,21 @@ class CI_Loader { */ public function helper($helpers = array()) { - foreach ($this->_ci_prep_filename($helpers, '_helper') as $helper) + is_array($helpers) OR $helpers = array($helpers); + foreach ($helpers as &$helper) { + $filename = basename($helper); + $filepath = ($filename === $helper) ? '' : substr($helper, 0, strlen($helper) - strlen($filename)); + $filename = strtolower(preg_replace('#(_helper)?(.php)?$#i', '', $filename)).'_helper'; + $helper = $filepath.$filename; + if (isset($this->_ci_helpers[$helper])) { continue; } // Is this a helper extension request? - $ext_helper = config_item('subclass_prefix').$helper; + $ext_helper = config_item('subclass_prefix').$filename; $ext_loaded = FALSE; foreach ($this->_ci_helper_paths as $path) { @@ -1404,34 +1410,4 @@ class CI_Loader { $CI =& get_instance(); return $CI->$component; } - - // -------------------------------------------------------------------- - - /** - * Prep filename - * - * This function prepares filenames of various items to - * make their loading more reliable. - * - * @param string|string[] $filename Filename(s) - * @param string $extension Filename extension - * @return array - */ - protected function _ci_prep_filename($filename, $extension) - { - if ( ! is_array($filename)) - { - return array(strtolower(str_replace(array($extension, '.php'), '', $filename).$extension)); - } - else - { - foreach ($filename as $key => $val) - { - $filename[$key] = strtolower(str_replace(array($extension, '.php'), '', $val).$extension); - } - - return $filename; - } - } - } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e3183204c..ab2309608 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.1.3 - 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. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. - Fixed a bug (#4902) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. +- Fixed a bug (#4905) - :doc:`Loader Library ` didn't take into account possible user-provided directory paths when loading helpers. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 2c9fa80e413388fa68fecfcf8120d6161f1920d6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Nov 2016 11:53:53 +0200 Subject: [ci skip] Fix a changelog entry link --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ab2309608..e8498b452 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,7 +10,7 @@ Release Date: Not Released Bug fixes for 3.1.3 ------------------- -- Fixed a bug (#4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. +- Fixed a bug (#4886) - :doc:`Database Library ` didn't differentiate bind markers inside double-quoted strings in queries. - Fixed a bug (#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. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. -- cgit v1.2.3-24-g4f1b From 7622ec6b06221b767c6e99251fb8f0f881e48c8f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Nov 2016 11:56:21 +0200 Subject: [ci skip] Specify sphinxcontrib-phpdomain 0.1.3.post1 version Our Sphinx dependencies suck --- user_guide_src/README.rst | 4 ++-- user_guide_src/source/documentation/index.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/user_guide_src/README.rst b/user_guide_src/README.rst index 188b42e88..d645adb73 100644 --- a/user_guide_src/README.rst +++ b/user_guide_src/README.rst @@ -24,7 +24,7 @@ Installation 1. Install `easy_install `_ 2. ``easy_install "sphinx==1.2.3"`` -3. ``easy_install sphinxcontrib-phpdomain`` +3. ``easy_install "sphinxcontrib-phpdomain==0.1.3.post1"`` 4. Install the CI Lexer which allows PHP, HTML, CSS, and JavaScript syntax highlighting in code examples (see *cilexer/README*) 5. ``cd user_guide_src`` 6. ``make html`` @@ -60,4 +60,4 @@ Style Guideline *************** Please refer to source/documentation/index.rst for general guidelines for -using Sphinx to document CodeIgniter. \ No newline at end of file +using Sphinx to document CodeIgniter. diff --git a/user_guide_src/source/documentation/index.rst b/user_guide_src/source/documentation/index.rst index 60c6b4ed6..aaac33ecb 100644 --- a/user_guide_src/source/documentation/index.rst +++ b/user_guide_src/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. @@ -199,4 +199,4 @@ It creates the following display: .. php:method:: should_do_something() :returns: Whether or not something should be done - :rtype: bool \ No newline at end of file + :rtype: bool -- cgit v1.2.3-24-g4f1b From e49aa1f1cb63ad90d6c2d204439f538dcc282243 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Nov 2016 12:02:55 +0200 Subject: Fix #4916 --- system/libraries/Session/drivers/Session_database_driver.php | 4 ++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index cb152f91f..6a7282b23 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -354,7 +354,7 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan { if ($this->_platform === 'mysql') { - $arg = $session_id.($this->_config['match_ip'] ? '_'.$_SERVER['REMOTE_ADDR'] : ''); + $arg = md5($session_id.($this->_config['match_ip'] ? '_'.$_SERVER['REMOTE_ADDR'] : '')); if ($this->_db->query("SELECT GET_LOCK('".$arg."', 300) AS ci_session_lock")->row()->ci_session_lock) { $this->_lock = $arg; @@ -417,4 +417,4 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan return parent::_release_lock(); } -} \ No newline at end of file +} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e8498b452..36b5d51e4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. - Fixed a bug (#4902) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. - Fixed a bug (#4905) - :doc:`Loader Library ` didn't take into account possible user-provided directory paths when loading helpers. +- Fixed a bug (#4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 21b7a2a2d00bd5645b2ca1afcfa4098e207292a4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Nov 2016 13:23:33 +0200 Subject: Add support for CURRENT_TIMESTAMP (and similar) defaults to date/time fields in DB Forge As requested in #4852 --- system/database/DB_forge.php | 36 ++++++++++++++++++++++++------------ user_guide_src/source/changelog.rst | 6 +++++- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index ed6f4b672..fe81d0510 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -894,21 +894,33 @@ abstract class CI_DB_forge { return; } - if (array_key_exists('DEFAULT', $attributes)) + if ( ! array_key_exists('DEFAULT', $attributes)) { - if ($attributes['DEFAULT'] === NULL) - { - $field['default'] = empty($this->_null) ? '' : $this->_default.$this->_null; + return; + } - // Override the NULL attribute if that's our default - $attributes['NULL'] = TRUE; - $field['null'] = empty($this->_null) ? '' : ' '.$this->_null; - } - else - { - $field['default'] = $this->_default.$this->db->escape($attributes['DEFAULT']); - } + if ($attributes['DEFAULT'] === NULL) + { + $field['default'] = empty($this->_null) ? '' : $this->_default.$this->_null; + + // Override the NULL attribute if that's our default + $attributes['NULL'] = TRUE; + $field['null'] = empty($this->_null) ? '' : ' '.$this->_null; + return; } + + // White-list CURRENT_TIMESTAMP & similar (e.g. Oracle has stuff like SYSTIMESTAMP) defaults for date/time fields + if ( + isset($attributes['TYPE']) + && (stripos($attributes['TYPE'], 'time') !== FALSE || stripos($attributes['TYPE'], 'date') !== FALSE) + && (stripos($attributes['DEFAULT'], 'time') !== FALSE || stripos($attributes['DEFAULT'], 'date') !== FALSE) + ) + { + $field['default'] = $this->_default.$attributes['DEFAULT']; + return; + } + + $field['default'] = $this->_default.$this->db->escape($attributes['DEFAULT']); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9c3058ce5..692d06833 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -31,12 +31,16 @@ Release Date: Not Released - Changed method ``clear()`` to also reset captions. -- Database +- :doc:`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. + - :doc:`Database Forge `: + + - Added support for declaring date/time type fields default values as ``CURRENT_TIMESTAMP`` and similar. + - Helpers - Added new function :php:func:`ordinal_format()` to :doc:`Inflector Helper `. -- cgit v1.2.3-24-g4f1b From efd856edce0b952c8a7a62ec953ae1baee77ff34 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 23 Nov 2016 12:37:23 +0200 Subject: [ci skip] Styling change after 21b7a2a2d00bd5645b2ca1afcfa4098e207292a4 --- system/database/DB_forge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index fe81d0510..9add5cab7 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -912,8 +912,8 @@ abstract class CI_DB_forge { // White-list CURRENT_TIMESTAMP & similar (e.g. Oracle has stuff like SYSTIMESTAMP) defaults for date/time fields if ( isset($attributes['TYPE']) - && (stripos($attributes['TYPE'], 'time') !== FALSE || stripos($attributes['TYPE'], 'date') !== FALSE) - && (stripos($attributes['DEFAULT'], 'time') !== FALSE || stripos($attributes['DEFAULT'], 'date') !== FALSE) + && (stripos($attributes['TYPE'], 'time') !== FALSE OR stripos($attributes['TYPE'], 'date') !== FALSE) + && (stripos($attributes['DEFAULT'], 'time') !== FALSE OR stripos($attributes['DEFAULT'], 'date') !== FALSE) ) { $field['default'] = $this->_default.$attributes['DEFAULT']; -- cgit v1.2.3-24-g4f1b From 820d9cdaac9a9c0371404ce82b60a26ed3ac938f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 23 Nov 2016 13:27:42 +0200 Subject: Fix #4917 --- system/helpers/date_helper.php | 4 ++-- tests/codeigniter/helpers/date_helper_test.php | 8 ++++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 5f1fcf07e..7f072acfa 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -529,9 +529,9 @@ if ( ! function_exists('nice_date')) } // Date Like: YYYYMMDD - if (preg_match('/^(\d{2})\d{2}(\d{4})$/i', $bad_date, $matches)) + if (preg_match('/^\d{8}$/i', $bad_date, $matches)) { - return date($format, strtotime($matches[1].'/01/'.$matches[2])); + return DateTime::createFromFormat('Ymd', $bad_date)->format($format); } // Date Like: MM-DD-YYYY __or__ M-D-YYYY (or anything in between) diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php index c4f99a97c..8a3502280 100644 --- a/tests/codeigniter/helpers/date_helper_test.php +++ b/tests/codeigniter/helpers/date_helper_test.php @@ -10,6 +10,14 @@ class Date_helper_test extends CI_TestCase { // ------------------------------------------------------------------------ + public function test_nice_date() + { + $this->assertEquals('2016-11-01', nice_date('201611', 'Y-m-d')); + $this->assertEquals('2016-11-23', nice_date('20161123', 'Y-m-d')); + } + + // ------------------------------------------------------------------------ + public function test_now_local() { /* diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 36b5d51e4..fd3f668cf 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4902) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. - Fixed a bug (#4905) - :doc:`Loader Library ` didn't take into account possible user-provided directory paths when loading helpers. - Fixed a bug (#4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. +- Fixed a bug (#4917) - :doc:`Date Helper ` function :php:func:`nice_date()` didn't handle YYYYMMDD inputs properly. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 610be9dc25bcfd06f30d70139701e86b8c3ad400 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 23 Nov 2016 13:40:16 +0200 Subject: [ci skip] Deprecate nice_date() --- system/helpers/date_helper.php | 1 + user_guide_src/source/changelog.rst | 4 ++++ user_guide_src/source/helpers/date_helper.rst | 7 +++++-- user_guide_src/source/installation/upgrade_313.rst | 18 ++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 7f072acfa..0606a4562 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -496,6 +496,7 @@ if ( ! function_exists('nice_date')) * Turns many "reasonably-date-like" strings into something * that is actually useful. This only works for dates after unix epoch. * + * @deprecated 3.1.3 Use DateTime::createFromFormat($input_format, $input)->format($output_format); * @param string The terribly formatted date-like string * @param string Date format to return (same as php date function) * @return string diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fd3f668cf..af556a50a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.3 Release Date: Not Released +- General Changes + + - Deprecated :doc:`Date Helper ` function :php:func:`nice_date()`. + Bug fixes for 3.1.3 ------------------- diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index a85da26a4..600a07574 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -84,7 +84,7 @@ The following functions are available: .. note:: This function is DEPRECATED. Use the native ``date()`` combined with `DateTime's format constants - `_ + `_ instead:: echo date(DATE_RFC822, time()); @@ -220,6 +220,9 @@ The following functions are available: // Should Produce: 2001-09-11 $better_date = nice_date($bad_date, 'Y-m-d'); + .. note:: This function is DEPRECATED. Use PHP's native `DateTime class + `_ instead. + .. php:function:: timespan([$seconds = 1[, $time = ''[, $units = '']]]) :param int $seconds: Number of seconds @@ -434,4 +437,4 @@ UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand UP1275 (UTC +12:45) Chatham Islands Standard Time UP13 (UTC +13:00) Phoenix Islands Time, Tonga UP14 (UTC +14:00) Line Islands -=========== ===================================================================== \ No newline at end of file +=========== ===================================================================== diff --git a/user_guide_src/source/installation/upgrade_313.rst b/user_guide_src/source/installation/upgrade_313.rst index 71afc6f6a..ebce7ab9b 100644 --- a/user_guide_src/source/installation/upgrade_313.rst +++ b/user_guide_src/source/installation/upgrade_313.rst @@ -12,3 +12,21 @@ 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: Remove usage of nice_date() helper (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+. + +.. note:: The function is still available, but you're strongly encouraged + to remove its usage sooner rather than later. -- cgit v1.2.3-24-g4f1b From 45023e555e762baf22b94b0e9ca353548205efb4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 23 Nov 2016 13:40:52 +0200 Subject: [ci skip] Fix a changelog entry reference --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index af556a50a..1fe2d4616 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -20,7 +20,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` didn't properly resolve ``$config['proxy_ips']`` IPv6 addresses. - Fixed a bug (#4902) - :doc:`Image Manipulation Library ` processing via ImageMagick didn't work. - Fixed a bug (#4905) - :doc:`Loader Library ` didn't take into account possible user-provided directory paths when loading helpers. -- Fixed a bug (#4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. +- Fixed a bug (#4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. - Fixed a bug (#4917) - :doc:`Date Helper ` function :php:func:`nice_date()` didn't handle YYYYMMDD inputs properly. Version 3.1.2 -- cgit v1.2.3-24-g4f1b From 6276926c6dcdf976a5f4de34d62f501852e2f84b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 29 Nov 2016 15:30:30 +0200 Subject: Fix #4923 --- .../Session/drivers/Session_database_driver.php | 10 +++--- .../Session/drivers/Session_memcached_driver.php | 37 ++++++++++------------ .../Session/drivers/Session_redis_driver.php | 27 +++++++--------- user_guide_src/source/changelog.rst | 1 + 4 files changed, 34 insertions(+), 41 deletions(-) diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 6a7282b23..2f5241256 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -208,8 +208,12 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan // Prevent previous QB calls from messing with our queries $this->_db->reset_query(); + if ($this->_lock === FALSE) + { + return $this->_fail(); + } // Was the ID regenerated? - if ($session_id !== $this->_session_id) + elseif ($session_id !== $this->_session_id) { if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id)) { @@ -219,10 +223,6 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan $this->_row_exists = FALSE; $this->_session_id = $session_id; } - elseif ($this->_lock === FALSE) - { - return $this->_fail(); - } if ($this->_row_exists === FALSE) { diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index 99b4d1baa..eb1dcd3d8 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -186,7 +186,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa */ public function write($session_id, $session_data) { - if ( ! isset($this->_memcached)) + if ( ! isset($this->_memcached, $this->_lock_key)) { return $this->_fail(); } @@ -202,28 +202,25 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa $this->_session_id = $session_id; } - if (isset($this->_lock_key)) - { - $key = $this->_key_prefix.$session_id; - - $this->_memcached->replace($this->_lock_key, time(), 300); - if ($this->_fingerprint !== ($fingerprint = md5($session_data))) - { - if ($this->_memcached->set($key, $session_data, $this->_config['expiration'])) - { - $this->_fingerprint = $fingerprint; - return $this->_success; - } + $key = $this->_key_prefix.$session_id; - return $this->_fail(); - } - elseif ( - $this->_memcached->touch($key, $this->_config['expiration']) - OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) - ) + $this->_memcached->replace($this->_lock_key, time(), 300); + if ($this->_fingerprint !== ($fingerprint = md5($session_data))) + { + if ($this->_memcached->set($key, $session_data, $this->_config['expiration'])) { + $this->_fingerprint = $fingerprint; return $this->_success; } + + return $this->_fail(); + } + elseif ( + $this->_memcached->touch($key, $this->_config['expiration']) + OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) + ) + { + return $this->_success; } return $this->_fail(); @@ -375,4 +372,4 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa return TRUE; } -} \ No newline at end of file +} diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 8db74c0ca..a780100b1 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -199,7 +199,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle */ public function write($session_id, $session_data) { - if ( ! isset($this->_redis)) + if ( ! isset($this->_redis, $this->_lock_key)) { return $this->_fail(); } @@ -215,27 +215,22 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle $this->_session_id = $session_id; } - if (isset($this->_lock_key)) + $this->_redis->setTimeout($this->_lock_key, 300); + if ($this->_fingerprint !== ($fingerprint = md5($session_data)) OR $this->_key_exists === FALSE) { - $this->_redis->setTimeout($this->_lock_key, 300); - if ($this->_fingerprint !== ($fingerprint = md5($session_data)) OR $this->_key_exists === FALSE) + if ($this->_redis->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) { - if ($this->_redis->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration'])) - { - $this->_fingerprint = $fingerprint; - $this->_key_exists = TRUE; - return $this->_success; - } - - return $this->_fail(); + $this->_fingerprint = $fingerprint; + $this->_key_exists = TRUE; + return $this->_success; } - return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) - ? $this->_success - : $this->_fail(); + return $this->_fail(); } - return $this->_fail(); + return ($this->_redis->setTimeout($this->_key_prefix.$session_id, $this->_config['expiration'])) + ? $this->_success + : $this->_fail(); } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1fe2d4616..cb95d173b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4905) - :doc:`Loader Library ` didn't take into account possible user-provided directory paths when loading helpers. - Fixed a bug (#4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. - Fixed a bug (#4917) - :doc:`Date Helper ` function :php:func:`nice_date()` didn't handle YYYYMMDD inputs properly. +- Fixed a bug (#4923) - :doc:`Session Library ` could execute an erroneous SQL query with the 'database' driver, if the lock attempt times out. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From e377910ccf826b448203513bf63bd5721bbd1375 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 13:48:58 +0200 Subject: Fix #4927 --- system/core/Output.php | 7 ++++--- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/system/core/Output.php b/system/core/Output.php index cf6510ff1..57c78ab19 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -311,11 +311,12 @@ class CI_Output { return NULL; } - for ($i = 0, $c = count($headers); $i < $c; $i++) + // Count backwards, in order to get the last matching header + for ($c = count($headers) - 1; $c > -1; $c--) { - if (strncasecmp($header, $headers[$i], $l = self::strlen($header)) === 0) + if (strncasecmp($header, $headers[$c], $l = self::strlen($header)) === 0) { - return trim(self::substr($headers[$i], $l+1)); + return trim(self::substr($headers[$c], $l+1)); } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cb95d173b..0d8a93b54 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4916) - :doc:`Session Library ` with ``sess_match_ip`` enabled was unusable for IPv6 clients when using the 'database' driver on MySQL 5.7.5+. - Fixed a bug (#4917) - :doc:`Date Helper ` function :php:func:`nice_date()` didn't handle YYYYMMDD inputs properly. - Fixed a bug (#4923) - :doc:`Session Library ` could execute an erroneous SQL query with the 'database' driver, if the lock attempt times out. +- Fixed a bug (#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. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 8db01f13809a92bac7bc95b02893175d7654d627 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:06:57 +0200 Subject: Fix #4844 --- system/libraries/Email.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 676bbcafb..2e6f5be90 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1878,7 +1878,7 @@ class CI_Email { // is popen() enabled? if ( ! function_usable('popen') OR FALSE === ($fp = @popen( - $this->mailpath.' -oi -f '.$this->clean_email($this->_headers['From']).' -t' + $this->mailpath.' -oi -f '.escapeshellarg($this->clean_email($this->_headers['From'])).' -t' , 'w')) ) // server probably has popen disabled, so nothing we can do to get a verbose error. { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0d8a93b54..4f5efe276 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -24,6 +24,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4917) - :doc:`Date Helper ` function :php:func:`nice_date()` didn't handle YYYYMMDD inputs properly. - Fixed a bug (#4923) - :doc:`Session Library ` could execute an erroneous SQL query with the 'database' driver, if the lock attempt times out. - Fixed a bug (#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. +- Fixed a bug (#4844) - :doc:`Email Library ` didn't apply ``escapeshellarg()`` to the while passing the Sendmail ``-f`` parameter through ``popen()``. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From d76431db46e04d650c1c538493021cdf336d1301 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:23:40 +0200 Subject: Switch CI_Email::$validate to On by default Relevant: #4844 --- system/libraries/Email.php | 2 +- user_guide_src/source/changelog.rst | 4 ++++ user_guide_src/source/installation/upgrade_320.rst | 14 ++++++++++++++ user_guide_src/source/libraries/email.rst | 4 ++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 162cc7777..90a68f129 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -161,7 +161,7 @@ class CI_Email { * * @var bool */ - public $validate = FALSE; + public $validate = TRUE; /** * X-Priority header value. diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d63f15f67..8a40c8d80 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -31,6 +31,10 @@ Release Date: Not Released - Changed method ``clear()`` to also reset captions. + - :doc:`Email Library ` changes include: + + - Changed the default value of the **validate** option to ``TRUE``. + - :doc:`Database ` - Changed method ``initialize()`` to return void and instead throw a ``RuntimeException`` in case of failure. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 942a8a3b5..352f85f71 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -98,6 +98,20 @@ 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 6: Check usage of the Email library +======================================== + +The :doc:`Email Library <../libraries/email>` will now by default check the +validity of all e-mail addresses passed to it. This check used to be Off by +default, and required explicitly setting the **validate** option to ``TRUE`` +in order to enable it. + +Naturally, a validity check should not result in any problems, but this is +technically a backwards-compability break and you should check that +everything works fine. +If something indeed goes wrong with that, please report it as a bug to us, +and you can disable the **validate** option to revert to the old behavior. + Step 5: Check usage of doctype() HTML helper ============================================ diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 0b38737f1..253d85c71 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -108,7 +108,7 @@ Preference Default Value Options Descript page. Make sure you don't have any relative links or relative image paths otherwise they will not work. **charset** ``$config['charset']`` Character set (utf-8, iso-8859-1, etc.). -**validate** FALSE TRUE or FALSE (boolean) Whether to validate the email address. +**validate** TRUE TRUE or FALSE (boolean) Whether to validate the email address. **priority** 3 1, 2, 3, 4, 5 Email Priority. 1 = highest. 5 = lowest. 3 = normal. **crlf** \\n "\\r\\n" or "\\n" or "\\r" Newline character. (Use "\\r\\n" to comply with RFC 822). **newline** \\n "\\r\\n" or "\\n" or "\\r" Newline character. (Use "\\r\\n" to comply with RFC 822). @@ -402,4 +402,4 @@ Class Reference // Will only print the email headers, excluding the message subject and body $this->email->print_debugger(array('headers')); - .. note:: By default, all of the raw data will be printed. \ No newline at end of file + .. note:: By default, all of the raw data will be printed. -- cgit v1.2.3-24-g4f1b From efaf5aa28ddded9f9e43cfd0afa91fda09c4ff2f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:27:32 +0200 Subject: Remove a function_exists('escapeshellarg') check from CI_Upload This didn't originally exist, but was changed due to #1494. We no longer tolerate such broken environments --- system/libraries/Upload.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 778ed6892..490421af9 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1259,9 +1259,7 @@ class CI_Upload { */ if (DIRECTORY_SEPARATOR !== '\\') { - $cmd = function_exists('escapeshellarg') - ? 'file --brief --mime '.escapeshellarg($file['tmp_name']).' 2>&1' - : 'file --brief --mime '.$file['tmp_name'].' 2>&1'; + $cmd = 'file --brief --mime '.escapeshellarg($file['tmp_name']).' 2>&1'; if (function_usable('exec')) { -- cgit v1.2.3-24-g4f1b From 57c98d820b38493eee5b3ba71cf5b6952b25ae06 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:33:56 +0200 Subject: Fix steps numbering in 3.2.0 upgrade instructions Broken in d76431db46e04d650c1c538493021cdf336d1301 --- user_guide_src/source/installation/upgrade_320.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 352f85f71..86eba701c 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -98,7 +98,7 @@ 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 6: Check usage of the Email library +Step 5: Check usage of the Email library ======================================== The :doc:`Email Library <../libraries/email>` will now by default check the @@ -112,7 +112,7 @@ everything works fine. If something indeed goes wrong with that, please report it as a bug to us, and you can disable the **validate** option to revert to the old behavior. -Step 5: Check usage of doctype() HTML helper +Step 6: Check usage of doctype() HTML helper ============================================ The :doc:`HTML Helper <../helpers/html_helper>` function -- cgit v1.2.3-24-g4f1b From 9687441bc9b77514e847a5e3c56cf7e051f14be4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:36:44 +0200 Subject: Remove previously deprecated CI_Input::is_cli_request() --- system/core/Input.php | 15 --------------- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/installation/upgrade_320.rst | 8 ++++++++ user_guide_src/source/libraries/input.rst | 19 ------------------- 4 files changed, 9 insertions(+), 34 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index cbb185a8d..2e38e4501 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -840,21 +840,6 @@ class CI_Input { // -------------------------------------------------------------------- - /** - * Is CLI request? - * - * Test to see if a request was made from the command line. - * - * @deprecated 3.0.0 Use is_cli() instead - * @return bool - */ - public function is_cli_request() - { - return is_cli(); - } - - // -------------------------------------------------------------------- - /** * Get Request Method * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8a40c8d80..035255166 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - Core - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. + - Removed previously deprecated method ``is_cli_request()`` from the :doc:`Input Library ` (use :php:func:`is_cli()` instead). - Libraries diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 86eba701c..469aa3429 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -124,3 +124,11 @@ 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. + +Step 7: Remove usage of previously deprecated functionalities +============================================================= + +The following is a list of functionalities deprecated in CodeIgniter +version 3.0.0, that have been removed in 3.2.0: + +- ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead) diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index d9c6c2dd1..899070ef4 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -440,25 +440,6 @@ Class Reference Checks to see if the HTTP_X_REQUESTED_WITH server header has been set, and returns boolean TRUE if it is or FALSE if not. - .. php:method:: is_cli_request() - - :returns: TRUE if it is a CLI request, FALSE if not - :rtype: bool - - Checks to see if the application was run from the command-line - interface. - - .. note:: This method checks both the PHP SAPI name currently in use - and if the ``STDIN`` constant is defined, which is usually a - failsafe way to see if PHP is being run via the command line. - - :: - - $this->input->is_cli_request() - - .. note:: This method is DEPRECATED and is now just an alias for the - :func:`is_cli()` function. - .. php:method:: method([$upper = FALSE]) :param bool $upper: Whether to return the request method name in upper or lower case -- cgit v1.2.3-24-g4f1b From dd2dcde50355c85466991caa9630a66a46626e46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:45:07 +0200 Subject: Remove previously deprecated fetch_*() methods from CI_Router --- system/core/Router.php | 43 ---------------------- user_guide_src/source/changelog.rst | 3 +- user_guide_src/source/installation/upgrade_320.rst | 3 ++ 3 files changed, 5 insertions(+), 44 deletions(-) diff --git a/system/core/Router.php b/system/core/Router.php index 045d36687..42d0e2952 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -438,19 +438,6 @@ class CI_Router { // -------------------------------------------------------------------- - /** - * Fetch the current class - * - * @deprecated 3.0.0 Read the 'class' property instead - * @return string - */ - public function fetch_class() - { - return $this->class; - } - - // -------------------------------------------------------------------- - /** * Set method name * @@ -464,19 +451,6 @@ class CI_Router { // -------------------------------------------------------------------- - /** - * Fetch the current method - * - * @deprecated 3.0.0 Read the 'method' property instead - * @return string - */ - public function fetch_method() - { - return $this->method; - } - - // -------------------------------------------------------------------- - /** * Set directory name * @@ -495,21 +469,4 @@ class CI_Router { $this->directory .= str_replace('.', '', trim($dir, '/')).'/'; } } - - // -------------------------------------------------------------------- - - /** - * Fetch directory - * - * Feches the sub-directory (if any) that contains the requested - * controller class. - * - * @deprecated 3.0.0 Read the 'directory' property instead - * @return string - */ - public function fetch_directory() - { - return $this->directory; - } - } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 035255166..3d6d3e392 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,7 +10,8 @@ Release Date: Not Released - Core - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. - - Removed previously deprecated method ``is_cli_request()`` from the :doc:`Input Library ` (use :php:func:`is_cli()` instead). + - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). + - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Libraries diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 469aa3429..02c78d373 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -132,3 +132,6 @@ The following is a list of functionalities deprecated in CodeIgniter version 3.0.0, that have been removed in 3.2.0: - ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead) +- ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory instead) +- ``CI_Router::fetch_class()`` (use ``CI_Router::$class`` instead) +- ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead) -- cgit v1.2.3-24-g4f1b From edbbc7dfc01ce05a1c37629df0e1b4c8d00c435f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 14:49:08 +0200 Subject: Remove previously deprecated CI_Config::system_url() --- system/core/Config.php | 14 -------------- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/installation/upgrade_320.rst | 1 + user_guide_src/source/libraries/config.rst | 11 ----------- 4 files changed, 2 insertions(+), 25 deletions(-) diff --git a/system/core/Config.php b/system/core/Config.php index e74751639..6704a0a7e 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -350,20 +350,6 @@ class CI_Config { // -------------------------------------------------------------------- - /** - * System URL - * - * @deprecated 3.0.0 Encourages insecure practices - * @return string - */ - public function system_url() - { - $x = explode('/', preg_replace('|/*(.+?)/*$|', '\\1', BASEPATH)); - return $this->slash_item('base_url').end($x).'/'; - } - - // -------------------------------------------------------------------- - /** * Set a config file item * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3d6d3e392..3adf4d6e6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,6 +12,7 @@ Release Date: Not Released - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). + - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). - Libraries diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 02c78d373..b8e990e3c 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -135,3 +135,4 @@ version 3.0.0, that have been removed in 3.2.0: - ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory instead) - ``CI_Router::fetch_class()`` (use ``CI_Router::$class`` instead) - ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead) +- ``CI_Config::system_url()`` (encourages insecure practices) diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst index a45cacdf5..7398329c3 100644 --- a/user_guide_src/source/libraries/config.rst +++ b/user_guide_src/source/libraries/config.rst @@ -239,14 +239,3 @@ Class Reference This method is normally accessed via the corresponding functions in the :doc:`URL Helper `. - - .. php:method:: system_url() - - :returns: URL pointing at your CI system/ directory - :rtype: string - - This method retrieves the URL to your CodeIgniter system/ directory. - - .. note:: This method is DEPRECATED because it encourages usage of - insecure coding practices. Your *system/* directory shouldn't - be publicly accessible. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b226bccb2f748e252b75595c497ab4b3accfe21e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:00:02 +0200 Subject: Remove previously deprecated Email Helper --- system/helpers/email_helper.php | 84 ---------------------- user_guide_src/source/changelog.rst | 6 +- user_guide_src/source/helpers/email_helper.rst | 75 ------------------- user_guide_src/source/installation/upgrade_300.rst | 9 ++- user_guide_src/source/installation/upgrade_320.rst | 5 ++ 5 files changed, 12 insertions(+), 167 deletions(-) delete mode 100644 system/helpers/email_helper.php delete mode 100644 user_guide_src/source/helpers/email_helper.rst diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php deleted file mode 100644 index 35944fc7b..000000000 --- a/system/helpers/email_helper.php +++ /dev/null @@ -1,84 +0,0 @@ -` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). + - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries @@ -588,7 +589,7 @@ Release Date: March 30, 2015 - :doc:`Directory Helper ` :php:func:`directory_map()` will now append ``DIRECTORY_SEPARATOR`` to directory names in the returned array. - :doc:`Array Helper ` :php:func:`element()` and :php:func:`elements()` now return NULL instead of FALSE when the required elements don't exist. - :doc:`Language Helper ` :php:func:`lang()` now accepts an optional list of additional HTML attributes. - - Deprecated the :doc:`Email Helper ` as its ``valid_email()``, ``send_email()`` functions are now only aliases for PHP native functions ``filter_var()`` and ``mail()`` respectively. + - Deprecated the *Email Helper* as its ``valid_email()``, ``send_email()`` functions are now only aliases for PHP native functions ``filter_var()`` and ``mail()`` respectively. - Database @@ -2764,8 +2765,7 @@ Release Date: January 30, 2008 helper. <./helpers/html_helper>` - Added img() to the :doc:`HTML helper. <./helpers/html_helper>` - Added ability to :doc:`"extend" Helpers <./general/helpers>`. - - Added an :doc:`email helper <./helpers/email_helper>` into core - helpers. + - Added an *Email Helper* into core helpers. - Added strip_quotes() function to :doc:`string helper <./helpers/string_helper>`. - Added reduce_multiples() function to :doc:`string diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst deleted file mode 100644 index 1ee97d902..000000000 --- a/user_guide_src/source/helpers/email_helper.rst +++ /dev/null @@ -1,75 +0,0 @@ -############ -Email Helper -############ - -The Email Helper provides some assistive functions for working with -Email. For a more robust email solution, see CodeIgniter's :doc:`Email -Class <../libraries/email>`. - -.. important:: The Email helper is DEPRECATED and is currently - only kept for backwards compatibility. - -.. contents:: - :local: - -.. raw:: html - -
- -Loading this Helper -=================== - -This helper is loaded using the following code:: - - $this->load->helper('email'); - -Available Functions -=================== - -The following functions are available: - - -.. php:function:: valid_email($email) - - :param string $email: E-mail address - :returns: TRUE if a valid email is supplied, FALSE otherwise - :rtype: bool - - Checks if the input is a correctly formatted e-mail address. Note that is - doesn't actually prove that the address will be able recieve mail, but - simply that it is a validly formed address. - - Example:: - - if (valid_email('email@somesite.com')) - { - echo 'email is valid'; - } - else - { - echo 'email is not valid'; - } - - .. note:: All that this function does is to use PHP's native ``filter_var()``:: - - (bool) filter_var($email, FILTER_VALIDATE_EMAIL); - -.. php:function:: send_email($recipient, $subject, $message) - - :param string $recipient: E-mail address - :param string $subject: Mail subject - :param string $message: Message body - :returns: TRUE if the mail was successfully sent, FALSE in case of an error - :rtype: bool - - Sends an email using PHP's native `mail() `_ - function. - - .. note:: All that this function does is to use PHP's native ``mail`` - - :: - - mail($recipient, $subject, $message); - - For a more robust email solution, see CodeIgniter's :doc:`Email Library - <../libraries/email>`. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 0fc211f89..9d0d0dc1e 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -655,14 +655,13 @@ Please use :php:func:`html_escape()` instead. Email helper functions ====================== -:doc:`Email Helper <../helpers/email_helper>` only has two functions +The *Email Helper* only has two functions: - - :php:func:`valid_email()` - - :php:func:`send_email()` + - ``valid_email()`` + - ``send_email()`` Both of them are now aliases for PHP's native ``filter_var()`` and ``mail()`` functions, respectively. -Therefore the :doc:`Email Helper <../helpers/email_helper>` altogether is being deprecated and -is scheduled for removal in CodeIgniter 3.1+. +Therefore, the *Email Helper* altogether is being deprecated and is scheduled for removal in CodeIgniter 3.1+. .. note:: These functions are still available, but you're strongly encouraged to remove their usage sooner rather than later. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index b8e990e3c..51b2a3693 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -136,3 +136,8 @@ version 3.0.0, that have been removed in 3.2.0: - ``CI_Router::fetch_class()`` (use ``CI_Router::$class`` instead) - ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead) - ``CI_Config::system_url()`` (encourages insecure practices) + +- The entire *Email Helper*, which only had two functions: + + - ``valid_email()`` (use ``filter_var($email, FILTER_VALIDATE_EMAIL)`` instead) + - ``send_email()`` (use ``mail()`` instead) -- cgit v1.2.3-24-g4f1b From bd3b4d158110634ec54d026f2852a649711edefc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:07:19 +0200 Subject: Remove tests broken by the func removals from last few commits --- tests/codeigniter/core/Config_test.php | 9 +-------- tests/codeigniter/helpers/email_helper_test.php | 24 ------------------------ 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 tests/codeigniter/helpers/email_helper_test.php diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php index b5c9e849d..5201d46dc 100644 --- a/tests/codeigniter/core/Config_test.php +++ b/tests/codeigniter/core/Config_test.php @@ -152,13 +152,6 @@ class Config_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_system_url() - { - $this->assertEquals($this->cfg['base_url'].'system/', $this->config->system_url()); - } - - // -------------------------------------------------------------------- - public function test_load() { // Test regular load @@ -237,4 +230,4 @@ class Config_test extends CI_TestCase { $this->assertNull($this->config->load($file)); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/helpers/email_helper_test.php b/tests/codeigniter/helpers/email_helper_test.php deleted file mode 100644 index 529e96910..000000000 --- a/tests/codeigniter/helpers/email_helper_test.php +++ /dev/null @@ -1,24 +0,0 @@ -helper('email'); - } - - public function test_valid_email() - { - $this->assertEquals(FALSE, valid_email('test')); - $this->assertEquals(FALSE, valid_email('test@test@test.com')); - $this->assertEquals(TRUE, valid_email('test@test.com')); - $this->assertEquals(TRUE, valid_email('my.test@test.com')); - $this->assertEquals(TRUE, valid_email('my.test@subdomain.test.com')); - } - - public function test_send_mail() - { - $this->markTestSkipped("Can't test"); - } - -} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From ecc9a5f2102d8221f9783fd77d8a4b7bb03a3e4a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:08:11 +0200 Subject: Remove previously deprecated Date Helper function standard_date() --- system/helpers/date_helper.php | 40 --------- tests/codeigniter/helpers/date_helper_test.php | 100 --------------------- user_guide_src/source/changelog.rst | 6 +- user_guide_src/source/helpers/date_helper.rst | 39 -------- user_guide_src/source/installation/upgrade_320.rst | 2 + 5 files changed, 5 insertions(+), 182 deletions(-) diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 0606a4562..1f8e319ca 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -122,46 +122,6 @@ if ( ! function_exists('mdate')) // ------------------------------------------------------------------------ -if ( ! function_exists('standard_date')) -{ - /** - * Standard Date - * - * Returns a date formatted according to the submitted standard. - * - * As of PHP 5.2, the DateTime extension provides constants that - * serve for the exact same purpose and are used with date(). - * - * @todo Remove in version 3.1+. - * @deprecated 3.0.0 Use PHP's native date() instead. - * @link http://www.php.net/manual/en/class.datetime.php#datetime.constants.types - * - * @example date(DATE_RFC822, now()); // default - * @example date(DATE_W3C, $time); // a different format and time - * - * @param string $fmt = 'DATE_RFC822' the chosen format - * @param int $time = NULL Unix timestamp - * @return string - */ - function standard_date($fmt = 'DATE_RFC822', $time = NULL) - { - if (empty($time)) - { - $time = now(); - } - - // Procedural style pre-defined constants from the DateTime extension - if (strpos($fmt, 'DATE_') !== 0 OR defined($fmt) === FALSE) - { - return FALSE; - } - - return date(constant($fmt), $time); - } -} - -// ------------------------------------------------------------------------ - if ( ! function_exists('timespan')) { /** diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php index 8a3502280..00139de5c 100644 --- a/tests/codeigniter/helpers/date_helper_test.php +++ b/tests/codeigniter/helpers/date_helper_test.php @@ -73,106 +73,6 @@ class Date_helper_test extends CI_TestCase { // ------------------------------------------------------------------------ - public function test_standard_date_rfc822() - { - $this->assertEquals( - date(DATE_RFC822, $this->time), - standard_date('DATE_RFC822', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_atom() - { - $this->assertEquals( - date(DATE_ATOM, $this->time), - standard_date('DATE_ATOM', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_cookie() - { - $this->assertEquals( - date(DATE_COOKIE, $this->time), - standard_date('DATE_COOKIE', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_iso8601() - { - $this->assertEquals( - date(DATE_ISO8601, $this->time), - standard_date('DATE_ISO8601', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_rfc850() - { - $this->assertEquals( - date(DATE_RFC850, $this->time), - standard_date('DATE_RFC850', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_rfc1036() - { - $this->assertEquals( - date(DATE_RFC1036, $this->time), - standard_date('DATE_RFC1036', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_rfc1123() - { - $this->assertEquals( - date(DATE_RFC1123, $this->time), - standard_date('DATE_RFC1123', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_rfc2822() - { - $this->assertEquals( - date(DATE_RFC2822, $this->time), - standard_date('DATE_RFC2822', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_rss() - { - $this->assertEquals( - date(DATE_RSS, $this->time), - standard_date('DATE_RSS', $this->time) - ); - } - - // ------------------------------------------------------------------------ - - public function test_standard_date_w3c() - { - $this->assertEquals( - date(DATE_W3C, $this->time), - standard_date('DATE_W3C', $this->time) - ); - } - - // ------------------------------------------------------------------------ - public function test_timespan() { $this->ci_vfs_clone('system/language/english/date_lang.php'); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d109c3b46..62c1ef0e1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). + - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries @@ -1115,7 +1116,7 @@ Bug fixes for 3.0 - Fixed a bug (#79) - :doc:`Form Validation Library ` didn't properly validate array fields that use associative keys or have custom indexes. - Fixed a bug (#427) - :doc:`Form Validation Library ` method ``strip_image_tags()`` was an alias to a non-existent method. - Fixed a bug (#1545) - :doc:`Query Builder ` method ``limit()`` wasn't executed properly under Oracle. -- Fixed a bug (#1551) - :doc:`Date Helper ` function :php:func:`standard_date()` didn't properly format *W3C* and *ATOM* standard dates. +- Fixed a bug (#1551) - :doc:`Date Helper ` function ``standard_date()`` didn't properly format *W3C* and *ATOM* standard dates. - Fixed a bug where :doc:`Query Builder ` method ``join()`` escaped literal values as if they were fields. - Fixed a bug (#135) - PHP Error logging was impossible without the errors being displayed. - Fixed a bug (#1613) - :doc:`Form Helper ` functions :php:func:`form_multiselect()`, :php:func:`form_dropdown()` didn't properly handle empty array option groups. @@ -3096,8 +3097,7 @@ Release Date: October 30, 2006 - Added :doc:`Download Helper <./helpers/download_helper>`. - Added :doc:`simple_query() <./database/queries>` function to the database classes -- Added :doc:`standard_date() <./helpers/date_helper>` function to - the Date Helper. +- Added ``standard_date()`` function function to the :doc:`Date Helper `. - Added :doc:`$query->free_result() <./database/results>` to database class. - Added :doc:`$query->list_fields() <./database/metadata>` function to diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 600a07574..909528855 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -67,45 +67,6 @@ The following functions are available: If a timestamp is not included in the second parameter the current time will be used. -.. php:function:: standard_date([$fmt = 'DATE_RFC822'[, $time = NULL]]) - - :param string $fmt: Date format - :param int $time: UNIX timestamp - :returns: Formatted date or FALSE on invalid format - :rtype: string - - Lets you generate a date string in one of several standardized formats. - - Example:: - - $format = 'DATE_RFC822'; - $time = time(); - echo standard_date($format, $time); - - .. note:: This function is DEPRECATED. Use the native ``date()`` combined with - `DateTime's format constants - `_ - instead:: - - echo date(DATE_RFC822, time()); - - **Supported formats:** - - =============== ======================= ====================================== - Constant Description Example - =============== ======================= ====================================== - DATE_ATOM Atom 2005-08-15T16:13:03+0000 - DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC - DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 - DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC - DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC - DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC - DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC - DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 - DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC - DATE_W3C W3C 2005-08-14T16:13:03+0000 - =============== ======================= ====================================== - .. php:function:: local_to_gmt([$time = '']) :param int $time: UNIX timestamp diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 51b2a3693..d6602e825 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -137,6 +137,8 @@ version 3.0.0, that have been removed in 3.2.0: - ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead) - ``CI_Config::system_url()`` (encourages insecure practices) +- ``standard_date()`` :doc:`Date Helper <../helpers/date_helper>` function (use ``date()`` instead) + - The entire *Email Helper*, which only had two functions: - ``valid_email()`` (use ``filter_var($email, FILTER_VALIDATE_EMAIL)`` instead) -- cgit v1.2.3-24-g4f1b From 0c84ef9a33d18d758e36447fd18a240a458ae2bc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:12:35 +0200 Subject: Remove previously deprecated Security Helper function do_hash() --- system/helpers/security_helper.php | 24 ------------------- tests/codeigniter/helpers/security_helper_test.php | 26 +-------------------- user_guide_src/source/changelog.rst | 9 ++++---- user_guide_src/source/helpers/security_helper.rst | 27 +--------------------- user_guide_src/source/installation/upgrade_320.rst | 1 + 5 files changed, 8 insertions(+), 79 deletions(-) diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 4eb63883d..048f06b68 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -80,30 +80,6 @@ if ( ! function_exists('sanitize_filename')) } } -// -------------------------------------------------------------------- - -if ( ! function_exists('do_hash')) -{ - /** - * Hash encode a string - * - * @todo Remove in version 3.1+. - * @deprecated 3.0.0 Use PHP's native hash() instead. - * @param string $str - * @param string $type = 'sha1' - * @return string - */ - function do_hash($str, $type = 'sha1') - { - if ( ! in_array(strtolower($type), hash_algos())) - { - $type = 'md5'; - } - - return hash($type, $str); - } -} - // ------------------------------------------------------------------------ if ( ! function_exists('strip_image_tags')) diff --git a/tests/codeigniter/helpers/security_helper_test.php b/tests/codeigniter/helpers/security_helper_test.php index effd3ec02..ab05d57ba 100644 --- a/tests/codeigniter/helpers/security_helper_test.php +++ b/tests/codeigniter/helpers/security_helper_test.php @@ -25,30 +25,6 @@ class Security_helper_tests extends CI_TestCase { $this->assertEquals('foo', sanitize_filename($filename)); } - function test_do_hash() - { - $md5 = md5('foo'); - $sha1 = sha1('foo'); - - $algos = hash_algos(); - $algo_results = array(); - foreach ($algos as $k => $v) - { - $algo_results[$v] = hash($v, 'foo'); - } - - $this->assertEquals($sha1, do_hash('foo')); - $this->assertEquals($sha1, do_hash('foo', 'sha1')); - $this->assertEquals($md5, do_hash('foo', 'md5')); - $this->assertEquals($md5, do_hash('foo', 'foobar')); - - // Test each algorithm available to PHP - foreach ($algo_results as $algo => $result) - { - $this->assertEquals($result, do_hash('foo', $algo)); - } - } - function test_strip_image_tags() { $this->assertEquals('http://example.com/spacer.gif', strip_image_tags('http://example.com/spacer.gif')); @@ -61,4 +37,4 @@ class Security_helper_tests extends CI_TestCase { $this->assertEquals('<? echo $foo; ?>', encode_php_tags('')); } -} \ No newline at end of file +} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 62c1ef0e1..ba11fe1c8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). + - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries @@ -551,7 +552,7 @@ Release Date: March 30, 2015 - :doc:`Security Helper ` changes include: - - :php:func:`do_hash()` now uses PHP's native ``hash()`` function (supporting more algorithms) and is deprecated. + - ``do_hash()`` now uses PHP's native ``hash()`` function (supporting more algorithms) and is deprecated. - :php:func:`strip_image_tags()` is now an alias for the same method in the :doc:`Security Library `. - :doc:`Smiley Helper ` changes include: @@ -1580,8 +1581,8 @@ Hg Tag: v2.0.2 - Helpers - - Removed the previously deprecated dohash() from the :doc:`Security - helper <./helpers/security_helper>`; use do_hash() instead. + - Removed the previously deprecated ``dohash()`` from the :doc:`Security + helper <./helpers/security_helper>`; use ``do_hash()`` instead. - Changed the 'plural' function so that it doesn't ruin the captalization of your string. It also take into consideration acronyms which are all caps. @@ -1823,7 +1824,7 @@ Hg Tag: v2.0.0 helper <./helpers/text_helper>`. - Added accept-charset to the list of inserted attributes of form_open() in the :doc:`Form Helper `. - - Deprecated the dohash() function in favour of do_hash() for + - Deprecated the ``dohash()`` function in favour of ``do_hash()`` for naming consistency. - Non-backwards compatible change made to get_dir_file_info() in the :doc:`File Helper `. No longer recurses diff --git a/user_guide_src/source/helpers/security_helper.rst b/user_guide_src/source/helpers/security_helper.rst index 103880cf9..e981bc6b6 100644 --- a/user_guide_src/source/helpers/security_helper.rst +++ b/user_guide_src/source/helpers/security_helper.rst @@ -48,31 +48,6 @@ The following functions are available: For more info, please see the :doc:`Security Library <../libraries/security>` documentation. - -.. php:function:: do_hash($str[, $type = 'sha1']) - - :param string $str: Input - :param string $type: Algorithm - :returns: Hex-formatted hash - :rtype: string - - Permits you to create one way hashes suitable for encrypting - passwords. Will use SHA1 by default. - - See `hash_algos() `_ - for a full list of supported algorithms. - - Examples:: - - $str = do_hash($str); // SHA1 - $str = do_hash($str, 'md5'); // MD5 - - .. note:: This function was formerly named ``dohash()``, which has been - removed in favor of ``do_hash()``. - - .. note:: This function is DEPRECATED. Use the native ``hash()`` instead. - - .. php:function:: strip_image_tags($str) :param string $str: Input string @@ -103,4 +78,4 @@ The following functions are available: Example:: - $string = encode_php_tags($string); \ No newline at end of file + $string = encode_php_tags($string); diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index d6602e825..080a02895 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -138,6 +138,7 @@ version 3.0.0, that have been removed in 3.2.0: - ``CI_Config::system_url()`` (encourages insecure practices) - ``standard_date()`` :doc:`Date Helper <../helpers/date_helper>` function (use ``date()`` instead) +- ``do_hash()`` :doc:`Security Helper <../helpers/security_helper>` function (use ``hash()`` instead) - The entire *Email Helper*, which only had two functions: -- cgit v1.2.3-24-g4f1b From 5e47aa3d87b44627bd79850536bfacd8d39a92a6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:18:46 +0200 Subject: Remove previously deprecated HTML helper functions br(), nbs() --- system/helpers/html_helper.php | 34 ------------------ tests/codeigniter/helpers/html_helper_test.php | 16 +-------- user_guide_src/source/changelog.rst | 3 +- user_guide_src/source/helpers/html_helper.rst | 40 ---------------------- user_guide_src/source/installation/upgrade_320.rst | 2 ++ 5 files changed, 5 insertions(+), 90 deletions(-) diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 696f0eee2..22ef39c2e 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -389,37 +389,3 @@ if ( ! function_exists('meta')) return $str; } } - -// ------------------------------------------------------------------------ - -if ( ! function_exists('br')) -{ - /** - * Generates HTML BR tags based on number supplied - * - * @deprecated 3.0.0 Use str_repeat() instead - * @param int $count Number of times to repeat the tag - * @return string - */ - function br($count = 1) - { - return str_repeat('
', $count); - } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('nbs')) -{ - /** - * Generates non-breaking space entities based on number supplied - * - * @deprecated 3.0.0 Use str_repeat() instead - * @param int - * @return string - */ - function nbs($num = 1) - { - return str_repeat(' ', $num); - } -} diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php index 029f3f4cd..5565e011b 100644 --- a/tests/codeigniter/helpers/html_helper_test.php +++ b/tests/codeigniter/helpers/html_helper_test.php @@ -9,13 +9,6 @@ class Html_helper_test extends CI_TestCase { // ------------------------------------------------------------------------ - public function test_br() - { - $this->assertEquals('

', br(2)); - } - - // ------------------------------------------------------------------------ - public function test_heading() { $this->assertEquals('

foobar

', heading('foobar')); @@ -72,13 +65,6 @@ EOH; // ------------------------------------------------------------------------ - public function test_NBS() - { - $this->assertEquals('   ', nbs(3)); - } - - // ------------------------------------------------------------------------ - public function test_meta() { $this->assertEquals( @@ -101,4 +87,4 @@ EOH; meta(array('name' => 'foo', 'type' => 'charset')) ); } -} \ No newline at end of file +} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ba11fe1c8..33f25db51 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). + - Removed previously deprecated :doc:`HTML Helper ` functions ``br()`` and ``nbs()`` (use PHP's native ``str_repeat()`` with ``'
'`` and ``' '`` respectively). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries @@ -3501,7 +3502,7 @@ Release Date: March 10, 2006 - Fixed a pagination problem in the scaffolding. - Fixed a bug in the mysql class "where" function. - Fixed a regex problem in some code that trimmed duplicate slashes. -- Fixed a bug in the br() function in the HTML helper +- Fixed a bug in the ``br()`` function in the HTML helper - Fixed a syntax mistake in the form_dropdown function in the Form Helper. - Removed the "style" attributes form the form helpers. diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index b4e56fdca..734b4465c 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -371,43 +371,3 @@ The following functions are available: XHTML+RDFa 1.0 xhtml-rdfa-1 XHTML+RDFa 1.1 xhtml-rdfa-2 =============================== =================== ================================================================================================================================================== - -.. php:function:: br([$count = 1]) - - :param int $count: Number of times to repeat the tag - :returns: HTML line break tag - :rtype: string - - Generates line break tags (
) based on the number you submit. - Example:: - - echo br(3); - - The above would produce: - - .. code-block:: html - -


- - .. note:: This function is DEPRECATED. Use the native ``str_repeat()`` - in combination with ``
`` instead. - -.. php:function:: nbs([$num = 1]) - - :param int $num: Number of space entities to produce - :returns: A sequence of non-breaking space HTML entities - :rtype: string - - Generates non-breaking spaces ( ) based on the number you submit. - Example:: - - echo nbs(3); - - The above would produce: - - .. code-block:: html - -     - - .. note:: This function is DEPRECATED. Use the native ``str_repeat()`` - in combination with `` `` instead. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 080a02895..a357e20ef 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -139,6 +139,8 @@ version 3.0.0, that have been removed in 3.2.0: - ``standard_date()`` :doc:`Date Helper <../helpers/date_helper>` function (use ``date()`` instead) - ``do_hash()`` :doc:`Security Helper <../helpers/security_helper>` function (use ``hash()`` instead) +- ``br()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``'
'`` instead) +- ``nbs()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``' '`` instead) - The entire *Email Helper*, which only had two functions: -- cgit v1.2.3-24-g4f1b From 41091ba2fd3005d4a387ee17bfd7520475028627 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:25:25 +0200 Subject: Remove previously deprecates String Helper functions trim_slashes(), repeater() --- system/helpers/string_helper.php | 47 ---------------------- tests/codeigniter/helpers/string_helper_test.php | 32 +-------------- user_guide_src/source/changelog.rst | 5 ++- user_guide_src/source/helpers/string_helper.rst | 37 +---------------- user_guide_src/source/installation/upgrade_300.rst | 4 +- user_guide_src/source/installation/upgrade_320.rst | 2 + 6 files changed, 9 insertions(+), 118 deletions(-) diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index db531fa9a..62b1a18e0 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -49,33 +49,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // ------------------------------------------------------------------------ -if ( ! function_exists('trim_slashes')) -{ - /** - * Trim Slashes - * - * Removes any leading/trailing slashes from a string: - * - * /this/that/theother/ - * - * becomes: - * - * this/that/theother - * - * @todo Remove in version 3.1+. - * @deprecated 3.0.0 This is just an alias for PHP's native trim() - * - * @param string - * @return string - */ - function trim_slashes($str) - { - return trim($str, '/'); - } -} - -// ------------------------------------------------------------------------ - if ( ! function_exists('strip_slashes')) { /** @@ -284,23 +257,3 @@ if ( ! function_exists('alternator')) return $args[($i++ % count($args))]; } } - -// ------------------------------------------------------------------------ - -if ( ! function_exists('repeater')) -{ - /** - * Repeater function - * - * @todo Remove in version 3.1+. - * @deprecated 3.0.0 This is just an alias for PHP's native str_repeat() - * - * @param string $data String to repeat - * @param int $num Number of repeats - * @return string - */ - function repeater($data, $num = 1) - { - return ($num > 0) ? str_repeat($data, $num) : ''; - } -} diff --git a/tests/codeigniter/helpers/string_helper_test.php b/tests/codeigniter/helpers/string_helper_test.php index 75701ec13..6de336b01 100644 --- a/tests/codeigniter/helpers/string_helper_test.php +++ b/tests/codeigniter/helpers/string_helper_test.php @@ -22,19 +22,6 @@ class String_helper_test extends CI_TestCase { $this->assertEquals($expected, strip_slashes($str)); } - public function test_trim_slashes() - { - $strs = array( - '//Slashes//\/' => 'Slashes//\\', - '/var/www/html/' => 'var/www/html' - ); - - foreach ($strs as $str => $expect) - { - $this->assertEquals($expect, trim_slashes($str)); - } - } - // -------------------------------------------------------------------- public function test_strip_quotes() @@ -108,23 +95,6 @@ class String_helper_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_repeater() - { - $strs = array( - 'a' => 'aaaaaaaaaa', - ' ' => '          ', - '
' => '









' - - ); - - foreach ($strs as $str => $expect) - { - $this->assertEquals($expect, repeater($str, 10)); - } - } - - // -------------------------------------------------------------------- - public function test_random_string() { $this->assertEquals(16, strlen(random_string('alnum', 16))); @@ -145,4 +115,4 @@ class String_helper_test extends CI_TestCase { $this->assertEquals(124, increment_string('123', '')); } -} \ No newline at end of file +} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 33f25db51..8be737b6f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). - Removed previously deprecated :doc:`HTML Helper ` functions ``br()`` and ``nbs()`` (use PHP's native ``str_repeat()`` with ``'
'`` and ``' '`` respectively). + - Removed previously deprecated :doc:`String Helper ` functions ``trim_slashes()`` and ``repeater()`` (use PHP's native ``trim()`` with ``'/'`` and ``str_repeat()`` respectively). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries @@ -2969,7 +2970,7 @@ Release Date: July 12, 2007 - Fixed various doc typos. - Documented two functions from the :doc:`String helper <./helpers/string_helper>` that were missing from the - user guide: trim_slashes() and reduce_double_slashes(). + user guide: ``trim_slashes()`` and ``reduce_double_slashes()``. - Docs now validate to XHTML 1 transitional - Updated the XSS Filtering to take into account the IE expression() ability and improved certain deletions to prevent possible exploits @@ -3000,7 +3001,7 @@ Release Date: April 15, 2007 - Added array to string into the profiler - Code Igniter references updated to CodeIgniter - pMachine references updated to EllisLab -- Fixed a bug in the repeater function of :doc:`string +- Fixed a bug in the ``repeater()`` function of :doc:`string helper <./helpers/string_helper>`. - Fixed a bug in ODBC driver - Fixed a bug in result_array() that was returning an empty array when diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index 53052557e..d697d824b 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -27,7 +27,6 @@ Available Functions The following functions are available: - .. php:function:: random_string([$type = 'alnum'[, $len = 8]]) :param string $type: Randomization type @@ -102,24 +101,6 @@ The following functions are available: .. note:: To use multiple separate calls to this function simply call the function with no arguments to re-initialize. -.. php:function:: repeater($data[, $num = 1]) - - :param string $data: Input - :param int $num: Number of times to repeat - :returns: Repeated string - :rtype: string - - Generates repeating copies of the data you submit. Example:: - - $string = "\n"; - echo repeater($string, 30); - - The above would generate 30 newlines. - - .. note:: This function is DEPRECATED. Use the native ``str_repeat()`` - instead. - - .. php:function:: reduce_double_slashes($str) :param string $str: Input string @@ -134,7 +115,6 @@ The following functions are available: $string = "http://example.com//index.php"; echo reduce_double_slashes($string); // results in "http://example.com/index.php" - .. php:function:: strip_slashes($data) :param mixed $data: Input string or an array of strings @@ -163,21 +143,6 @@ The following functions are available: and handle string inputs. This however makes it just an alias for ``stripslashes()``. -.. php:function:: trim_slashes($str) - - :param string $str: Input string - :returns: Slash-trimmed string - :rtype: string - - Removes any leading/trailing slashes from a string. Example:: - - $string = "/this/that/theother/"; - echo trim_slashes($string); // results in this/that/theother - - .. note:: This function is DEPRECATED. Use the native ``trim()`` instead: - | - | trim($str, '/'); - .. php:function:: reduce_multiples($str[, $character = ''[, $trim = FALSE]]) :param string $str: Text to search in @@ -220,4 +185,4 @@ The following functions are available: Removes single and double quotes from a string. Example:: $string = "Joe's \"dinner\""; - $string = strip_quotes($string); //results in "Joes dinner" \ No newline at end of file + $string = strip_quotes($string); //results in "Joes dinner" diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 9d0d0dc1e..c7c2b948a 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -624,7 +624,7 @@ CodeIgniter 3.1+. String helper repeater() ======================== -:doc:`String Helper <../helpers/string_helper>` function :php:func:`repeater()` is now just an alias for +:doc:`String Helper <../helpers/string_helper>` function ``repeater()`` is now just an alias for PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+. .. note:: This function is still available, but you're strongly encouraged to remove its usage sooner @@ -633,7 +633,7 @@ PHP's native ``str_repeat()`` function. It is deprecated and scheduled for remov String helper trim_slashes() ============================ -:doc:`String Helper <../helpers/string_helper>` function :php:func:`trim_slashes()` is now just an alias +:doc:`String Helper <../helpers/string_helper>` function ``trim_slashes()`` is now just an alias for PHP's native ``trim()`` function (with a slash passed as its second argument). It is deprecated and scheduled for removal in CodeIgniter 3.1+. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index a357e20ef..8a559c268 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -141,6 +141,8 @@ version 3.0.0, that have been removed in 3.2.0: - ``do_hash()`` :doc:`Security Helper <../helpers/security_helper>` function (use ``hash()`` instead) - ``br()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``'
'`` instead) - ``nbs()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``' '`` instead) +- ``trim_slashes()`` :doc:`String Helper <../helpers/string_helper>` function (use ``trim()`` with ``'/'`` instead) +- ``repeater()`` :doc:`String Helper <../helpers/string_helper>` function (use ``str_repeat()`` instead) - The entire *Email Helper*, which only had two functions: -- cgit v1.2.3-24-g4f1b From 172f949370bb1498789c7d897fdaa4073388ebd5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:28:41 +0200 Subject: Remove previously deprecated File Helper function read_file() --- system/helpers/file_helper.php | 20 ---------------- tests/codeigniter/helpers/file_helper_test.php | 15 +----------- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/helpers/file_helper.rst | 28 +--------------------- user_guide_src/source/installation/upgrade_320.rst | 1 + 5 files changed, 4 insertions(+), 61 deletions(-) diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 3cb36a551..484bf3228 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -49,26 +49,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // ------------------------------------------------------------------------ -if ( ! function_exists('read_file')) -{ - /** - * Read File - * - * Opens the file specified in the path and returns it as a string. - * - * @todo Remove in version 3.1+. - * @deprecated 3.0.0 It is now just an alias for PHP's native file_get_contents(). - * @param string $file Path to file - * @return string File contents - */ - function read_file($file) - { - return @file_get_contents($file); - } -} - -// ------------------------------------------------------------------------ - if ( ! function_exists('write_file')) { /** diff --git a/tests/codeigniter/helpers/file_helper_test.php b/tests/codeigniter/helpers/file_helper_test.php index c31817595..5ed8cb5c0 100644 --- a/tests/codeigniter/helpers/file_helper_test.php +++ b/tests/codeigniter/helpers/file_helper_test.php @@ -14,19 +14,6 @@ class File_helper_Test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_read_file() - { - $this->assertFalse(read_file('does_not_exist')); - - $content = 'Jack and Jill went up the mountain to fight a billy goat.'; - - $file = vfsStream::newFile('my_file.txt')->withContent($content)->at($this->_test_dir); - - $this->assertEquals($content, read_file(vfsStream::url('my_file.txt'))); - } - - // -------------------------------------------------------------------- - public function test_octal_permissions() { $content = 'Jack and Jill went up the mountain to fight a billy goat.'; @@ -144,4 +131,4 @@ class File_helper_Test extends CI_TestCase { $this->assertTrue(write_file(vfsStream::url('write.txt'), $content)); } -} \ No newline at end of file +} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8be737b6f..b6ef1db95 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). - Removed previously deprecated :doc:`HTML Helper ` functions ``br()`` and ``nbs()`` (use PHP's native ``str_repeat()`` with ``'
'`` and ``' '`` respectively). - Removed previously deprecated :doc:`String Helper ` functions ``trim_slashes()`` and ``repeater()`` (use PHP's native ``trim()`` with ``'/'`` and ``str_repeat()`` respectively). + - Removed previously deprecated :doc:`File Helper ` function ``read_file()`` (use PHP's native ``file_get_contents()`` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries diff --git a/user_guide_src/source/helpers/file_helper.rst b/user_guide_src/source/helpers/file_helper.rst index 833cddea4..dcf3a2340 100644 --- a/user_guide_src/source/helpers/file_helper.rst +++ b/user_guide_src/source/helpers/file_helper.rst @@ -23,32 +23,6 @@ Available Functions The following functions are available: - -.. php:function:: read_file($file) - - :param string $file: File path - :returns: File contents or FALSE on failure - :rtype: string - - Returns the data contained in the file specified in the path. - - Example:: - - $string = read_file('./path/to/file.php'); - - The path can be a relative or full server path. Returns FALSE (boolean) on failure. - - .. note:: The path is relative to your main site index.php file, NOT your - controller or view files. CodeIgniter uses a front controller so paths - are always relative to the main site index. - - .. note:: This function is DEPRECATED. Use the native ``file_get_contents()`` - instead. - - .. important:: If your server is running an **open_basedir** restriction this - function might not work if you are trying to access a file above the - calling script. - .. php:function:: write_file($path, $data[, $mode = 'wb']) :param string $path: File path @@ -199,4 +173,4 @@ The following functions are available: :: - echo octal_permissions(fileperms('./index.php')); // 644 \ No newline at end of file + echo octal_permissions(fileperms('./index.php')); // 644 diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 8a559c268..5cf2acd3b 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -143,6 +143,7 @@ version 3.0.0, that have been removed in 3.2.0: - ``nbs()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``' '`` instead) - ``trim_slashes()`` :doc:`String Helper <../helpers/string_helper>` function (use ``trim()`` with ``'/'`` instead) - ``repeater()`` :doc:`String Helper <../helpers/string_helper>` function (use ``str_repeat()`` instead) +- ``read_file()`` :doc:`File Helper <../helpers/file_helper>` function (use ``file_get_contents()`` instead) - The entire *Email Helper*, which only had two functions: -- cgit v1.2.3-24-g4f1b From 37c4cc599698da0634d620665491fc27e9a36beb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:33:42 +0200 Subject: Remove previously deprecated Form Helper function form_prep() --- system/helpers/form_helper.php | 19 ------------------- tests/codeigniter/helpers/form_helper_test.php | 16 ---------------- user_guide_src/source/changelog.rst | 9 +++++---- user_guide_src/source/helpers/form_helper.rst | 17 ----------------- user_guide_src/source/installation/upgrade_300.rst | 4 ++-- user_guide_src/source/installation/upgrade_320.rst | 1 + 6 files changed, 8 insertions(+), 58 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index aa7379f77..9756437ae 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -653,25 +653,6 @@ if ( ! function_exists('form_close')) // ------------------------------------------------------------------------ -if ( ! function_exists('form_prep')) -{ - /** - * Form Prep - * - * Formats text so that it can be safely placed in a form field in the event it has HTML tags. - * - * @deprecated 3.0.0 An alias for html_escape() - * @param string|string[] $str Value to escape - * @return string|string[] Escaped values - */ - function form_prep($str) - { - return html_escape($str, TRUE); - } -} - -// ------------------------------------------------------------------------ - if ( ! function_exists('set_value')) { /** diff --git a/tests/codeigniter/helpers/form_helper_test.php b/tests/codeigniter/helpers/form_helper_test.php index b5fe99b96..4ecfaa5f7 100644 --- a/tests/codeigniter/helpers/form_helper_test.php +++ b/tests/codeigniter/helpers/form_helper_test.php @@ -271,20 +271,4 @@ EOH; $this->assertEquals($expected, form_close('
')); } - - // ------------------------------------------------------------------------ - - public function test_form_prep() - { - $this->assertEquals( - 'Here is a string containing "quoted" text.', - form_prep('Here is a string containing "quoted" text.') - ); - - $this->assertEquals( - 'Here is a string containing a <tag>.', - form_prep('Here is a string containing a .', TRUE) - ); - } - } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b6ef1db95..2dcb0b1af 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`HTML Helper ` functions ``br()`` and ``nbs()`` (use PHP's native ``str_repeat()`` with ``'
'`` and ``' '`` respectively). - Removed previously deprecated :doc:`String Helper ` functions ``trim_slashes()`` and ``repeater()`` (use PHP's native ``trim()`` with ``'/'`` and ``str_repeat()`` respectively). - Removed previously deprecated :doc:`File Helper ` function ``read_file()`` (use PHP's native ``file_get_contents()`` instead). + - Removed previously deprecated :doc:`Form Helper ` function ``form_prep()`` (use :php:func:`html_escape()` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Libraries @@ -550,7 +551,7 @@ Release Date: March 30, 2015 - :doc:`Form Helper ` changes include: - :php:func:`form_dropdown()` will now also take an array for unity with other form helpers. - - :php:func:`form_prep()` is now DEPRECATED and only acts as an alias for :doc:`common function ` :php:func:`html_escape()`. + - ``form_prep()`` is now DEPRECATED and only acts as an alias for :doc:`common function ` :php:func:`html_escape()`. - :php:func:`set_value()` will now also accept a third argument, allowing to turn off HTML escaping of the value. - :doc:`Security Helper ` changes include: @@ -1994,7 +1995,7 @@ Hg Tag: v1.7.2 - Modified form_hidden() in the :doc:`Form helper ` to accept multi-dimensional arrays. - - Modified form_prep() in the :doc:`Form + - Modified ``form_prep()`` in the :doc:`Form helper ` to keep track of prepped fields to avoid multiple prep/mutation from subsequent calls which can occur when using Form Validation and form helper functions to @@ -2053,7 +2054,7 @@ Bug fixes for 1.7.2 - Fixed a case sensitive string replacement in xss_clean() - Fixed a bug in form_textarea() where form data was not prepped correctly. -- Fixed a bug in form_prep() causing it to not preserve entities in +- Fixed a bug in ``form_prep()`` causing it to not preserve entities in the user's original input when called back into a form element - Fixed a bug in _protect_identifiers() where the swap prefix ($swap_pre) was not being observed. @@ -3142,7 +3143,7 @@ Release Date: October 30, 2006 - Fixed a bug in the validation class. - Fixed a bug in the typography helper that was incorrectly wrapping block level elements in paragraph tags. -- Fixed a problem in the form_prep() function that was double encoding +- Fixed a problem in the ``form_prep()`` function that was double encoding entities. - Fixed a bug that affects some versions of PHP when output buffering is nested. diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index bc30a0e98..cf52cd523 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -724,20 +724,3 @@ The following functions are available: The "password" field doesn't match the "repeat_password" field! */ - -.. php:function:: form_prep($str) - - :param string $str: Value to escape - :returns: Escaped value - :rtype: string - - Allows you to safely use HTML and characters such as quotes within form - elements without breaking out of the form. - - .. note:: If you use any of the form helper functions listed in this page the form - values will be prepped automatically, so there is no need to call this - function. Use it only if you are creating your own form elements. - - .. note:: This function is DEPRECATED and is just an alias for - :doc:`common function <../general/common_functions>` - :func:`html_escape()` - please use that instead. diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index c7c2b948a..35f5621cd 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -643,8 +643,8 @@ scheduled for removal in CodeIgniter 3.1+. Form helper form_prep() ======================= -:doc:`Form Helper <../helpers/form_helper>` function :php:func:`form_prep()` -is now just an alias for :doc:`common function ` +:doc:`Form Helper <../helpers/form_helper>` function ``form_prep()`` is now +just an alias for :doc:`common function ` :func:`html_escape()`. It is deprecated and will be removed in the future. Please use :php:func:`html_escape()` instead. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 5cf2acd3b..6107d084b 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -144,6 +144,7 @@ version 3.0.0, that have been removed in 3.2.0: - ``trim_slashes()`` :doc:`String Helper <../helpers/string_helper>` function (use ``trim()`` with ``'/'`` instead) - ``repeater()`` :doc:`String Helper <../helpers/string_helper>` function (use ``str_repeat()`` instead) - ``read_file()`` :doc:`File Helper <../helpers/file_helper>` function (use ``file_get_contents()`` instead) +- ``form_prep()`` :doc:`Form Helper <../helpers/form_helper>` function (use :php:func:`html_escape()` instead) - The entire *Email Helper*, which only had two functions: -- cgit v1.2.3-24-g4f1b From fe58c1c633cdfc11efc22a4d9bd888fab4a2a15c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:40:01 +0200 Subject: Remove previously deprecated Javascript Library --- system/libraries/Javascript.php | 856 ---------------- system/libraries/Javascript/Jquery.php | 1076 -------------------- system/libraries/Javascript/index.html | 11 - user_guide_src/source/changelog.rst | 1 + user_guide_src/source/installation/upgrade_300.rst | 4 +- user_guide_src/source/installation/upgrade_320.rst | 2 + user_guide_src/source/libraries/javascript.rst | 322 ------ 7 files changed, 5 insertions(+), 2267 deletions(-) delete mode 100644 system/libraries/Javascript.php delete mode 100644 system/libraries/Javascript/Jquery.php delete mode 100644 system/libraries/Javascript/index.html delete mode 100644 user_guide_src/source/libraries/javascript.rst diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php deleted file mode 100644 index 2ddab38ee..000000000 --- a/system/libraries/Javascript.php +++ /dev/null @@ -1,856 +0,0 @@ - 'jquery', 'autoload' => TRUE); - - foreach ($defaults as $key => $val) - { - if (isset($params[$key]) && $params[$key] !== '') - { - $defaults[$key] = $params[$key]; - } - } - - extract($defaults); - - $this->CI =& get_instance(); - - // load the requested js library - $this->CI->load->library('Javascript/'.$js_library_driver, array('autoload' => $autoload)); - // make js to refer to current library - $this->js =& $this->CI->$js_library_driver; - - log_message('info', 'Javascript Class Initialized and loaded. Driver used: '.$js_library_driver); - } - - // -------------------------------------------------------------------- - // Event Code - // -------------------------------------------------------------------- - - /** - * Blur - * - * Outputs a javascript library blur event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function blur($element = 'this', $js = '') - { - return $this->js->_blur($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Change - * - * Outputs a javascript library change event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function change($element = 'this', $js = '') - { - return $this->js->_change($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Click - * - * Outputs a javascript library click event - * - * @param string The element to attach the event to - * @param string The code to execute - * @param bool whether or not to return false - * @return string - */ - public function click($element = 'this', $js = '', $ret_false = TRUE) - { - return $this->js->_click($element, $js, $ret_false); - } - - // -------------------------------------------------------------------- - - /** - * Double Click - * - * Outputs a javascript library dblclick event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function dblclick($element = 'this', $js = '') - { - return $this->js->_dblclick($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Error - * - * Outputs a javascript library error event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function error($element = 'this', $js = '') - { - return $this->js->_error($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Focus - * - * Outputs a javascript library focus event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function focus($element = 'this', $js = '') - { - return $this->js->_focus($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Hover - * - * Outputs a javascript library hover event - * - * @param string - element - * @param string - Javascript code for mouse over - * @param string - Javascript code for mouse out - * @return string - */ - public function hover($element = 'this', $over = '', $out = '') - { - return $this->js->_hover($element, $over, $out); - } - - // -------------------------------------------------------------------- - - /** - * Keydown - * - * Outputs a javascript library keydown event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function keydown($element = 'this', $js = '') - { - return $this->js->_keydown($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Keyup - * - * Outputs a javascript library keydown event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function keyup($element = 'this', $js = '') - { - return $this->js->_keyup($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Load - * - * Outputs a javascript library load event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function load($element = 'this', $js = '') - { - return $this->js->_load($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Mousedown - * - * Outputs a javascript library mousedown event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function mousedown($element = 'this', $js = '') - { - return $this->js->_mousedown($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Mouse Out - * - * Outputs a javascript library mouseout event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function mouseout($element = 'this', $js = '') - { - return $this->js->_mouseout($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Mouse Over - * - * Outputs a javascript library mouseover event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function mouseover($element = 'this', $js = '') - { - return $this->js->_mouseover($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Mouseup - * - * Outputs a javascript library mouseup event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function mouseup($element = 'this', $js = '') - { - return $this->js->_mouseup($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Output - * - * Outputs the called javascript to the screen - * - * @param string The code to output - * @return string - */ - public function output($js) - { - return $this->js->_output($js); - } - - // -------------------------------------------------------------------- - - /** - * Ready - * - * Outputs a javascript library mouseup event - * - * @param string $js Code to execute - * @return string - */ - public function ready($js) - { - return $this->js->_document_ready($js); - } - - // -------------------------------------------------------------------- - - /** - * Resize - * - * Outputs a javascript library resize event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function resize($element = 'this', $js = '') - { - return $this->js->_resize($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Scroll - * - * Outputs a javascript library scroll event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function scroll($element = 'this', $js = '') - { - return $this->js->_scroll($element, $js); - } - - // -------------------------------------------------------------------- - - /** - * Unload - * - * Outputs a javascript library unload event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - public function unload($element = 'this', $js = '') - { - return $this->js->_unload($element, $js); - } - - // -------------------------------------------------------------------- - // Effects - // -------------------------------------------------------------------- - - /** - * Add Class - * - * Outputs a javascript library addClass event - * - * @param string - element - * @param string - Class to add - * @return string - */ - public function addClass($element = 'this', $class = '') - { - return $this->js->_addClass($element, $class); - } - - // -------------------------------------------------------------------- - - /** - * Animate - * - * Outputs a javascript library animate event - * - * @param string $element = 'this' - * @param array $params = array() - * @param mixed $speed 'slow', 'normal', 'fast', or time in milliseconds - * @param string $extra - * @return string - */ - public function animate($element = 'this', $params = array(), $speed = '', $extra = '') - { - return $this->js->_animate($element, $params, $speed, $extra); - } - - // -------------------------------------------------------------------- - - /** - * Fade In - * - * Outputs a javascript library hide event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function fadeIn($element = 'this', $speed = '', $callback = '') - { - return $this->js->_fadeIn($element, $speed, $callback); - } - - // -------------------------------------------------------------------- - - /** - * Fade Out - * - * Outputs a javascript library hide event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function fadeOut($element = 'this', $speed = '', $callback = '') - { - return $this->js->_fadeOut($element, $speed, $callback); - } - // -------------------------------------------------------------------- - - /** - * Slide Up - * - * Outputs a javascript library slideUp event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function slideUp($element = 'this', $speed = '', $callback = '') - { - return $this->js->_slideUp($element, $speed, $callback); - - } - - // -------------------------------------------------------------------- - - /** - * Remove Class - * - * Outputs a javascript library removeClass event - * - * @param string - element - * @param string - Class to add - * @return string - */ - public function removeClass($element = 'this', $class = '') - { - return $this->js->_removeClass($element, $class); - } - - // -------------------------------------------------------------------- - - /** - * Slide Down - * - * Outputs a javascript library slideDown event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function slideDown($element = 'this', $speed = '', $callback = '') - { - return $this->js->_slideDown($element, $speed, $callback); - } - - // -------------------------------------------------------------------- - - /** - * Slide Toggle - * - * Outputs a javascript library slideToggle event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function slideToggle($element = 'this', $speed = '', $callback = '') - { - return $this->js->_slideToggle($element, $speed, $callback); - - } - - // -------------------------------------------------------------------- - - /** - * Hide - * - * Outputs a javascript library hide action - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function hide($element = 'this', $speed = '', $callback = '') - { - return $this->js->_hide($element, $speed, $callback); - } - - // -------------------------------------------------------------------- - - /** - * Toggle - * - * Outputs a javascript library toggle event - * - * @param string - element - * @return string - */ - public function toggle($element = 'this') - { - return $this->js->_toggle($element); - - } - - // -------------------------------------------------------------------- - - /** - * Toggle Class - * - * Outputs a javascript library toggle class event - * - * @param string $element = 'this' - * @param string $class = '' - * @return string - */ - public function toggleClass($element = 'this', $class = '') - { - return $this->js->_toggleClass($element, $class); - } - - // -------------------------------------------------------------------- - - /** - * Show - * - * Outputs a javascript library show event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function show($element = 'this', $speed = '', $callback = '') - { - return $this->js->_show($element, $speed, $callback); - } - - // -------------------------------------------------------------------- - - /** - * Compile - * - * gather together all script needing to be output - * - * @param string $view_var - * @param bool $script_tags - * @return string - */ - public function compile($view_var = 'script_foot', $script_tags = TRUE) - { - $this->js->_compile($view_var, $script_tags); - } - - // -------------------------------------------------------------------- - - /** - * Clear Compile - * - * Clears any previous javascript collected for output - * - * @return void - */ - public function clear_compile() - { - $this->js->_clear_compile(); - } - - // -------------------------------------------------------------------- - - /** - * External - * - * Outputs a - * - * @param string - * @return string - */ - protected function _close_script($extra = "\n") - { - return ''.$extra; - } - - // -------------------------------------------------------------------- - // AJAX-Y STUFF - still a testbed - // -------------------------------------------------------------------- - - /** - * Update - * - * Outputs a javascript library slideDown event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - public function update($element = 'this', $speed = '', $callback = '') - { - return $this->js->_updater($element, $speed, $callback); - } - - // -------------------------------------------------------------------- - - /** - * Generate JSON - * - * Can be passed a database result or associative array and returns a JSON formatted string - * - * @param mixed result set or array - * @param bool match array types (defaults to objects) - * @return string a json formatted string - */ - public function generate_json($result = NULL, $match_array_type = FALSE) - { - // JSON data can optionally be passed to this function - // either as a database result object or an array, or a user supplied array - if ($result !== NULL) - { - if (is_object($result)) - { - $json_result = is_callable(array($result, 'result_array')) ? $result->result_array() : (array) $result; - } - elseif (is_array($result)) - { - $json_result = $result; - } - else - { - return $this->_prep_args($result); - } - } - else - { - return 'null'; - } - - $json = array(); - $_is_assoc = TRUE; - - if ( ! is_array($json_result) && empty($json_result)) - { - show_error('Generate JSON Failed - Illegal key, value pair.'); - } - elseif ($match_array_type) - { - $_is_assoc = $this->_is_associative_array($json_result); - } - - foreach ($json_result as $k => $v) - { - if ($_is_assoc) - { - $json[] = $this->_prep_args($k, TRUE).':'.$this->generate_json($v, $match_array_type); - } - else - { - $json[] = $this->generate_json($v, $match_array_type); - } - } - - $json = implode(',', $json); - - return $_is_assoc ? '{'.$json.'}' : '['.$json.']'; - - } - - // -------------------------------------------------------------------- - - /** - * Is associative array - * - * Checks for an associative array - * - * @param array - * @return bool - */ - protected function _is_associative_array($arr) - { - foreach (array_keys($arr) as $key => $val) - { - if ($key !== $val) - { - return TRUE; - } - } - - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Prep Args - * - * Ensures a standard json value and escapes values - * - * @param mixed $result - * @param bool $is_key = FALSE - * @return string - */ - protected function _prep_args($result, $is_key = FALSE) - { - if ($result === NULL) - { - return 'null'; - } - elseif (is_bool($result)) - { - return ($result === TRUE) ? 'true' : 'false'; - } - elseif (is_string($result) OR $is_key) - { - return '"'.str_replace(array('\\', "\t", "\n", "\r", '"', '/'), array('\\\\', '\\t', '\\n', "\\r", '\"', '\/'), $result).'"'; - } - elseif (is_scalar($result)) - { - return $result; - } - } - -} diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php deleted file mode 100644 index 9df1be1c1..000000000 --- a/system/libraries/Javascript/Jquery.php +++ /dev/null @@ -1,1076 +0,0 @@ -CI =& get_instance(); - extract($params); - - if ($autoload === TRUE) - { - $this->script(); - } - - log_message('info', 'Jquery Class Initialized'); - } - - // -------------------------------------------------------------------- - // Event Code - // -------------------------------------------------------------------- - - /** - * Blur - * - * Outputs a jQuery blur event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _blur($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'blur'); - } - - // -------------------------------------------------------------------- - - /** - * Change - * - * Outputs a jQuery change event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _change($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'change'); - } - - // -------------------------------------------------------------------- - - /** - * Click - * - * Outputs a jQuery click event - * - * @param string The element to attach the event to - * @param string The code to execute - * @param bool whether or not to return false - * @return string - */ - protected function _click($element = 'this', $js = '', $ret_false = TRUE) - { - is_array($js) OR $js = array($js); - - if ($ret_false) - { - $js[] = 'return false;'; - } - - return $this->_add_event($element, $js, 'click'); - } - - // -------------------------------------------------------------------- - - /** - * Double Click - * - * Outputs a jQuery dblclick event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _dblclick($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'dblclick'); - } - - // -------------------------------------------------------------------- - - /** - * Error - * - * Outputs a jQuery error event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _error($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'error'); - } - - // -------------------------------------------------------------------- - - /** - * Focus - * - * Outputs a jQuery focus event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _focus($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'focus'); - } - - // -------------------------------------------------------------------- - - /** - * Hover - * - * Outputs a jQuery hover event - * - * @param string - element - * @param string - Javascript code for mouse over - * @param string - Javascript code for mouse out - * @return string - */ - protected function _hover($element = 'this', $over = '', $out = '') - { - $event = "\n\t$(".$this->_prep_element($element).").hover(\n\t\tfunction()\n\t\t{\n\t\t\t{$over}\n\t\t}, \n\t\tfunction()\n\t\t{\n\t\t\t{$out}\n\t\t});\n"; - - $this->jquery_code_for_compile[] = $event; - - return $event; - } - - // -------------------------------------------------------------------- - - /** - * Keydown - * - * Outputs a jQuery keydown event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _keydown($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'keydown'); - } - - // -------------------------------------------------------------------- - - /** - * Keyup - * - * Outputs a jQuery keydown event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _keyup($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'keyup'); - } - - // -------------------------------------------------------------------- - - /** - * Load - * - * Outputs a jQuery load event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _load($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'load'); - } - - // -------------------------------------------------------------------- - - /** - * Mousedown - * - * Outputs a jQuery mousedown event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _mousedown($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'mousedown'); - } - - // -------------------------------------------------------------------- - - /** - * Mouse Out - * - * Outputs a jQuery mouseout event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _mouseout($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'mouseout'); - } - - // -------------------------------------------------------------------- - - /** - * Mouse Over - * - * Outputs a jQuery mouseover event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _mouseover($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'mouseover'); - } - - // -------------------------------------------------------------------- - - /** - * Mouseup - * - * Outputs a jQuery mouseup event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _mouseup($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'mouseup'); - } - - // -------------------------------------------------------------------- - - /** - * Output - * - * Outputs script directly - * - * @param array $array_js = array() - * @return void - */ - protected function _output($array_js = array()) - { - if ( ! is_array($array_js)) - { - $array_js = array($array_js); - } - - foreach ($array_js as $js) - { - $this->jquery_code_for_compile[] = "\t".$js."\n"; - } - } - - // -------------------------------------------------------------------- - - /** - * Resize - * - * Outputs a jQuery resize event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _resize($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'resize'); - } - - // -------------------------------------------------------------------- - - /** - * Scroll - * - * Outputs a jQuery scroll event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _scroll($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'scroll'); - } - - // -------------------------------------------------------------------- - - /** - * Unload - * - * Outputs a jQuery unload event - * - * @param string The element to attach the event to - * @param string The code to execute - * @return string - */ - protected function _unload($element = 'this', $js = '') - { - return $this->_add_event($element, $js, 'unload'); - } - - // -------------------------------------------------------------------- - // Effects - // -------------------------------------------------------------------- - - /** - * Add Class - * - * Outputs a jQuery addClass event - * - * @param string $element - * @param string $class - * @return string - */ - protected function _addClass($element = 'this', $class = '') - { - $element = $this->_prep_element($element); - return '$('.$element.').addClass("'.$class.'");'; - } - - // -------------------------------------------------------------------- - - /** - * Animate - * - * Outputs a jQuery animate event - * - * @param string $element - * @param array $params - * @param string $speed 'slow', 'normal', 'fast', or time in milliseconds - * @param string $extra - * @return string - */ - protected function _animate($element = 'this', $params = array(), $speed = '', $extra = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - $animations = "\t\t\t"; - - foreach ($params as $param => $value) - { - $animations .= $param.": '".$value."', "; - } - - $animations = substr($animations, 0, -2); // remove the last ", " - - if ($speed !== '') - { - $speed = ', '.$speed; - } - - if ($extra !== '') - { - $extra = ', '.$extra; - } - - return "$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.');'; - } - - // -------------------------------------------------------------------- - - /** - * Fade In - * - * Outputs a jQuery hide event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _fadeIn($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return "$({$element}).fadeIn({$speed}{$callback});"; - } - - // -------------------------------------------------------------------- - - /** - * Fade Out - * - * Outputs a jQuery hide event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _fadeOut($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return '$('.$element.').fadeOut('.$speed.$callback.');'; - } - - // -------------------------------------------------------------------- - - /** - * Hide - * - * Outputs a jQuery hide action - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _hide($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return "$({$element}).hide({$speed}{$callback});"; - } - - // -------------------------------------------------------------------- - - /** - * Remove Class - * - * Outputs a jQuery remove class event - * - * @param string $element - * @param string $class - * @return string - */ - protected function _removeClass($element = 'this', $class = '') - { - $element = $this->_prep_element($element); - return '$('.$element.').removeClass("'.$class.'");'; - } - - // -------------------------------------------------------------------- - - /** - * Slide Up - * - * Outputs a jQuery slideUp event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _slideUp($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return '$('.$element.').slideUp('.$speed.$callback.');'; - } - - // -------------------------------------------------------------------- - - /** - * Slide Down - * - * Outputs a jQuery slideDown event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _slideDown($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return '$('.$element.').slideDown('.$speed.$callback.');'; - } - - // -------------------------------------------------------------------- - - /** - * Slide Toggle - * - * Outputs a jQuery slideToggle event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _slideToggle($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return '$('.$element.').slideToggle('.$speed.$callback.');'; - } - - // -------------------------------------------------------------------- - - /** - * Toggle - * - * Outputs a jQuery toggle event - * - * @param string - element - * @return string - */ - protected function _toggle($element = 'this') - { - $element = $this->_prep_element($element); - return '$('.$element.').toggle();'; - } - - // -------------------------------------------------------------------- - - /** - * Toggle Class - * - * Outputs a jQuery toggle class event - * - * @param string $element - * @param string $class - * @return string - */ - protected function _toggleClass($element = 'this', $class = '') - { - $element = $this->_prep_element($element); - return '$('.$element.').toggleClass("'.$class.'");'; - } - - // -------------------------------------------------------------------- - - /** - * Show - * - * Outputs a jQuery show event - * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function - * @return string - */ - protected function _show($element = 'this', $speed = '', $callback = '') - { - $element = $this->_prep_element($element); - $speed = $this->_validate_speed($speed); - - if ($callback !== '') - { - $callback = ", function(){\n{$callback}\n}"; - } - - return '$('.$element.').show('.$speed.$callback.');'; - } - - // -------------------------------------------------------------------- - - /** - * Updater - * - * An Ajax call that populates the designated DOM node with - * returned content - * - * @param string The element to attach the event to - * @param string the controller to run the call against - * @param string optional parameters - * @return string - */ - - protected function _updater($container = 'this', $controller = '', $options = '') - { - $container = $this->_prep_element($container); - $controller = (strpos('://', $controller) === FALSE) ? $controller : $this->CI->config->site_url($controller); - - // ajaxStart and ajaxStop are better choices here... but this is a stop gap - if ($this->CI->config->item('javascript_ajax_img') === '') - { - $loading_notifier = 'Loading...'; - } - else - { - $loading_notifier = 'Loading'; - } - - $updater = '$('.$container.").empty();\n" // anything that was in... get it out - ."\t\t$(".$container.').prepend("'.$loading_notifier."\");\n"; // to replace with an image - - $request_options = ''; - if ($options !== '') - { - $request_options .= ', {' - .(is_array($options) ? "'".implode("', '", $options)."'" : "'".str_replace(':', "':'", $options)."'") - .'}'; - } - - return $updater."\t\t$($container).load('$controller'$request_options);"; - } - - // -------------------------------------------------------------------- - // Pre-written handy stuff - // -------------------------------------------------------------------- - - /** - * Zebra tables - * - * @param string $class - * @param string $odd - * @param string $hover - * @return string - */ - protected function _zebraTables($class = '', $odd = 'odd', $hover = '') - { - $class = ($class !== '') ? '.'.$class : ''; - $zebra = "\t\$(\"table{$class} tbody tr:nth-child(even)\").addClass(\"{$odd}\");"; - - $this->jquery_code_for_compile[] = $zebra; - - if ($hover !== '') - { - $hover = $this->hover("table{$class} tbody tr", "$(this).addClass('hover');", "$(this).removeClass('hover');"); - } - - return $zebra; - } - - // -------------------------------------------------------------------- - // Plugins - // -------------------------------------------------------------------- - - /** - * Corner Plugin - * - * @link http://www.malsup.com/jquery/corner/ - * @param string $element - * @param string $corner_style - * @return string - */ - public function corner($element = '', $corner_style = '') - { - // may want to make this configurable down the road - $corner_location = '/plugins/jquery.corner.js'; - - if ($corner_style !== '') - { - $corner_style = '"'.$corner_style.'"'; - } - - return '$('.$this->_prep_element($element).').corner('.$corner_style.');'; - } - - // -------------------------------------------------------------------- - - /** - * Modal window - * - * Load a thickbox modal window - * - * @param string $src - * @param bool $relative - * @return void - */ - public function modal($src, $relative = FALSE) - { - $this->jquery_code_for_load[] = $this->external($src, $relative); - } - - // -------------------------------------------------------------------- - - /** - * Effect - * - * Load an Effect library - * - * @param string $src - * @param bool $relative - * @return void - */ - public function effect($src, $relative = FALSE) - { - $this->jquery_code_for_load[] = $this->external($src, $relative); - } - - // -------------------------------------------------------------------- - - /** - * Plugin - * - * Load a plugin library - * - * @param string $src - * @param bool $relative - * @return void - */ - public function plugin($src, $relative = FALSE) - { - $this->jquery_code_for_load[] = $this->external($src, $relative); - } - - // -------------------------------------------------------------------- - - /** - * UI - * - * Load a user interface library - * - * @param string $src - * @param bool $relative - * @return void - */ - public function ui($src, $relative = FALSE) - { - $this->jquery_code_for_load[] = $this->external($src, $relative); - } - - // -------------------------------------------------------------------- - - /** - * Sortable - * - * Creates a jQuery sortable - * - * @param string $element - * @param array $options - * @return string - */ - public function sortable($element, $options = array()) - { - if (count($options) > 0) - { - $sort_options = array(); - foreach ($options as $k=>$v) - { - $sort_options[] = "\n\t\t".$k.': '.$v; - } - $sort_options = implode(',', $sort_options); - } - else - { - $sort_options = ''; - } - - return '$('.$this->_prep_element($element).').sortable({'.$sort_options."\n\t});"; - } - - // -------------------------------------------------------------------- - - /** - * Table Sorter Plugin - * - * @param string table name - * @param string plugin location - * @return string - */ - public function tablesorter($table = '', $options = '') - { - $this->jquery_code_for_compile[] = "\t$(".$this->_prep_element($table).').tablesorter('.$options.");\n"; - } - - // -------------------------------------------------------------------- - // Class functions - // -------------------------------------------------------------------- - - /** - * Add Event - * - * Constructs the syntax for an event, and adds to into the array for compilation - * - * @param string The element to attach the event to - * @param string The code to execute - * @param string The event to pass - * @return string - */ - protected function _add_event($element, $js, $event) - { - if (is_array($js)) - { - $js = implode("\n\t\t", $js); - } - - $event = "\n\t$(".$this->_prep_element($element).').'.$event."(function(){\n\t\t{$js}\n\t});\n"; - $this->jquery_code_for_compile[] = $event; - return $event; - } - - // -------------------------------------------------------------------- - - /** - * Compile - * - * As events are specified, they are stored in an array - * This function compiles them all for output on a page - * - * @param string $view_var - * @param bool $script_tags - * @return void - */ - protected function _compile($view_var = 'script_foot', $script_tags = TRUE) - { - // External references - $external_scripts = implode('', $this->jquery_code_for_load); - $this->CI->load->vars(array('library_src' => $external_scripts)); - - if (count($this->jquery_code_for_compile) === 0) - { - // no inline references, let's just return - return; - } - - // Inline references - $script = '$(document).ready(function() {'."\n" - .implode('', $this->jquery_code_for_compile) - .'});'; - - $output = ($script_tags === FALSE) ? $script : $this->inline($script); - - $this->CI->load->vars(array($view_var => $output)); - } - - // -------------------------------------------------------------------- - - /** - * Clear Compile - * - * Clears the array of script events collected for output - * - * @return void - */ - protected function _clear_compile() - { - $this->jquery_code_for_compile = array(); - } - - // -------------------------------------------------------------------- - - /** - * Document Ready - * - * A wrapper for writing document.ready() - * - * @param array $js - * @return void - */ - protected function _document_ready($js) - { - is_array($js) OR $js = array($js); - - foreach ($js as $script) - { - $this->jquery_code_for_compile[] = $script; - } - } - - // -------------------------------------------------------------------- - - /** - * Script Tag - * - * Outputs the script tag that loads the jquery.js file into an HTML document - * - * @param string $library_src - * @param bool $relative - * @return string - */ - public function script($library_src = '', $relative = FALSE) - { - $library_src = $this->external($library_src, $relative); - $this->jquery_code_for_load[] = $library_src; - return $library_src; - } - - // -------------------------------------------------------------------- - - /** - * Prep Element - * - * Puts HTML element in quotes for use in jQuery code - * unless the supplied element is the Javascript 'this' - * object, in which case no quotes are added - * - * @param string - * @return string - */ - protected function _prep_element($element) - { - if ($element !== 'this') - { - $element = '"'.$element.'"'; - } - - return $element; - } - - // -------------------------------------------------------------------- - - /** - * Validate Speed - * - * Ensures the speed parameter is valid for jQuery - * - * @param string - * @return string - */ - protected function _validate_speed($speed) - { - if (in_array($speed, array('slow', 'normal', 'fast'))) - { - return '"'.$speed.'"'; - } - elseif (preg_match('/[^0-9]/', $speed)) - { - return ''; - } - - return $speed; - } - -} diff --git a/system/libraries/Javascript/index.html b/system/libraries/Javascript/index.html deleted file mode 100644 index b702fbc39..000000000 --- a/system/libraries/Javascript/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2dcb0b1af..f6d39cbfe 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -20,6 +20,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`File Helper ` function ``read_file()`` (use PHP's native ``file_get_contents()`` instead). - Removed previously deprecated :doc:`Form Helper ` function ``form_prep()`` (use :php:func:`html_escape()` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). + - Removed previously deprecated *Javascript Library* (it was always experimental in the first place). - Libraries diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 35f5621cd..f00a69512 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -844,8 +844,8 @@ CodeIgniter 3.1+. The Javascript library ====================== -The :doc:`Javascript Library <../libraries/javascript>` has always had an -'experimental' status and was never really useful, nor a proper solution. +The *Javascript Library* has always had an 'experimental' status and was +never really useful, nor a proper solution. It is now deprecated and scheduled for removal in CodeIgniter 3.1+. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 6107d084b..2bc4e53d3 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -146,6 +146,8 @@ version 3.0.0, that have been removed in 3.2.0: - ``read_file()`` :doc:`File Helper <../helpers/file_helper>` function (use ``file_get_contents()`` instead) - ``form_prep()`` :doc:`Form Helper <../helpers/form_helper>` function (use :php:func:`html_escape()` instead) +- The entire *Javascript Library* (it was always experimental in the first place) + - The entire *Email Helper*, which only had two functions: - ``valid_email()`` (use ``filter_var($email, FILTER_VALIDATE_EMAIL)`` instead) diff --git a/user_guide_src/source/libraries/javascript.rst b/user_guide_src/source/libraries/javascript.rst deleted file mode 100644 index e91b9ad78..000000000 --- a/user_guide_src/source/libraries/javascript.rst +++ /dev/null @@ -1,322 +0,0 @@ -################ -Javascript Class -################ - -CodeIgniter provides a library to help you with certain common functions -that you may want to use with Javascript. Please note that CodeIgniter -does not require the jQuery library to run, and that any scripting -library will work equally well. The jQuery library is simply presented -as a convenience if you choose to use it. - -.. important:: This library is DEPRECATED and should not be used. It has always - been with an 'experimental' status and is now no longer supported. - Currently only kept for backwards compatibility. - -.. contents:: - :local: - -.. raw:: html - -
- -************************** -Using the Javascript Class -************************** - -Initializing the Class -====================== - -To initialize the Javascript class manually in your controller -constructor, use the ``$this->load->library()`` method. Currently, -the only available library is jQuery, which will automatically be -loaded like this:: - - $this->load->library('javascript'); - -The Javascript class also accepts parameters: - -- js_library_driver (string) *default: 'jquery'* -- autoload (bool) *default: TRUE* - -You may override the defaults by sending an associative array:: - - $this->load->library( - 'javascript', - array( - 'js_library_driver' => 'scripto', - 'autoload' => FALSE - ) - ); - -Again, presently only 'jquery' is available. You may wish to set -autoload to FALSE, though, if you do not want the jQuery library to -automatically include a script tag for the main jQuery script file. This -is useful if you are loading it from a location outside of CodeIgniter, -or already have the script tag in your markup. - -Once loaded, the jQuery library object will be available using: - - $this->javascript - -Setup and Configuration -======================= - -Set these variables in your view --------------------------------- - -As a Javascript library, your files must be available to your -application. - -As Javascript is a client side language, the library must be able to -write content into your final output. This generally means a view. -You'll need to include the following variables in the ```` -sections of your output. - -:: - - - - - -``$library_src``, is where the actual library file will be loaded, as -well as any subsequent plugin script calls; $script_head is where -specific events, functions and other commands will be rendered. - -Set the path to the librarys with config items ----------------------------------------------- - -There are some configuration items in Javascript library. These can -either be set in *application/config.php*, within its own -*config/javascript.php* file, or within any controller usings the -``set_item()`` function. - -An image to be used as an "ajax loader", or progress indicator. Without -one, the simple text message of "loading" will appear when Ajax calls -need to be made. - -:: - - $config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/'; - $config['javascript_ajax_img'] = 'images/ajax-loader.gif'; - -If you keep your files in the same directories they were downloaded -from, then you need not set this configuration items. - -The jQuery Class -================ - -To initialize the jQuery class manually in your controller constructor, -use the ``$this->load->library()`` method:: - - $this->load->library('javascript/jquery'); - -You may send an optional parameter to determine whether or not a script -tag for the main jQuery file will be automatically included when loading -the library. It will be created by default. To prevent this, load the -library as follows:: - - $this->load->library('javascript/jquery', FALSE); - -Once loaded, the jQuery library object will be available using: - - $this->jquery - -jQuery Events -============= - -Events are set using the following syntax. -:: - - $this->jquery->event('element_path', code_to_run()); - -In the above example: - -- "event" is any of blur, change, click, dblclick, error, focus, hover, - keydown, keyup, load, mousedown, mouseup, mouseover, mouseup, resize, - scroll, or unload. -- "element_path" is any valid `jQuery selector - `_. Due to jQuery's unique - selector syntax, this is usually an element id, or CSS selector. For - example "#notice_area" would effect ``
``, and - "#content a.notice" would effect all anchors with a class of "notice" - in the div with id "content". -- "``code_to_run()``" is script your write yourself, or an action such as - an effect from the jQuery library below. - -Effects -======= - -The query library supports a powerful -`Effects `_ repertoire. Before an effect -can be used, it must be loaded:: - - $this->jquery->effect([optional path] plugin name); // for example $this->jquery->effect('bounce'); - - -hide() / show() ---------------- - -Each of this functions will affect the visibility of an item on your -page. hide() will set an item invisible, show() will reveal it. - -:: - - $this->jquery->hide(target, optional speed, optional extra information); - $this->jquery->show(target, optional speed, optional extra information); - - -- "target" will be any valid jQuery selector or selectors. -- "speed" is optional, and is set to either slow, normal, fast, or - alternatively a number of milliseconds. -- "extra information" is optional, and could include a callback, or - other additional information. - -toggle() --------- - -toggle() will change the visibility of an item to the opposite of its -current state, hiding visible elements, and revealing hidden ones. - -:: - - $this->jquery->toggle(target); - - -- "target" will be any valid jQuery selector or selectors. - -animate() ---------- - -:: - - $this->jquery->animate(target, parameters, optional speed, optional extra information); - - -- "target" will be any valid jQuery selector or selectors. -- "parameters" in jQuery would generally include a series of CSS - properties that you wish to change. -- "speed" is optional, and is set to either slow, normal, fast, or - alternatively a number of milliseconds. -- "extra information" is optional, and could include a callback, or - other additional information. - -For a full summary, see -`http://api.jquery.com/animate/ `_ - -Here is an example of an animate() called on a div with an id of "note", -and triggered by a click using the jQuery library's click() event. - -:: - - $params = array( - 'height' => 80, - 'width' => '50%', - 'marginLeft' => 125 - ); - $this->jquery->click('#trigger', $this->jquery->animate('#note', $params, 'normal')); - -fadeIn() / fadeOut() --------------------- - -:: - - $this->jquery->fadeIn(target, optional speed, optional extra information); - $this->jquery->fadeOut(target, optional speed, optional extra information); - - -- "target" will be any valid jQuery selector or selectors. -- "speed" is optional, and is set to either slow, normal, fast, or - alternatively a number of milliseconds. -- "extra information" is optional, and could include a callback, or - other additional information. - -toggleClass() -------------- - -This function will add or remove a CSS class to its target. - -:: - - $this->jquery->toggleClass(target, class) - - -- "target" will be any valid jQuery selector or selectors. -- "class" is any CSS classname. Note that this class must be defined - and available in a CSS that is already loaded. - -fadeIn() / fadeOut() --------------------- - -These effects cause an element(s) to disappear or reappear over time. - -:: - - $this->jquery->fadeIn(target, optional speed, optional extra information); - $this->jquery->fadeOut(target, optional speed, optional extra information); - - -- "target" will be any valid jQuery selector or selectors. -- "speed" is optional, and is set to either slow, normal, fast, or - alternatively a number of milliseconds. -- "extra information" is optional, and could include a callback, or - other additional information. - -slideUp() / slideDown() / slideToggle() ---------------------------------------- - -These effects cause an element(s) to slide. - -:: - - $this->jquery->slideUp(target, optional speed, optional extra information); - $this->jquery->slideDown(target, optional speed, optional extra information); - $this->jquery->slideToggle(target, optional speed, optional extra information); - - -- "target" will be any valid jQuery selector or selectors. -- "speed" is optional, and is set to either slow, normal, fast, or - alternatively a number of milliseconds. -- "extra information" is optional, and could include a callback, or - other additional information. - -Plugins -======= - -Some select jQuery plugins are made available using this library. - -corner() --------- - -Used to add distinct corners to page elements. For full details see -`http://malsup.com/jquery/corner/ `_ - -:: - - $this->jquery->corner(target, corner_style); - - -- "target" will be any valid jQuery selector or selectors. -- "corner_style" is optional, and can be set to any valid style such - as round, sharp, bevel, bite, dog, etc. Individual corners can be set - by following the style with a space and using "tl" (top left), "tr" - (top right), "bl" (bottom left), or "br" (bottom right). - -:: - - $this->jquery->corner("#note", "cool tl br"); - - -tablesorter() -------------- - -description to come - -modal() -------- - -description to come - -calendar() ----------- - -description to come \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 9b5a84dfb0c8a4ba078beb516373e7bb7d8d3ed7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:45:41 +0200 Subject: Remove previously deprecated FV Library method/rule prep_for_form() --- system/libraries/Form_validation.php | 32 ---------------------- .../codeigniter/libraries/Form_validation_test.php | 14 ---------- user_guide_src/source/changelog.rst | 3 +- user_guide_src/source/installation/upgrade_320.rst | 3 +- .../source/libraries/form_validation.rst | 1 - 5 files changed, 4 insertions(+), 49 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 384caf000..c2bc22f95 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1487,38 +1487,6 @@ class CI_Form_validation { // -------------------------------------------------------------------- - /** - * Prep data for form - * - * This function allows HTML to be safely shown in a form. - * Special characters are converted. - * - * @deprecated 3.0.6 Not used anywhere within the framework and pretty much useless - * @param mixed $data Input data - * @return mixed - */ - public function prep_for_form($data) - { - if ($this->_safe_form_data === FALSE OR empty($data)) - { - return $data; - } - - if (is_array($data)) - { - foreach ($data as $key => $val) - { - $data[$key] = $this->prep_for_form($val); - } - - return $data; - } - - return str_replace(array("'", '"', '<', '>'), array(''', '"', '<', '>'), stripslashes($data)); - } - - // -------------------------------------------------------------------- - /** * Prep URL * diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 5f4bb9316..4be080f90 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -579,20 +579,6 @@ class Form_validation_test extends CI_TestCase { $this->assertFalse($this->form_validation->regex_match('bar', $regex)); } - public function test_prep_for_form() - { - $this->form_validation->reset_validation(); - $error_msg_unprepped = ''; - $error_msg_prepped = '<error ='foobar'">'; - $this->form_validation->set_rules('foo', 'label', 'required', array('required' => $error_msg_unprepped)); - $_POST = array('foo' => ''); - $this->form_validation->run(); - $error_arr = $this->form_validation->error_array(); - - $this->assertEquals('', $this->form_validation->prep_for_form('')); - $this->assertEquals(array('foo' => $error_msg_prepped), $this->form_validation->prep_for_form($error_arr)); - } - public function test_prep_url() { $this->assertEquals('', $this->form_validation->prep_url('')); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f6d39cbfe..a61ad164b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). + - Removed previously deprecated :doc:`Form Validation Library ` method ``prep_for_form()`` / rule *prep_for_form*. - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). - Removed previously deprecated :doc:`HTML Helper ` functions ``br()`` and ``nbs()`` (use PHP's native ``str_repeat()`` with ``'
'`` and ``' '`` respectively). @@ -2748,7 +2749,7 @@ Release Date: January 30, 2008 class. <./libraries/sessions>` - Removed 'last_visit' from the Session class. - Added a language entry for valid_ip validation error. - - Modified prep_for_form() in the Validation class to accept + - Modified ``prep_for_form()`` in the Validation class to accept arrays, adding support for POST array validation (via callbacks only) - Added an "integer" rule into the Validation library. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 2bc4e53d3..4e4a73b67 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -129,13 +129,14 @@ Step 7: Remove usage of previously deprecated functionalities ============================================================= The following is a list of functionalities deprecated in CodeIgniter -version 3.0.0, that have been removed in 3.2.0: +version 3.0.x, that have been removed in 3.2.0: - ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead) - ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory instead) - ``CI_Router::fetch_class()`` (use ``CI_Router::$class`` instead) - ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead) - ``CI_Config::system_url()`` (encourages insecure practices) +- ``CI_Form_validation::prep_for_form()`` (the *prep_for_form* rule) - ``standard_date()`` :doc:`Date Helper <../helpers/date_helper>` function (use ``date()`` instead) - ``do_hash()`` :doc:`Security Helper <../helpers/security_helper>` function (use ``hash()`` instead) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index b503b9be0..915ce876f 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -1009,7 +1009,6 @@ to use: ==================== ========= ============================================================================================================== Name Parameter Description ==================== ========= ============================================================================================================== -**prep_for_form** No DEPRECATED: Converts special characters so that HTML data can be shown in a form field without breaking it. **prep_url** No Adds "\http://" to URLs if missing. **strip_image_tags** No Strips the HTML from image tags leaving the raw URL. **encode_php_tags** No Converts PHP tags to entities. -- cgit v1.2.3-24-g4f1b From bed5e97d94154088b601fac02a24fa784c6d19b5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:48:00 +0200 Subject: [ci skip] Mark a historical docs note as written by EllisLab --- user_guide_src/source/libraries/image_lib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index b25d2512f..442541bf6 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -408,7 +408,7 @@ Class Reference method is not very useful unless you intend to build such an interface. That's exactly what we did using for the photo gallery module in ExpressionEngine, the CMS we develop. We added a JavaScript UI that - lets the cropping area be selected. + lets the cropping area be selected. (from EllisLab) .. php:method:: rotate() -- cgit v1.2.3-24-g4f1b From 5d6e77b092ca8f1700a7407bf59bcab6b0e30808 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 17:14:35 +0200 Subject: [ci skip] Fix #4928 --- system/core/CodeIgniter.php | 5 ++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 71656be29..c9cb5c89f 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -67,7 +67,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); require_once(APPPATH.'config/'.ENVIRONMENT.'/constants.php'); } - require_once(APPPATH.'config/constants.php'); + if (file_exists(APPPATH.'config/constants.php')) + { + require_once(APPPATH.'config/constants.php'); + } /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4f5efe276..1ce3f071f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4923) - :doc:`Session Library ` could execute an erroneous SQL query with the 'database' driver, if the lock attempt times out. - Fixed a bug (#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. - Fixed a bug (#4844) - :doc:`Email Library ` didn't apply ``escapeshellarg()`` to the while passing the Sendmail ``-f`` parameter through ``popen()``. +- Fixed a bug (#4928) - the bootstrap file didn't check if *config/constants.php* exists before trying to load it. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 83424f9284815e816015a9e3f8326e410601c011 Mon Sep 17 00:00:00 2001 From: Ryan McAllen Date: Wed, 7 Dec 2016 18:22:31 -0500 Subject: Spelling: convinient -> convenient --- tests/mocks/autoloader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index 33942768d..11825de2c 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -1,6 +1,6 @@ Date: Thu, 8 Dec 2016 12:21:40 +0200 Subject: Merge pull request #4932 from rhynodesigns/patch-1 [ci skip] Fix a comment typo in unit tests --- tests/mocks/autoloader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index 33942768d..11825de2c 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -1,6 +1,6 @@ Date: Fri, 9 Dec 2016 12:48:57 +0200 Subject: [ci skip] Fix #4937 --- system/libraries/Image_lib.php | 19 ++++++------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 06cdde0b8..39a30f0f5 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -544,35 +544,28 @@ class CI_Image_lib { */ if ($this->new_image === '') { - $this->dest_image = $this->source_image; + $this->dest_image = $this->source_image; $this->dest_folder = $this->source_folder; } - elseif (strpos($this->new_image, '/') === FALSE) + elseif (strpos($this->new_image, '/') === FALSE && strpos($this->new_image, '\\') === FALSE) { + $this->dest_image = $this->new_image; $this->dest_folder = $this->source_folder; - $this->dest_image = $this->new_image; } else { - if (strpos($this->new_image, '/') === FALSE && strpos($this->new_image, '\\') === FALSE) - { - $full_dest_path = str_replace('\\', '/', realpath($this->new_image)); - } - else - { - $full_dest_path = $this->new_image; - } + $full_dest_path = str_replace('\\', '/', realpath($this->new_image)); // Is there a file name? if ( ! preg_match('#\.(jpg|jpeg|gif|png)$#i', $full_dest_path)) { + $this->dest_image = $this->source_image; $this->dest_folder = $full_dest_path.'/'; - $this->dest_image = $this->source_image; } else { $x = explode('/', $full_dest_path); - $this->dest_image = end($x); + $this->dest_image = end($x); $this->dest_folder = str_replace($this->dest_image, '', $full_dest_path); } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1ce3f071f..2509c8297 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#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. - Fixed a bug (#4844) - :doc:`Email Library ` didn't apply ``escapeshellarg()`` to the while passing the Sendmail ``-f`` parameter through ``popen()``. - Fixed a bug (#4928) - the bootstrap file didn't check if *config/constants.php* exists before trying to load it. +- Fixed a bug (#4937) - :doc:`Image Manipulation Library ` method ``initialize()`` didn't translate *new_image* inputs to absolute paths. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 4827811fd1e26bf33ca396eaf273cb2b4190ff38 Mon Sep 17 00:00:00 2001 From: aquilax Date: Sat, 10 Dec 2016 08:15:12 +0100 Subject: `_random_keyword` must be array Signed-off-by: aquilax --- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index 62690139c..cb06c2a9d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -66,7 +66,7 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { * * @var array */ - protected $_random_keyword = ' RANDOM()'; + protected $_random_keyword = array('RANDOM()', 'RANDOM()'); // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From d478bef9d2154d5ec8bef9329a01d4a7ce37a544 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Dec 2016 11:29:04 +0200 Subject: Merge pull request #4941 from aquilax/fix-pdo-sqlite-order_by-rand Fix order_by() random for pdo/sqlite driver --- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index 62690139c..cb06c2a9d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -66,7 +66,7 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { * * @var array */ - protected $_random_keyword = ' RANDOM()'; + protected $_random_keyword = array('RANDOM()', 'RANDOM()'); // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 4f52ca95781580164ea429643eb252f0c2607f9f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Dec 2016 11:31:39 +0200 Subject: [ci skip] Add changelog entry for PR #4941 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2509c8297..b6d74c2d8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4844) - :doc:`Email Library ` didn't apply ``escapeshellarg()`` to the while passing the Sendmail ``-f`` parameter through ``popen()``. - Fixed a bug (#4928) - the bootstrap file didn't check if *config/constants.php* exists before trying to load it. - Fixed a bug (#4937) - :doc:`Image Manipulation Library ` method ``initialize()`` didn't translate *new_image* inputs to absolute paths. +- Fixed a bug (#4941) - :doc:`Query Builder ` method ``order_by()`` didn't work with 'RANDOM' under the 'pdo/sqlite' driver. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From f2a613d67c23ba253f35a73d208e0dcaf6080b40 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Dec 2016 11:39:38 +0200 Subject: Really fix #4937 --- system/libraries/Image_lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 39a30f0f5..475649c46 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -554,20 +554,20 @@ class CI_Image_lib { } else { - $full_dest_path = str_replace('\\', '/', realpath($this->new_image)); - // Is there a file name? - if ( ! preg_match('#\.(jpg|jpeg|gif|png)$#i', $full_dest_path)) + if ( ! preg_match('#\.(jpg|jpeg|gif|png)$#i', $this->new_image)) { $this->dest_image = $this->source_image; - $this->dest_folder = $full_dest_path.'/'; + $this->dest_folder = $this->new_image; } else { - $x = explode('/', $full_dest_path); + $x = explode('/', str_replace('\\', '/', $this->new_image)); $this->dest_image = end($x); - $this->dest_folder = str_replace($this->dest_image, '', $full_dest_path); + $this->dest_folder = str_replace($this->dest_image, '', $this->new_image); } + + $this->dest_folder = realpath($this->dest_folder).'/'; } /* Compile the finalized filenames/paths -- cgit v1.2.3-24-g4f1b From 8338bbb3586e31432caa503b6530dcea583dd8d8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Dec 2016 14:17:52 +0200 Subject: Fix #4892 - update_batch() Regression caused by 0c23e9122666a30797079bea9415da135d4f7e12 trying to fix #4871 Supersedes #4929 --- system/database/DB_query_builder.php | 29 +++++++++----- system/database/drivers/pdo/pdo_driver.php | 46 ---------------------- .../drivers/pdo/subdrivers/pdo_cubrid_driver.php | 41 ------------------- .../drivers/pdo/subdrivers/pdo_pgsql_driver.php | 8 ++-- system/database/drivers/postgre/postgre_driver.php | 8 ++-- user_guide_src/source/changelog.rst | 1 + 6 files changed, 28 insertions(+), 105 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 5a86ce50f..b88ec956a 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -149,6 +149,13 @@ abstract class CI_DB_query_builder extends CI_DB_driver { */ protected $qb_set = array(); + /** + * QB data set for update_batch() + * + * @var array + */ + protected $qb_set_ub = array(); + /** * QB aliased tables list * @@ -1886,7 +1893,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { if ($set === NULL) { - if (empty($this->qb_set)) + if (empty($this->qb_set_ub)) { return ($this->db_debug) ? $this->display_error('db_must_use_set') : FALSE; } @@ -1913,9 +1920,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // Batch this baby $affected_rows = 0; - for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) + for ($i = 0, $total = count($this->qb_set_ub); $i < $total; $i += $batch_size) { - if ($this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set, $i, $batch_size), $index))) + if ($this->query($this->_update_batch($this->protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->qb_set_ub, $i, $batch_size), $index))) { $affected_rows += $this->affected_rows(); } @@ -1941,18 +1948,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { */ protected function _update_batch($table, $values, $index) { - $index_escaped = $this->protect_identifiers($index); - $ids = array(); foreach ($values as $key => $val) { - $ids[] = $val[$index]; + $ids[] = $val[$index]['value']; foreach (array_keys($val) as $field) { if ($field !== $index) { - $final[$field][] = 'WHEN '.$index_escaped.' = '.$val[$index].' THEN '.$val[$field]; + $final[$val[$field]['field']][] = 'WHEN '.$val[$index]['field'].' = '.$val[$index]['value'].' THEN '.$val[$field]['value']; } } } @@ -1965,7 +1970,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { .'ELSE '.$k.' END, '; } - $this->where($index_escaped.' IN('.implode(',', $ids).')', NULL, FALSE); + $this->where($val[$index]['field'].' IN('.implode(',', $ids).')', NULL, FALSE); return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } @@ -2002,7 +2007,10 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $index_set = TRUE; } - $clean[$this->protect_identifiers($k2, FALSE, $escape)] = ($escape === FALSE) ? $v2 : $this->escape($v2); + $clean[$k2] = array( + 'field' => $this->protect_identifiers($k2, FALSE, $escape), + 'value' => ($escape === FALSE ? $v2 : $this->escape($v2)) + ); } if ($index_set === FALSE) @@ -2010,7 +2018,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->display_error('db_batch_missing_index'); } - $this->qb_set[] = $clean; + $this->qb_set_ub[] = $clean; } return $this; @@ -2777,6 +2785,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { $this->_reset_run(array( 'qb_set' => array(), + 'qb_set_ub' => array(), 'qb_from' => array(), 'qb_join' => array(), 'qb_where' => array(), diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index c27607e55..2da9cf38f 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -310,52 +310,6 @@ class CI_DB_pdo_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @param string $table Table name - * @param array $values Update data - * @param string $index WHERE key - * @return string - */ - protected function _update_batch($table, $values, $index) - { - $ids = array(); - foreach ($values as $key => $val) - { - $ids[] = $val[$index]; - - foreach (array_keys($val) as $field) - { - if ($field !== $index) - { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; - } - } - } - - $cases = ''; - foreach ($final as $k => $v) - { - $cases .= $k.' = CASE '."\n"; - - foreach ($v as $row) - { - $cases .= $row."\n"; - } - - $cases .= 'ELSE '.$k.' END, '; - } - - $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE); - - return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); - } - - // -------------------------------------------------------------------- - /** * Truncate statement * diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 837779804..4eb7f0ba6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -170,47 +170,6 @@ class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver { // -------------------------------------------------------------------- - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @param string $table Table name - * @param array $values Update data - * @param string $index WHERE key - * @return string - */ - protected function _update_batch($table, $values, $index) - { - $ids = array(); - foreach ($values as $key => $val) - { - $ids[] = $val[$index]; - - foreach (array_keys($val) as $field) - { - if ($field !== $index) - { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; - } - } - } - - $cases = ''; - foreach ($final as $k => $v) - { - $cases .= $k." = CASE \n" - .implode("\n", $v)."\n" - .'ELSE '.$k.' END), '; - } - - $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE); - - return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); - } - - // -------------------------------------------------------------------- - /** * Truncate statement * diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 9483d2457..05b8350d1 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -326,13 +326,13 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { $ids = array(); foreach ($values as $key => $val) { - $ids[] = $val[$index]; + $ids[] = $val[$index]['value']; foreach (array_keys($val) as $field) { if ($field !== $index) { - $final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field]; + $final[$val[$field]['field']][] = 'WHEN '.$val[$index]['value'].' THEN '.$val[$field]['value']; } } } @@ -340,12 +340,12 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { $cases = ''; foreach ($final as $k => $v) { - $cases .= $k.' = (CASE '.$index."\n" + $cases .= $k.' = (CASE '.$val[$index]['field']."\n" .implode("\n", $v)."\n" .'ELSE '.$k.' END), '; } - $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE); + $this->where($val[$index]['field'].' IN('.implode(',', $ids).')', NULL, FALSE); return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index dfd87f95a..51916fcc1 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -550,13 +550,13 @@ class CI_DB_postgre_driver extends CI_DB { $ids = array(); foreach ($values as $key => $val) { - $ids[] = $val[$index]; + $ids[] = $val[$index]['value']; foreach (array_keys($val) as $field) { if ($field !== $index) { - $final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field]; + $final[$val[$field]['field']][] = 'WHEN '.$val[$index]['value'].' THEN '.$val[$field]['value']; } } } @@ -564,12 +564,12 @@ class CI_DB_postgre_driver extends CI_DB { $cases = ''; foreach ($final as $k => $v) { - $cases .= $k.' = (CASE '.$index."\n" + $cases .= $k.' = (CASE '.$val[$index]['field']."\n" .implode("\n", $v)."\n" .'ELSE '.$k.' END), '; } - $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE); + $this->where($val[$index]['field'].' IN('.implode(',', $ids).')', NULL, FALSE); return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b6d74c2d8..93aabebda 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4928) - the bootstrap file didn't check if *config/constants.php* exists before trying to load it. - Fixed a bug (#4937) - :doc:`Image Manipulation Library ` method ``initialize()`` didn't translate *new_image* inputs to absolute paths. - Fixed a bug (#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. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From d2e4ccfe3bba903227c3686b9390d8b9525b197d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Dec 2016 15:15:39 +0200 Subject: Remove previously deprecated Smiley Helper --- application/config/smileys.php | 64 ------ system/helpers/smiley_helper.php | 255 --------------------- user_guide_src/source/changelog.rst | 9 +- user_guide_src/source/helpers/smiley_helper.rst | 169 -------------- user_guide_src/source/images/smile.gif | Bin 1156 -> 0 bytes user_guide_src/source/installation/upgrade_300.rst | 12 +- user_guide_src/source/installation/upgrade_320.rst | 4 +- 7 files changed, 14 insertions(+), 499 deletions(-) delete mode 100644 application/config/smileys.php delete mode 100644 system/helpers/smiley_helper.php delete mode 100644 user_guide_src/source/helpers/smiley_helper.rst delete mode 100644 user_guide_src/source/images/smile.gif diff --git a/application/config/smileys.php b/application/config/smileys.php deleted file mode 100644 index abf9a898d..000000000 --- a/application/config/smileys.php +++ /dev/null @@ -1,64 +0,0 @@ - array('grin.gif', '19', '19', 'grin'), - ':lol:' => array('lol.gif', '19', '19', 'LOL'), - ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), - ':)' => array('smile.gif', '19', '19', 'smile'), - ';-)' => array('wink.gif', '19', '19', 'wink'), - ';)' => array('wink.gif', '19', '19', 'wink'), - ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), - ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), - ':-S' => array('confused.gif', '19', '19', 'confused'), - ':wow:' => array('surprise.gif', '19', '19', 'surprised'), - ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), - ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), - '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), - ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), - ':P' => array('raspberry.gif', '19', '19', 'raspberry'), - ':blank:' => array('blank.gif', '19', '19', 'blank stare'), - ':long:' => array('longface.gif', '19', '19', 'long face'), - ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), - ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), - ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), - '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), - ':down:' => array('downer.gif', '19', '19', 'downer'), - ':red:' => array('embarrassed.gif', '19', '19', 'red face'), - ':sick:' => array('sick.gif', '19', '19', 'sick'), - ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), - ':-/' => array('hmm.gif', '19', '19', 'hmmm'), - '>:(' => array('mad.gif', '19', '19', 'mad'), - ':mad:' => array('mad.gif', '19', '19', 'mad'), - '>:-(' => array('angry.gif', '19', '19', 'angry'), - ':angry:' => array('angry.gif', '19', '19', 'angry'), - ':zip:' => array('zip.gif', '19', '19', 'zipper'), - ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), - ':ahhh:' => array('shock.gif', '19', '19', 'shock'), - ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), - ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), - ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), - ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), - ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), - ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), - ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), - ':snake:' => array('snake.gif', '19', '19', 'snake'), - ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), - ':question:' => array('question.gif', '19', '19', 'question') - -); diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php deleted file mode 100644 index 688ca24c2..000000000 --- a/system/helpers/smiley_helper.php +++ /dev/null @@ -1,255 +0,0 @@ -field_id pairs - * @param string field_id if alias name was passed in - * @param bool - * @return array - */ - function smiley_js($alias = '', $field_id = '', $inline = TRUE) - { - static $do_setup = TRUE; - $r = ''; - - if ($alias !== '' && ! is_array($alias)) - { - $alias = array($alias => $field_id); - } - - if ($do_setup === TRUE) - { - $do_setup = FALSE; - $m = array(); - - if (is_array($alias)) - { - foreach ($alias as $name => $id) - { - $m[] = '"'.$name.'" : "'.$id.'"'; - } - } - - $m = '{'.implode(',', $m).'}'; - - $r .= << $id) - { - $r .= 'smiley_map["'.$name.'"] = "'.$id."\";\n"; - } - } - - return ($inline) - ? '' - : $r; - } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('get_clickable_smileys')) -{ - /** - * Get Clickable Smileys - * - * Returns an array of image tag links that can be clicked to be inserted - * into a form field. - * - * @param string the URL to the folder containing the smiley images - * @param array - * @return array - */ - function get_clickable_smileys($image_url, $alias = '') - { - // For backward compatibility with js_insert_smiley - if (is_array($alias)) - { - $smileys = $alias; - } - elseif (FALSE === ($smileys = _get_smiley_array())) - { - return FALSE; - } - - // Add a trailing slash to the file path if needed - $image_url = rtrim($image_url, '/').'/'; - - $used = array(); - foreach ($smileys as $key => $val) - { - // Keep duplicates from being used, which can happen if the - // mapping array contains multiple identical replacements. For example: - // :-) and :) might be replaced with the same image so both smileys - // will be in the array. - if (isset($used[$smileys[$key][0]])) - { - continue; - } - - $link[] = '
'.$smileys[$key][3].''; - $used[$smileys[$key][0]] = TRUE; - } - - return $link; - } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('parse_smileys')) -{ - /** - * Parse Smileys - * - * Takes a string as input and swaps any contained smileys for the actual image - * - * @param string the text to be parsed - * @param string the URL to the folder containing the smiley images - * @param array - * @return string - */ - function parse_smileys($str = '', $image_url = '', $smileys = NULL) - { - if ($image_url === '' OR ( ! is_array($smileys) && FALSE === ($smileys = _get_smiley_array()))) - { - return $str; - } - - // Add a trailing slash to the file path if needed - $image_url = rtrim($image_url, '/').'/'; - - foreach ($smileys as $key => $val) - { - $str = str_replace($key, ''.$smileys[$key][3].'', $str); - } - - return $str; - } -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('_get_smiley_array')) -{ - /** - * Get Smiley Array - * - * Fetches the config/smiley.php file - * - * @return mixed - */ - function _get_smiley_array() - { - static $_smileys; - - if ( ! is_array($_smileys)) - { - if (file_exists(APPPATH.'config/smileys.php')) - { - include(APPPATH.'config/smileys.php'); - } - - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'); - } - - if (empty($smileys) OR ! is_array($smileys)) - { - $_smileys = array(); - return FALSE; - } - - $_smileys = $smileys; - } - - return $_smileys; - } -} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a61ad164b..4d0b4cf4d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -21,6 +21,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`File Helper ` function ``read_file()`` (use PHP's native ``file_get_contents()`` instead). - Removed previously deprecated :doc:`Form Helper ` function ``form_prep()`` (use :php:func:`html_escape()` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). + - Removed previously deprecated *Smiley Helper*. - Removed previously deprecated *Javascript Library* (it was always experimental in the first place). - Libraries @@ -561,7 +562,7 @@ Release Date: March 30, 2015 - ``do_hash()`` now uses PHP's native ``hash()`` function (supporting more algorithms) and is deprecated. - :php:func:`strip_image_tags()` is now an alias for the same method in the :doc:`Security Library `. - - :doc:`Smiley Helper ` changes include: + - *Smiley Helper* changes include: - Deprecated the whole helper as too specific for CodeIgniter. - Removed previously deprecated function ``js_insert_smiley()``. @@ -1850,7 +1851,7 @@ Hg Tag: v2.0.0 string already has a scheme. - Modified get_file_info in the file helper, changing filectime() to filemtime() for dates. - - Modified smiley_js() to add optional third parameter to return + - Modified ``smiley_js()`` to add optional third parameter to return only the javascript with no script tags. - The img() function of the :doc:`HTML helper <./helpers/html_helper>` will now generate an empty @@ -2005,7 +2006,7 @@ Hg Tag: v1.7.2 - Modified directory_map() in the :doc:`Directory helper ` to allow the inclusion of hidden files, and to return FALSE on failure to read directory. - - Modified the :doc:`Smiley helper ` to work + - Modified the *Smiley helper* to work with multiple fields and insert the smiley at the last known cursor position. @@ -3112,7 +3113,7 @@ Release Date: October 30, 2006 - Added :doc:`$this->db->platform() <./database/helpers>` function - Added new :doc:`File Helper <./helpers/file_helper>`: get_filenames() -- Added new helper: :doc:`Smiley Helper <./helpers/smiley_helper>` +- Added new helper: *Smiley Helper* - Added support for
    and
      lists in the :doc:`HTML Helper <./helpers/html_helper>` - Added the ability to rewrite :doc:`short diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst deleted file mode 100644 index 3e7669942..000000000 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ /dev/null @@ -1,169 +0,0 @@ -############# -Smiley Helper -############# - -The Smiley Helper file contains functions that let you manage smileys -(emoticons). - -.. important:: The Smiley helper is DEPRECATED and should not be used. - It is currently only kept for backwards compatibility. - -.. contents:: - :local: - -.. raw:: html - -
      - -Loading this Helper -=================== - -This helper is loaded using the following code:: - - $this->load->helper('smiley'); - -Overview -======== - -The Smiley helper has a renderer that takes plain text smileys, like -:-) and turns them into a image representation, like |smile!| - -It also lets you display a set of smiley images that when clicked will -be inserted into a form field. For example, if you have a blog that -allows user commenting you can show the smileys next to the comment -form. Your users can click a desired smiley and with the help of some -JavaScript it will be placed into the form field. - -Clickable Smileys Tutorial -========================== - -Here is an example demonstrating how you might create a set of clickable -smileys next to a form field. This example requires that you first -download and install the smiley images, then create a controller and the -View as described. - -.. important:: Before you begin, please `download the smiley images - `_ - and put them in a publicly accessible place on your server. - This helper also assumes you have the smiley replacement array - located at `application/config/smileys.php` - -The Controller --------------- - -In your **application/controllers/** directory, create a file called -Smileys.php and place the code below in it. - -.. important:: Change the URL in the :php:func:`get_clickable_smileys()` - function below so that it points to your smiley folder. - -You'll notice that in addition to the smiley helper, we are also using -the :doc:`Table Class <../libraries/table>`:: - - load->helper('smiley'); - $this->load->library('table'); - - $image_array = get_clickable_smileys('http://example.com/images/smileys/', 'comments'); - $col_array = $this->table->make_columns($image_array, 8); - - $data['smiley_table'] = $this->table->generate($col_array); - $this->load->view('smiley_view', $data); - } - - } - -In your **application/views/** directory, create a file called **smiley_view.php** -and place this code in it:: - - - - Smileys - - - -
      - -
      -

      Click to insert a smiley!

      - - When you have created the above controller and view, load it by visiting http://www.example.com/index.php/smileys/ - - - -Field Aliases -------------- - -When making changes to a view it can be inconvenient to have the field -id in the controller. To work around this, you can give your smiley -links a generic name that will be tied to a specific id in your view. - -:: - - $image_array = get_smiley_links("http://example.com/images/smileys/", "comment_textarea_alias"); - -To map the alias to the field id, pass them both into the -:func:`smiley_js()` function:: - - $image_array = smiley_js("comment_textarea_alias", "comments"); - -Available Functions -=================== - -.. php:function:: get_clickable_smileys($image_url[, $alias = ''[, $smileys = NULL]]) - - :param string $image_url: URL path to the smileys directory - :param string $alias: Field alias - :returns: An array of ready to use smileys - :rtype: array - - Returns an array containing your smiley images wrapped in a clickable - link. You must supply the URL to your smiley folder and a field id or - field alias. - - Example:: - - $image_array = get_clickable_smileys('http://example.com/images/smileys/', 'comment'); - -.. php:function:: smiley_js([$alias = ''[, $field_id = ''[, $inline = TRUE]]]) - - :param string $alias: Field alias - :param string $field_id: Field ID - :param bool $inline: Whether we're inserting an inline smiley - :returns: Smiley-enabling JavaScript code - :rtype: string - - Generates the JavaScript that allows the images to be clicked and - inserted into a form field. If you supplied an alias instead of an id - when generating your smiley links, you need to pass the alias and - corresponding form id into the function. This function is designed to be - placed into the area of your web page. - - Example:: - - - -.. php:function:: parse_smileys([$str = ''[, $image_url = ''[, $smileys = NULL]]]) - - :param string $str: Text containing smiley codes - :param string $image_url: URL path to the smileys directory - :param array $smileys: An array of smileys - :returns: Parsed smileys - :rtype: string - - Takes a string of text as input and replaces any contained plain text - smileys into the image equivalent. The first parameter must contain your - string, the second must contain the URL to your smiley folder - - Example:: - - $str = 'Here are some smileys: :-) ;-)'; - $str = parse_smileys($str, 'http://example.com/images/smileys/'); - echo $str; - -.. |smile!| image:: ../images/smile.gif \ No newline at end of file diff --git a/user_guide_src/source/images/smile.gif b/user_guide_src/source/images/smile.gif deleted file mode 100644 index bf0922504..000000000 Binary files a/user_guide_src/source/images/smile.gif and /dev/null differ diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index f00a69512..54f635cc0 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -532,9 +532,9 @@ the ``EXT`` constant has been removed. Use just '.php' instead. Smiley helper ============= -The :doc:`Smiley Helper <../helpers/smiley_helper>` is a legacy feature from EllisLab's -ExpressionEngine product. However, it is too specific for a general purpose framework like -CodeIgniter and as such it is now deprecated. +The *Smiley Helper* is a legacy feature from EllisLab's ExpressionEngine product. +However, it is too specific for a general purpose framework like CodeIgniter +and as such it is now deprecated. Also, the previously deprecated ``js_insert_smiley()`` (since version 1.7.2) is now removed. @@ -559,9 +559,9 @@ implemented cryptographic functions. The Cart library ================ -The :doc:`Cart Library <../libraries/cart>`, similarly to the :doc:`Smiley Helper -<../helpers/smiley_helper>` is too specific for CodeIgniter. It is now deprecated -and scheduled for removal in CodeIgniter 3.1+. +The :doc:`Cart Library <../libraries/cart>`, similarly to the *Smiley Helper* +is too specific for CodeIgniter. It is now deprecated and scheduled for +removal in CodeIgniter 3.1+. .. note:: The library is still available, but you're strongly encouraged to remove its usage sooner rather than later. diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 4e4a73b67..597e1ecf2 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -132,7 +132,7 @@ The following is a list of functionalities deprecated in CodeIgniter version 3.0.x, that have been removed in 3.2.0: - ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead) -- ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory instead) +- ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory`` instead) - ``CI_Router::fetch_class()`` (use ``CI_Router::$class`` instead) - ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead) - ``CI_Config::system_url()`` (encourages insecure practices) @@ -153,3 +153,5 @@ version 3.0.x, that have been removed in 3.2.0: - ``valid_email()`` (use ``filter_var($email, FILTER_VALIDATE_EMAIL)`` instead) - ``send_email()`` (use ``mail()`` instead) + +- The entire *Smiley Helper* (an archived version is available on GitHub: `bcit-ci/ci3-smiley-helper `_) -- cgit v1.2.3-24-g4f1b From 9be93ba78585e8256e25b3c4f43eed500d49d8e2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Dec 2016 15:27:13 +0200 Subject: Remove previously deprecated Cart Library --- system/libraries/Cart.php | 567 --------------------- tests/mocks/autoloader.php | 1 - user_guide_src/source/changelog.rst | 23 +- user_guide_src/source/installation/upgrade_300.rst | 10 +- user_guide_src/source/installation/upgrade_320.rst | 1 + user_guide_src/source/libraries/cart.rst | 398 --------------- 6 files changed, 17 insertions(+), 983 deletions(-) delete mode 100644 system/libraries/Cart.php delete mode 100644 user_guide_src/source/libraries/cart.rst diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php deleted file mode 100644 index 44d87e0bf..000000000 --- a/system/libraries/Cart.php +++ /dev/null @@ -1,567 +0,0 @@ -CI =& get_instance(); - - // Are any config settings being passed manually? If so, set them - $config = is_array($params) ? $params : array(); - - // Load the Sessions class - $this->CI->load->driver('session', $config); - - // Grab the shopping cart array from the session table - $this->_cart_contents = $this->CI->session->userdata('cart_contents'); - if ($this->_cart_contents === NULL) - { - // No cart exists so we'll set some base values - $this->_cart_contents = array('cart_total' => 0, 'total_items' => 0); - } - - log_message('info', 'Cart Class Initialized'); - } - - // -------------------------------------------------------------------- - - /** - * Insert items into the cart and save it to the session table - * - * @param array - * @return bool - */ - public function insert($items = array()) - { - // Was any cart data passed? No? Bah... - if ( ! is_array($items) OR count($items) === 0) - { - log_message('error', 'The insert method must be passed an array containing data.'); - return FALSE; - } - - // You can either insert a single product using a one-dimensional array, - // or multiple products using a multi-dimensional one. The way we - // determine the array type is by looking for a required array key named "id" - // at the top level. If it's not found, we will assume it's a multi-dimensional array. - - $save_cart = FALSE; - if (isset($items['id'])) - { - if (($rowid = $this->_insert($items))) - { - $save_cart = TRUE; - } - } - else - { - foreach ($items as $val) - { - if (is_array($val) && isset($val['id'])) - { - if ($this->_insert($val)) - { - $save_cart = TRUE; - } - } - } - } - - // Save the cart data if the insert was successful - if ($save_cart === TRUE) - { - $this->_save_cart(); - return isset($rowid) ? $rowid : TRUE; - } - - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Insert - * - * @param array - * @return bool - */ - protected function _insert($items = array()) - { - // Was any cart data passed? No? Bah... - if ( ! is_array($items) OR count($items) === 0) - { - log_message('error', 'The insert method must be passed an array containing data.'); - return FALSE; - } - - // -------------------------------------------------------------------- - - // Does the $items array contain an id, quantity, price, and name? These are required - if ( ! isset($items['id'], $items['qty'], $items['price'], $items['name'])) - { - log_message('error', 'The cart array must contain a product ID, quantity, price, and name.'); - return FALSE; - } - - // -------------------------------------------------------------------- - - // Prep the quantity. It can only be a number. Duh... also trim any leading zeros - $items['qty'] = (float) $items['qty']; - - // If the quantity is zero or blank there's nothing for us to do - if ($items['qty'] == 0) - { - return FALSE; - } - - // -------------------------------------------------------------------- - - // Validate the product ID. It can only be alpha-numeric, dashes, underscores or periods - // Not totally sure we should impose this rule, but it seems prudent to standardize IDs. - // Note: These can be user-specified by setting the $this->product_id_rules variable. - if ( ! preg_match('/^['.$this->product_id_rules.']+$/i', $items['id'])) - { - log_message('error', 'Invalid product ID. The product ID can only contain alpha-numeric characters, dashes, and underscores'); - return FALSE; - } - - // -------------------------------------------------------------------- - - // Validate the product name. It can only be alpha-numeric, dashes, underscores, colons or periods. - // Note: These can be user-specified by setting the $this->product_name_rules variable. - if ($this->product_name_safe && ! preg_match('/^['.$this->product_name_rules.']+$/i'.(UTF8_ENABLED ? 'u' : ''), $items['name'])) - { - log_message('error', 'An invalid name was submitted as the product name: '.$items['name'].' The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces'); - return FALSE; - } - - // -------------------------------------------------------------------- - - // Prep the price. Remove leading zeros and anything that isn't a number or decimal point. - $items['price'] = (float) $items['price']; - - // We now need to create a unique identifier for the item being inserted into the cart. - // Every time something is added to the cart it is stored in the master cart array. - // Each row in the cart array, however, must have a unique index that identifies not only - // a particular product, but makes it possible to store identical products with different options. - // For example, what if someone buys two identical t-shirts (same product ID), but in - // different sizes? The product ID (and other attributes, like the name) will be identical for - // both sizes because it's the same shirt. The only difference will be the size. - // Internally, we need to treat identical submissions, but with different options, as a unique product. - // Our solution is to convert the options array to a string and MD5 it along with the product ID. - // This becomes the unique "row ID" - if (isset($items['options']) && count($items['options']) > 0) - { - $rowid = md5($items['id'].serialize($items['options'])); - } - else - { - // No options were submitted so we simply MD5 the product ID. - // Technically, we don't need to MD5 the ID in this case, but it makes - // sense to standardize the format of array indexes for both conditions - $rowid = md5($items['id']); - } - - // -------------------------------------------------------------------- - - // Now that we have our unique "row ID", we'll add our cart items to the master array - // grab quantity if it's already there and add it on - $old_quantity = isset($this->_cart_contents[$rowid]['qty']) ? (int) $this->_cart_contents[$rowid]['qty'] : 0; - - // Re-create the entry, just to make sure our index contains only the data from this submission - $items['rowid'] = $rowid; - $items['qty'] += $old_quantity; - $this->_cart_contents[$rowid] = $items; - - return $rowid; - } - - // -------------------------------------------------------------------- - - /** - * Update the cart - * - * This function permits the quantity of a given item to be changed. - * Typically it is called from the "view cart" page if a user makes - * changes to the quantity before checkout. That array must contain the - * product ID and quantity for each item. - * - * @param array - * @return bool - */ - public function update($items = array()) - { - // Was any cart data passed? - if ( ! is_array($items) OR count($items) === 0) - { - return FALSE; - } - - // You can either update a single product using a one-dimensional array, - // or multiple products using a multi-dimensional one. The way we - // determine the array type is by looking for a required array key named "rowid". - // If it's not found we assume it's a multi-dimensional array - $save_cart = FALSE; - if (isset($items['rowid'])) - { - if ($this->_update($items) === TRUE) - { - $save_cart = TRUE; - } - } - else - { - foreach ($items as $val) - { - if (is_array($val) && isset($val['rowid'])) - { - if ($this->_update($val) === TRUE) - { - $save_cart = TRUE; - } - } - } - } - - // Save the cart data if the insert was successful - if ($save_cart === TRUE) - { - $this->_save_cart(); - return TRUE; - } - - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Update the cart - * - * This function permits changing item properties. - * Typically it is called from the "view cart" page if a user makes - * changes to the quantity before checkout. That array must contain the - * rowid and quantity for each item. - * - * @param array - * @return bool - */ - protected function _update($items = array()) - { - // Without these array indexes there is nothing we can do - if ( ! isset($items['rowid'], $this->_cart_contents[$items['rowid']])) - { - return FALSE; - } - - // Prep the quantity - if (isset($items['qty'])) - { - $items['qty'] = (float) $items['qty']; - // Is the quantity zero? If so we will remove the item from the cart. - // If the quantity is greater than zero we are updating - if ($items['qty'] == 0) - { - unset($this->_cart_contents[$items['rowid']]); - return TRUE; - } - } - - // find updatable keys - $keys = array_intersect(array_keys($this->_cart_contents[$items['rowid']]), array_keys($items)); - // if a price was passed, make sure it contains valid data - if (isset($items['price'])) - { - $items['price'] = (float) $items['price']; - } - - // product id & name shouldn't be changed - foreach (array_diff($keys, array('id', 'name')) as $key) - { - $this->_cart_contents[$items['rowid']][$key] = $items[$key]; - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Save the cart array to the session DB - * - * @return bool - */ - protected function _save_cart() - { - // Let's add up the individual prices and set the cart sub-total - $this->_cart_contents['total_items'] = $this->_cart_contents['cart_total'] = 0; - foreach ($this->_cart_contents as $key => $val) - { - // We make sure the array contains the proper indexes - if ( ! is_array($val) OR ! isset($val['price'], $val['qty'])) - { - continue; - } - - $this->_cart_contents['cart_total'] += ($val['price'] * $val['qty']); - $this->_cart_contents['total_items'] += $val['qty']; - $this->_cart_contents[$key]['subtotal'] = ($this->_cart_contents[$key]['price'] * $this->_cart_contents[$key]['qty']); - } - - // Is our cart empty? If so we delete it from the session - if (count($this->_cart_contents) <= 2) - { - $this->CI->session->unset_userdata('cart_contents'); - - // Nothing more to do... coffee time! - return FALSE; - } - - // If we made it this far it means that our cart has data. - // Let's pass it to the Session class so it can be stored - $this->CI->session->set_userdata(array('cart_contents' => $this->_cart_contents)); - - // Woot! - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Cart Total - * - * @return int - */ - public function total() - { - return $this->_cart_contents['cart_total']; - } - - // -------------------------------------------------------------------- - - /** - * Remove Item - * - * Removes an item from the cart - * - * @param int - * @return bool - */ - public function remove($rowid) - { - // unset & save - unset($this->_cart_contents[$rowid]); - $this->_save_cart(); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Total Items - * - * Returns the total item count - * - * @return int - */ - public function total_items() - { - return $this->_cart_contents['total_items']; - } - - // -------------------------------------------------------------------- - - /** - * Cart Contents - * - * Returns the entire cart array - * - * @param bool - * @return array - */ - public function contents($newest_first = FALSE) - { - // do we want the newest first? - $cart = ($newest_first) ? array_reverse($this->_cart_contents) : $this->_cart_contents; - - // Remove these so they don't create a problem when showing the cart table - unset($cart['total_items']); - unset($cart['cart_total']); - - return $cart; - } - - // -------------------------------------------------------------------- - - /** - * Get cart item - * - * Returns the details of a specific item in the cart - * - * @param string $row_id - * @return array - */ - public function get_item($row_id) - { - return (in_array($row_id, array('total_items', 'cart_total'), TRUE) OR ! isset($this->_cart_contents[$row_id])) - ? FALSE - : $this->_cart_contents[$row_id]; - } - - // -------------------------------------------------------------------- - - /** - * Has options - * - * Returns TRUE if the rowid passed to this function correlates to an item - * that has options associated with it. - * - * @param string $row_id = '' - * @return bool - */ - public function has_options($row_id = '') - { - return (isset($this->_cart_contents[$row_id]['options']) && count($this->_cart_contents[$row_id]['options']) !== 0); - } - - // -------------------------------------------------------------------- - - /** - * Product options - * - * Returns the an array of options, for a particular product row ID - * - * @param string $row_id = '' - * @return array - */ - public function product_options($row_id = '') - { - return isset($this->_cart_contents[$row_id]['options']) ? $this->_cart_contents[$row_id]['options'] : array(); - } - - // -------------------------------------------------------------------- - - /** - * Format Number - * - * Returns the supplied number with commas and a decimal point. - * - * @param float - * @return string - */ - public function format_number($n = '') - { - return ($n === '') ? '' : number_format( (float) $n, 2, '.', ','); - } - - // -------------------------------------------------------------------- - - /** - * Destroy the cart - * - * Empties the cart and kills the session - * - * @return void - */ - public function destroy() - { - $this->_cart_contents = array('cart_total' => 0, 'total_items' => 0); - $this->CI->session->unset_userdata('cart_contents'); - } - -} diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index 11825de2c..a912327ca 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -33,7 +33,6 @@ function autoload($class) $ci_libraries = array( 'Calendar', - 'Cart', 'Driver_Library', 'Email', 'Encrypt', diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4d0b4cf4d..6a0b827ae 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Release Date: Not Released - Removed previously deprecated :doc:`Form Helper ` function ``form_prep()`` (use :php:func:`html_escape()` instead). - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - Removed previously deprecated *Smiley Helper*. + - Removed previously deprecated *Cart Library*. - Removed previously deprecated *Javascript Library* (it was always experimental in the first place). - Libraries @@ -773,7 +774,7 @@ Release Date: March 30, 2015 - Added support for templating via an array in addition to the encoded string. - Changed method ``get_total_days()`` to be an alias for :doc:`Date Helper ` :php:func:`days_in_month()`. - - :doc:`Cart Library ` changes include: + - *Cart Library* changes include: - Deprecated the library as too specific for CodeIgniter. - Added method ``remove()`` to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatibility. @@ -1042,7 +1043,7 @@ Bug fixes for 3.0 - Fixed a bug where :doc:`Database Forge ` method ``create_table()`` with PostgreSQL database could lead to fetching the whole table. - Fixed a bug (#795) - :doc:`Form Helper ` :php:func:`form_open()` didn't add the default form *method* and *accept-charset* when an empty array is passed to it. - Fixed a bug (#797) - :doc:`Date Helper ` :php:func:`timespan()` was using incorrect seconds for year and month. -- Fixed a bug in :doc:`Cart Library ` method ``contents()`` where if called without a TRUE (or equal) parameter, it would fail due to a typo. +- Fixed a bug in *Cart Library* method ``contents()`` where if called without a TRUE (or equal) parameter, it would fail due to a typo. - Fixed a bug (#406) - SQLSRV DB driver not returning resource on ``db_pconnect()``. - Fixed a bug in :doc:`Image Manipulation Library ` method ``gd_loaded()`` where it was possible for the script execution to end or a PHP E_WARNING message to be emitted. - Fixed a bug in the :doc:`Pagination library ` where when use_page_numbers=TRUE previous link and page 1 link did not have the same url. @@ -1179,7 +1180,7 @@ Bug fixes for 3.0 - Fixed a bug (#2298) - :doc:`Database Results ` method ``next_row()`` kept returning the last row, allowing for infinite loops. - Fixed a bug (#2236, #2639) - :doc:`Form Helper ` functions :php:func:`set_value()`, :php:func:`set_select()`, :php:func:`set_radio()`, :php:func:`set_checkbox()` didn't parse array notation for keys if the rule was not present in the :doc:`Form Validation Library `. - Fixed a bug (#2353) - :doc:`Query Builder ` erroneously prefixed literal strings with **dbprefix**. -- Fixed a bug (#78) - :doc:`Cart Library ` didn't allow non-English letters in product names. +- Fixed a bug (#78) - *Cart Library* didn't allow non-English letters in product names. - Fixed a bug (#77) - :doc:`Database Class ` didn't properly handle the transaction "test mode" flag. - Fixed a bug (#2380) - :doc:`URI Routing ` method ``fetch_method()`` returned 'index' if the requested method name matches its controller name. - Fixed a bug (#2388) - :doc:`Email Library ` used to ignore attachment errors, resulting in broken emails being sent. @@ -1414,9 +1415,8 @@ Release Date: November 14, 2011 - Libraries - - Changed ``$this->cart->insert()`` in the :doc:`Cart - Library ` to return the Row ID if a single - item was inserted successfully. + - Changed ``$this->cart->insert()`` in the *Cart Library* + to return the Row ID if a single item was inserted successfully. - Added support to set an optional parameter in your callback rules of validation using the :doc:`Form Validation Library `. @@ -1524,9 +1524,8 @@ Release Date: August 20, 2011 string. See upgrade notes if using database sessions. - Added $this->db->set_dbprefix() to the :doc:`Database Driver `. - - Changed $this->cart->insert() in the :doc:`Cart - Library ` to return the Row ID if a single - item was inserted successfully. + - Changed ``$this->cart->insert()`` in the *Cart Library* + to return the Row ID if a single item was inserted successfully. - Added $this->load->get_var() to the :doc:`Loader library ` to retrieve global vars set with $this->load->view() and $this->load->vars(). @@ -1551,8 +1550,8 @@ Bug fixes for 2.0.3 properly escaped. - Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag. -- Fixed a bug where the method $this->cart->total_items() from :doc:`Cart - Library ` now returns the sum of the quantity +- Fixed a bug where the method ``$this->cart->total_items()`` from + *Cart Library* now returns the sum of the quantity of all items in the cart instead of your total count. - Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT @@ -1971,7 +1970,7 @@ Hg Tag: v1.7.2 - Libraries - - Added a new :doc:`Cart Class `. + - Added a new *Cart Class*. - Added the ability to pass $config['file_name'] for the :doc:`File Uploading Class ` and rename the uploaded file. diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 54f635cc0..7b9082679 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -559,12 +559,12 @@ implemented cryptographic functions. The Cart library ================ -The :doc:`Cart Library <../libraries/cart>`, similarly to the *Smiley Helper* -is too specific for CodeIgniter. It is now deprecated and scheduled for -removal in CodeIgniter 3.1+. +The *Cart Library*, similarly to the *Smiley Helper* is too specific for +CodeIgniter. It is now deprecated and scheduled for removal in +CodeIgniter 3.1+. -.. note:: The library is still available, but you're strongly encouraged to remove its usage sooner - rather than later. +.. note:: The library is still available, but you're strongly encouraged to + remove its usage sooner rather than later. Database drivers 'mysql', 'sqlite', 'mssql', 'pdo/dblib' ======================================================== diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 597e1ecf2..b587470f2 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -147,6 +147,7 @@ version 3.0.x, that have been removed in 3.2.0: - ``read_file()`` :doc:`File Helper <../helpers/file_helper>` function (use ``file_get_contents()`` instead) - ``form_prep()`` :doc:`Form Helper <../helpers/form_helper>` function (use :php:func:`html_escape()` instead) +- The entire *Cart Library* (an archived version is available on GitHub: `bcit-ci/ci3-cart-library `_) - The entire *Javascript Library* (it was always experimental in the first place) - The entire *Email Helper*, which only had two functions: diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst deleted file mode 100644 index be343320d..000000000 --- a/user_guide_src/source/libraries/cart.rst +++ /dev/null @@ -1,398 +0,0 @@ -################### -Shopping Cart Class -################### - -The Cart Class permits items to be added to a session that stays active -while a user is browsing your site. These items can be retrieved and -displayed in a standard "shopping cart" format, allowing the user to -update the quantity or remove items from the cart. - -.. important:: The Cart library is DEPRECATED and should not be used. - It is currently only kept for backwards compatibility. - -Please note that the Cart Class ONLY provides the core "cart" -functionality. It does not provide shipping, credit card authorization, -or other processing components. - -.. contents:: - :local: - -.. raw:: html - -
      - -******************** -Using the Cart Class -******************** - -Initializing the Shopping Cart Class -==================================== - -.. important:: The Cart class utilizes CodeIgniter's :doc:`Session - Class ` to save the cart information to a database, so - before using the Cart class you must set up a database table as - indicated in the :doc:`Session Documentation `, and set the - session preferences in your application/config/config.php file to - utilize a database. - -To initialize the Shopping Cart Class in your controller constructor, -use the ``$this->load->library()`` method:: - - $this->load->library('cart'); - -Once loaded, the Cart object will be available using:: - - $this->cart - -.. note:: The Cart Class will load and initialize the Session Class - automatically, so unless you are using sessions elsewhere in your - application, you do not need to load the Session class. - -Adding an Item to The Cart -========================== - -To add an item to the shopping cart, simply pass an array with the -product information to the ``$this->cart->insert()`` method, as shown -below:: - - $data = array( - 'id' => 'sku_123ABC', - 'qty' => 1, - 'price' => 39.95, - 'name' => 'T-Shirt', - 'options' => array('Size' => 'L', 'Color' => 'Red') - ); - - $this->cart->insert($data); - -.. important:: The first four array indexes above (id, qty, price, and - name) are **required**. If you omit any of them the data will not be - saved to the cart. The fifth index (options) is optional. It is intended - to be used in cases where your product has options associated with it. - Use an array for options, as shown above. - -The five reserved indexes are: - -- **id** - Each product in your store must have a unique identifier. - Typically this will be an "sku" or other such identifier. -- **qty** - The quantity being purchased. -- **price** - The price of the item. -- **name** - The name of the item. -- **options** - Any additional attributes that are needed to identify - the product. These must be passed via an array. - -In addition to the five indexes above, there are two reserved words: -rowid and subtotal. These are used internally by the Cart class, so -please do NOT use those words as index names when inserting data into -the cart. - -Your array may contain additional data. Anything you include in your -array will be stored in the session. However, it is best to standardize -your data among all your products in order to make displaying the -information in a table easier. - -:: - - $data = array( - 'id' => 'sku_123ABC', - 'qty' => 1, - 'price' => 39.95, - 'name' => 'T-Shirt', - 'coupon' => 'XMAS-50OFF' - ); - - $this->cart->insert($data); - -The ``insert()`` method will return the $rowid if you successfully insert a -single item. - -Adding Multiple Items to The Cart -================================= - -By using a multi-dimensional array, as shown below, it is possible to -add multiple products to the cart in one action. This is useful in cases -where you wish to allow people to select from among several items on the -same page. - -:: - - $data = array( - array( - 'id' => 'sku_123ABC', - 'qty' => 1, - 'price' => 39.95, - 'name' => 'T-Shirt', - 'options' => array('Size' => 'L', 'Color' => 'Red') - ), - array( - 'id' => 'sku_567ZYX', - 'qty' => 1, - 'price' => 9.95, - 'name' => 'Coffee Mug' - ), - array( - 'id' => 'sku_965QRS', - 'qty' => 1, - 'price' => 29.95, - 'name' => 'Shot Glass' - ) - ); - - $this->cart->insert($data); - -Displaying the Cart -=================== - -To display the cart you will create a :doc:`view -file
      ` with code similar to the one shown below. - -Please note that this example uses the :doc:`form -helper
      `. - -:: - - - - - - - - - - - - - - - cart->contents() as $items): ?> - - - - - - - - - - - - - - - - - - - - -
      QTYItem DescriptionItem PriceSub-Total
      $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?> - - - cart->has_options($items['rowid']) == TRUE): ?> - -

      - cart->product_options($items['rowid']) as $option_name => $option_value): ?> - - :
      - - -

      - - - -
      cart->format_number($items['price']); ?>$cart->format_number($items['subtotal']); ?>
       Total$cart->format_number($this->cart->total()); ?>
      - -

      - -Updating The Cart -================= - -To update the information in your cart, you must pass an array -containing the Row ID and one or more pre-defined properties to the -``$this->cart->update()`` method. - -.. note:: If the quantity is set to zero, the item will be removed from - the cart. - -:: - - $data = array( - 'rowid' => 'b99ccdf16028f015540f341130b6d8ec', - 'qty' => 3 - ); - - $this->cart->update($data); - - // Or a multi-dimensional array - - $data = array( - array( - 'rowid' => 'b99ccdf16028f015540f341130b6d8ec', - 'qty' => 3 - ), - array( - 'rowid' => 'xw82g9q3r495893iajdh473990rikw23', - 'qty' => 4 - ), - array( - 'rowid' => 'fh4kdkkkaoe30njgoe92rkdkkobec333', - 'qty' => 2 - ) - ); - - $this->cart->update($data); - -You may also update any property you have previously defined when -inserting the item such as options, price or other custom fields. - -:: - - $data = array( - 'rowid' => 'b99ccdf16028f015540f341130b6d8ec', - 'qty' => 1, - 'price' => 49.95, - 'coupon' => NULL - ); - - $this->cart->update($data); - -What is a Row ID? -***************** - -The row ID is a unique identifier that is generated by the cart code -when an item is added to the cart. The reason a unique ID is created -is so that identical products with different options can be managed -by the cart. - -For example, let's say someone buys two identical t-shirts (same product -ID), but in different sizes. The product ID (and other attributes) will -be identical for both sizes because it's the same shirt. The only -difference will be the size. The cart must therefore have a means of -identifying this difference so that the two sizes of shirts can be -managed independently. It does so by creating a unique "row ID" based on -the product ID and any options associated with it. - -In nearly all cases, updating the cart will be something the user does -via the "view cart" page, so as a developer, it is unlikely that you -will ever have to concern yourself with the "row ID", other than making -sure your "view cart" page contains this information in a hidden form -field, and making sure it gets passed to the ``update()`` method when -the update form is submitted. Please examine the construction of the -"view cart" page above for more information. - - -*************** -Class Reference -*************** - -.. php:class:: CI_Cart - - .. attribute:: $product_id_rules = '\.a-z0-9_-' - - These are the regular expression rules that we use to validate the product - ID - alpha-numeric, dashes, underscores, or periods by default - - .. attribute:: $product_name_rules = '\w \-\.\:' - - These are the regular expression rules that we use to validate the product ID and product name - alpha-numeric, dashes, underscores, colons or periods by - default - - .. attribute:: $product_name_safe = TRUE - - Whether or not to only allow safe product names. Default TRUE. - - - .. php:method:: insert([$items = array()]) - - :param array $items: Items to insert into the cart - :returns: TRUE on success, FALSE on failure - :rtype: bool - - Insert items into the cart and save it to the session table. Returns TRUE - on success and FALSE on failure. - - - .. php:method:: update([$items = array()]) - - :param array $items: Items to update in the cart - :returns: TRUE on success, FALSE on failure - :rtype: bool - - This method permits changing the properties of a given item. - Typically it is called from the "view cart" page if a user makes changes - to the quantity before checkout. That array must contain the rowid - for each item. - - .. php:method:: remove($rowid) - - :param int $rowid: ID of the item to remove from the cart - :returns: TRUE on success, FALSE on failure - :rtype: bool - - Allows you to remove an item from the shopping cart by passing it the - ``$rowid``. - - .. php:method:: total() - - :returns: Total amount - :rtype: int - - Displays the total amount in the cart. - - - .. php:method:: total_items() - - :returns: Total amount of items in the cart - :rtype: int - - Displays the total number of items in the cart. - - - .. php:method:: contents([$newest_first = FALSE]) - - :param bool $newest_first: Whether to order the array with newest items first - :returns: An array of cart contents - :rtype: array - - Returns an array containing everything in the cart. You can sort the - order by which the array is returned by passing it TRUE where the contents - will be sorted from newest to oldest, otherwise it is sorted from oldest - to newest. - - .. php:method:: get_item($row_id) - - :param int $row_id: Row ID to retrieve - :returns: Array of item data - :rtype: array - - Returns an array containing data for the item matching the specified row - ID, or FALSE if no such item exists. - - .. php:method:: has_options($row_id = '') - - :param int $row_id: Row ID to inspect - :returns: TRUE if options exist, FALSE otherwise - :rtype: bool - - Returns TRUE (boolean) if a particular row in the cart contains options. - This method is designed to be used in a loop with ``contents()``, since - you must pass the rowid to this method, as shown in the Displaying - the Cart example above. - - .. php:method:: product_options([$row_id = '']) - - :param int $row_id: Row ID - :returns: Array of product options - :rtype: array - - Returns an array of options for a particular product. This method is - designed to be used in a loop with ``contents()``, since you - must pass the rowid to this method, as shown in the Displaying the - Cart example above. - - .. php:method:: destroy() - - :rtype: void - - Permits you to destroy the cart. This method will likely be called - when you are finished processing the customer's order. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 56d1efc5b14d7bd5a92800ba9394bf9201d48b61 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 12:32:32 +0200 Subject: Move 'standardize_newlines' proc out of CI_Input::_clean_input_data() Preparation for CI_Input::_sanitize_globals() removal. Also, WTF?! I'm deprecating this functionality in 3.1.next. --- system/core/Input.php | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 2e38e4501..ec57cd448 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -66,15 +66,6 @@ class CI_Input { */ protected $_allow_get_array = TRUE; - /** - * Standardize new lines flag - * - * If set to TRUE, then newlines are standardized. - * - * @var bool - */ - protected $_standardize_newlines; - /** * Enable XSS flag * @@ -140,7 +131,6 @@ class CI_Input { $this->_allow_get_array = (config_item('allow_get_array') === TRUE); $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - $this->_standardize_newlines = (bool) config_item('standardize_newlines'); $this->security =& load_class('Security', 'core'); @@ -159,6 +149,13 @@ class CI_Input { $this->security->csrf_verify(); } + if ( ! empty($_POST) && config_item('standardize_newlines') === TRUE) + { + array_walk_recursive($_POST, function(&$value) { + $value = preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $value); + }); + } + log_message('info', 'Input Class Initialized'); } @@ -595,7 +592,6 @@ class CI_Input { * * - Unsets $_GET data, if query strings are not enabled * - Cleans POST, COOKIE and SERVER data - * - Standardizes newline characters to PHP_EOL * * @return void */ @@ -698,12 +694,6 @@ class CI_Input { // Remove control characters $str = remove_invisible_characters($str, FALSE); - // Standardize newlines if needed - if ($this->_standardize_newlines === TRUE) - { - return preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $str); - } - return $str; } -- cgit v1.2.3-24-g4f1b From 25aab832ff5b064166b5af4f5c4269407c56b338 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:04:40 +0200 Subject: [ci skip] Deprecate 'allow_get_array', 'standardize_newlines' --- application/config/config.php | 22 ++++++++++++++++------ user_guide_src/source/changelog.rst | 2 ++ user_guide_src/source/installation/upgrade_313.rst | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index 23ef5a528..10315220e 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -168,9 +168,6 @@ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; | By default CodeIgniter uses search-engine friendly segment based URLs: | example.com/who/what/where/ | -| By default CodeIgniter enables access to the $_GET array. If for some -| reason you would like to disable it, set 'allow_get_array' to FALSE. -| | You can optionally enable standard query string based URLs: | example.com?who=me&what=something&where=here | @@ -185,12 +182,25 @@ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; | use segment based URLs. | */ -$config['allow_get_array'] = TRUE; $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; +/* +|-------------------------------------------------------------------------- +| Allow $_GET array +|-------------------------------------------------------------------------- +| +| By default CodeIgniter enables access to the $_GET array. If for some +| reason you would like to disable it, set 'allow_get_array' to FALSE. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['allow_get_array'] = TRUE; + /* |-------------------------------------------------------------------------- | Error Logging Threshold @@ -404,8 +414,8 @@ $config['cookie_httponly'] = FALSE; | Determines whether to standardize newline characters in input data, | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. | -| This is particularly useful for portability between UNIX-based OSes, -| (usually \n) and Windows (\r\n). +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! | */ $config['standardize_newlines'] = FALSE; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 93aabebda..25a301440 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -9,6 +9,8 @@ Release Date: Not Released - General Changes + - Deprecated ``$config['allow_get_array']``. + - Deprecated ``$config['standardize_newlines']``. - Deprecated :doc:`Date Helper ` function :php:func:`nice_date()`. Bug fixes for 3.1.3 diff --git a/user_guide_src/source/installation/upgrade_313.rst b/user_guide_src/source/installation/upgrade_313.rst index ebce7ab9b..76dd159e6 100644 --- a/user_guide_src/source/installation/upgrade_313.rst +++ b/user_guide_src/source/installation/upgrade_313.rst @@ -30,3 +30,17 @@ CodeIgniter 3.2+. .. note:: The function is still available, but you're strongly encouraged to remove its usage sooner rather than later. + +Step 3: Remove usage of $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.+. + +.. note:: The functionality is still available, but you're strongly + encouraged to remove its usage sooner rather than later. -- cgit v1.2.3-24-g4f1b From 6e2e9e937f9b973e677a8dacae45eccdadc306f0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:05:48 +0200 Subject: [ci skip] Fix a changelog entry typo --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 25a301440..d7977f4ce 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -43,7 +43,7 @@ Release Date: Oct 28, 2016 - General Changes - - 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. Bug fixes for 3.1.2 ------------------- -- cgit v1.2.3-24-g4f1b From aecb9ff2b3dfb6e66f1e229fa5f6b7f7275fcd40 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:05:48 +0200 Subject: [ci skip] Fix a changelog entry typo --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6adb5073a..7e2d4a9ca 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -107,7 +107,7 @@ Release Date: Oct 28, 2016 - General Changes - - 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. Bug fixes for 3.1.2 ------------------- -- cgit v1.2.3-24-g4f1b From 8e37b8560c75d3994e59f401be977dcf386bb210 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:13:05 +0200 Subject: Remove 'allow_get_array', 'standardize_newlines' config settings --- application/config/config.php | 28 ---------------------- system/core/Input.php | 23 +----------------- user_guide_src/source/changelog.rst | 2 ++ user_guide_src/source/installation/upgrade_320.rst | 7 ++++-- user_guide_src/source/libraries/input.rst | 4 ---- 5 files changed, 8 insertions(+), 56 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index c088e80c0..535f0f817 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -191,20 +191,6 @@ $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; -/* -|-------------------------------------------------------------------------- -| Allow $_GET array -|-------------------------------------------------------------------------- -| -| By default CodeIgniter enables access to the $_GET array. If for some -| reason you would like to disable it, set 'allow_get_array' to FALSE. -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ -$config['allow_get_array'] = TRUE; - /* |-------------------------------------------------------------------------- | Error Logging Threshold @@ -410,20 +396,6 @@ $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Standardize newlines -|-------------------------------------------------------------------------- -| -| Determines whether to standardize newline characters in input data, -| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ -$config['standardize_newlines'] = FALSE; - /* |-------------------------------------------------------------------------- | Global XSS Filtering diff --git a/system/core/Input.php b/system/core/Input.php index ec57cd448..a6be7b517 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -57,15 +57,6 @@ class CI_Input { */ protected $ip_address = FALSE; - /** - * Allow GET array flag - * - * If set to FALSE, then $_GET will be set to an empty array. - * - * @var bool - */ - protected $_allow_get_array = TRUE; - /** * Enable XSS flag * @@ -128,7 +119,6 @@ class CI_Input { */ public function __construct() { - $this->_allow_get_array = (config_item('allow_get_array') === TRUE); $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); $this->_enable_csrf = (config_item('csrf_protection') === TRUE); @@ -149,13 +139,6 @@ class CI_Input { $this->security->csrf_verify(); } - if ( ! empty($_POST) && config_item('standardize_newlines') === TRUE) - { - array_walk_recursive($_POST, function(&$value) { - $value = preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $value); - }); - } - log_message('info', 'Input Class Initialized'); } @@ -598,11 +581,7 @@ class CI_Input { protected function _sanitize_globals() { // Is $_GET data allowed? If not we'll set the $_GET to an empty array - if ($this->_allow_get_array === FALSE) - { - $_GET = array(); - } - elseif (is_array($_GET)) + if (is_array($_GET)) { foreach ($_GET as $key => $val) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7e2d4a9ca..a0f91a148 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,8 @@ Release Date: Not Released - Core - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. + - Removed previously deprecated ``$config['allow_get_array']``. + - Removed previously deprecated ``$config['standardize_newlines']``. - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index b587470f2..6501f40db 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -128,8 +128,11 @@ HTML 5 formatting. Step 7: Remove usage of previously deprecated functionalities ============================================================= -The following is a list of functionalities deprecated in CodeIgniter -version 3.0.x, that have been removed in 3.2.0: +The following is a list of functionalities deprecated in previous +CodeIgniter versions that have been removed in 3.2.0: + +- ``$config['allow_get_array']`` (use ``$_GET = array();`` instead) +- ``$config['standardize_newlines']`` - ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead) - ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory`` instead) diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 899070ef4..8b816a567 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -28,16 +28,12 @@ The security filtering method is called automatically when a new :doc:`controller <../general/controllers>` is invoked. It does the following: -- If ``$config['allow_get_array']`` is FALSE (default is TRUE), destroys - the global GET array. - Destroys all global variables in the event register_globals is turned on. - Filters the GET/POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters. - Provides XSS (Cross-site Scripting Hacks) filtering. This can be enabled globally, or upon request. -- Standardizes newline characters to ``PHP_EOL`` (\\n in UNIX-based OSes, - \\r\\n under Windows). This is configurable. XSS Filtering ============= -- cgit v1.2.3-24-g4f1b From 4e0c208f24b0755c47905e17b82854c538a0c530 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:23:06 +0200 Subject: Remove 'global_xss_filtering' config setting --- application/config/config.php | 14 ---------- system/core/Input.php | 32 ++++++--------------- system/helpers/cookie_helper.php | 3 +- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/helpers/cookie_helper.rst | 2 +- user_guide_src/source/libraries/input.rst | 37 ++++++------------------- 6 files changed, 20 insertions(+), 69 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index 535f0f817..d37af34b7 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -396,20 +396,6 @@ $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Global XSS Filtering -|-------------------------------------------------------------------------- -| -| Determines whether the XSS filter is always active when GET, POST or -| COOKIE data is encountered -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ -$config['global_xss_filtering'] = FALSE; - /* |-------------------------------------------------------------------------- | Cross Site Request Forgery diff --git a/system/core/Input.php b/system/core/Input.php index a6be7b517..d4f79ee68 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -57,17 +57,6 @@ class CI_Input { */ protected $ip_address = FALSE; - /** - * Enable XSS flag - * - * Determines whether the XSS filter is always active when - * GET, POST or COOKIE data is encountered. - * Set automatically based on config setting. - * - * @var bool - */ - protected $_enable_xss = FALSE; - /** * Enable CSRF flag * @@ -119,7 +108,6 @@ class CI_Input { */ public function __construct() { - $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); $this->_enable_csrf = (config_item('csrf_protection') === TRUE); $this->security =& load_class('Security', 'core'); @@ -154,10 +142,8 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - protected function _fetch_from_array(&$array, $index = NULL, $xss_clean = NULL) + protected function _fetch_from_array(&$array, $index = NULL, $xss_clean = FALSE) { - is_bool($xss_clean) OR $xss_clean = $this->_enable_xss; - // If $index is NULL, it means that the whole $array is requested isset($index) OR $index = array_keys($array); @@ -217,7 +203,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function get($index = NULL, $xss_clean = NULL) + public function get($index = NULL, $xss_clean = FALSE) { return $this->_fetch_from_array($_GET, $index, $xss_clean); } @@ -231,7 +217,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function post($index = NULL, $xss_clean = NULL) + public function post($index = NULL, $xss_clean = FALSE) { return $this->_fetch_from_array($_POST, $index, $xss_clean); } @@ -245,7 +231,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function post_get($index, $xss_clean = NULL) + public function post_get($index, $xss_clean = FALSE) { return isset($_POST[$index]) ? $this->post($index, $xss_clean) @@ -261,7 +247,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function get_post($index, $xss_clean = NULL) + public function get_post($index, $xss_clean = FALSE) { return isset($_GET[$index]) ? $this->get($index, $xss_clean) @@ -277,7 +263,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function cookie($index = NULL, $xss_clean = NULL) + public function cookie($index = NULL, $xss_clean = FALSE) { return $this->_fetch_from_array($_COOKIE, $index, $xss_clean); } @@ -291,7 +277,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function server($index, $xss_clean = NULL) + public function server($index, $xss_clean = FALSE) { return $this->_fetch_from_array($_SERVER, $index, $xss_clean); } @@ -307,7 +293,7 @@ class CI_Input { * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ - public function input_stream($index = NULL, $xss_clean = NULL) + public function input_stream($index = NULL, $xss_clean = FALSE) { // Prior to PHP 5.6, the input stream can only be read once, // so we'll need to check if we have already done that first. @@ -561,7 +547,7 @@ class CI_Input { * * @return string|null User Agent string or NULL if it doesn't exist */ - public function user_agent($xss_clean = NULL) + public function user_agent($xss_clean = FALSE) { return $this->_fetch_from_array($_SERVER, 'HTTP_USER_AGENT', $xss_clean); } diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index ca4324495..f8943fde3 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -85,9 +85,8 @@ if ( ! function_exists('get_cookie')) * @param bool * @return mixed */ - function get_cookie($index, $xss_clean = NULL) + function get_cookie($index, $xss_clean = FALSE) { - is_bool($xss_clean) OR $xss_clean = (config_item('global_xss_filtering') === TRUE); $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'); return get_instance()->input->cookie($prefix.$index, $xss_clean); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a0f91a148..1a1b0d537 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -12,6 +12,7 @@ Release Date: Not Released - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. - Removed previously deprecated ``$config['allow_get_array']``. - Removed previously deprecated ``$config['standardize_newlines']``. + - Removed previously deprecated ``$config['global_xss_filtering']``. - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst index c9d2f419c..71e40a33c 100644 --- a/user_guide_src/source/helpers/cookie_helper.rst +++ b/user_guide_src/source/helpers/cookie_helper.rst @@ -42,7 +42,7 @@ The following functions are available: a description of its use, as this function is an alias for ``CI_Input::set_cookie()``. -.. php:function:: get_cookie($index[, $xss_clean = NULL]) +.. php:function:: get_cookie($index[, $xss_clean = FALSE]) :param string $index: Cookie name :param bool $xss_clean: Whether to apply XSS filtering to the returned value diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 8b816a567..1961e3e57 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -32,26 +32,6 @@ following: turned on. - Filters the GET/POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters. -- Provides XSS (Cross-site Scripting Hacks) filtering. This can be - enabled globally, or upon request. - -XSS Filtering -============= - -The Input class has the ability to filter input automatically to prevent -cross-site scripting attacks. If you want the filter to run -automatically every time it encounters POST or COOKIE data you can -enable it by opening your *application/config/config.php* file and setting -this:: - - $config['global_xss_filtering'] = TRUE; - -Please refer to the :doc:`Security class ` documentation for -information on using XSS Filtering in your application. - -.. important:: The 'global_xss_filtering' setting is DEPRECATED and kept - solely for backwards-compatibility purposes. XSS escaping should - be performed on *output*, not *input*! ******************* Accessing form data @@ -126,7 +106,7 @@ Class Reference The property can be read multiple times. - .. php:method:: post([$index = NULL[, $xss_clean = NULL]]) + .. php:method:: post([$index = NULL[, $xss_clean = FALSE]]) :param mixed $index: POST parameter name :param bool $xss_clean: Whether to apply XSS filtering @@ -143,7 +123,6 @@ Class Reference The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE - or by setting your ``$config['global_xss_filtering']`` to TRUE. :: $this->input->post('some_data', TRUE); @@ -169,7 +148,7 @@ Class Reference $this->input->post(array('field1', 'field2'), TRUE); - .. php:method:: get([$index = NULL[, $xss_clean = NULL]]) + .. php:method:: get([$index = NULL[, $xss_clean = FALSE]]) :param mixed $index: GET parameter name :param bool $xss_clean: Whether to apply XSS filtering @@ -202,7 +181,7 @@ Class Reference $this->input->get(array('field1', 'field2'), TRUE); - .. php:method:: post_get($index[, $xss_clean = NULL]) + .. php:method:: post_get($index[, $xss_clean = FALSE]) :param string $index: POST/GET parameter name :param bool $xss_clean: Whether to apply XSS filtering @@ -215,7 +194,7 @@ Class Reference $this->input->post_get('some_data', TRUE); - .. php:method:: get_post($index[, $xss_clean = NULL]) + .. php:method:: get_post($index[, $xss_clean = FALSE]) :param string $index: GET/POST parameter name :param bool $xss_clean: Whether to apply XSS filtering @@ -230,7 +209,7 @@ Class Reference .. note:: This method used to act EXACTLY like ``post_get()``, but it's behavior has changed in CodeIgniter 3.0. - .. php:method:: cookie([$index = NULL[, $xss_clean = NULL]]) + .. php:method:: cookie([$index = NULL[, $xss_clean = FALSE]]) :param mixed $index: COOKIE name :param bool $xss_clean: Whether to apply XSS filtering @@ -253,7 +232,7 @@ Class Reference function :php:func:`get_cookie()`, this method does NOT prepend your configured ``$config['cookie_prefix']`` value. - .. php:method:: server($index[, $xss_clean = NULL]) + .. php:method:: server($index[, $xss_clean = FALSE]) :param mixed $index: Value name :param bool $xss_clean: Whether to apply XSS filtering @@ -271,7 +250,7 @@ Class Reference $this->input->server(array('SERVER_PROTOCOL', 'REQUEST_URI')); - .. php:method:: input_stream([$index = NULL[, $xss_clean = NULL]]) + .. php:method:: input_stream([$index = NULL[, $xss_clean = FALSE]]) :param mixed $index: Key name :param bool $xss_clean: Whether to apply XSS filtering @@ -386,7 +365,7 @@ Class Reference Accepts an optional second string parameter of 'ipv4' or 'ipv6' to specify an IP format. The default checks for both formats. - .. php:method:: user_agent([$xss_clean = NULL]) + .. php:method:: user_agent([$xss_clean = FALSE]) :returns: User agent string or NULL if not set :param bool $xss_clean: Whether to apply XSS filtering -- cgit v1.2.3-24-g4f1b From ff773c059cb984920767dd6187c30a77e5bf78c9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:45:45 +0200 Subject: Finally drop CI_Input::_sanitize_globals() Close #4101 --- system/core/Input.php | 168 +-------------------- tests/mocks/core/input.php | 19 +-- user_guide_src/source/installation/upgrade_320.rst | 18 +++ user_guide_src/source/libraries/input.rst | 28 +--- 4 files changed, 32 insertions(+), 201 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index d4f79ee68..aefc3b7d8 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -93,8 +93,15 @@ class CI_Input { */ protected $_input_stream; + /** + * CI_Security instance + * + * Used for the optional $xss_filter parameter that most + * getter methods have here. + * + * @var CI_Security + */ protected $security; - protected $uni; // -------------------------------------------------------------------- @@ -112,15 +119,6 @@ class CI_Input { $this->security =& load_class('Security', 'core'); - // Do we need the UTF-8 class? - if (UTF8_ENABLED === TRUE) - { - $this->uni =& load_class('Utf8', 'core'); - } - - // Sanitize global arrays - $this->_sanitize_globals(); - // CSRF Protection check if ($this->_enable_csrf === TRUE && ! is_cli()) { @@ -554,156 +552,6 @@ class CI_Input { // -------------------------------------------------------------------- - /** - * Sanitize Globals - * - * Internal method serving for the following purposes: - * - * - Unsets $_GET data, if query strings are not enabled - * - Cleans POST, COOKIE and SERVER data - * - * @return void - */ - protected function _sanitize_globals() - { - // Is $_GET data allowed? If not we'll set the $_GET to an empty array - if (is_array($_GET)) - { - foreach ($_GET as $key => $val) - { - $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); - } - } - - // Clean $_POST Data - if (is_array($_POST)) - { - foreach ($_POST as $key => $val) - { - $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); - } - } - - // Clean $_COOKIE Data - if (is_array($_COOKIE)) - { - // Also get rid of specially treated cookies that might be set by a server - // or silly application, that are of no use to a CI application anyway - // but that when present will trip our 'Disallowed Key Characters' alarm - // http://www.ietf.org/rfc/rfc2109.txt - // note that the key names below are single quoted strings, and are not PHP variables - unset( - $_COOKIE['$Version'], - $_COOKIE['$Path'], - $_COOKIE['$Domain'] - ); - - foreach ($_COOKIE as $key => $val) - { - if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE) - { - $_COOKIE[$cookie_key] = $this->_clean_input_data($val); - } - else - { - unset($_COOKIE[$key]); - } - } - } - - // Sanitize PHP_SELF - $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']); - - log_message('info', 'Global POST, GET and COOKIE data sanitized'); - } - - // -------------------------------------------------------------------- - - /** - * Clean Input Data - * - * Internal method that aids in escaping data and - * standardizing newline characters to PHP_EOL. - * - * @param string|string[] $str Input string(s) - * @return string - */ - protected function _clean_input_data($str) - { - if (is_array($str)) - { - $new_array = array(); - foreach (array_keys($str) as $key) - { - $new_array[$this->_clean_input_keys($key)] = $this->_clean_input_data($str[$key]); - } - return $new_array; - } - - /* We strip slashes if magic quotes is on to keep things consistent - - NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and - it will probably not exist in future versions at all. - */ - if ( ! is_php('5.4') && get_magic_quotes_gpc()) - { - $str = stripslashes($str); - } - - // Clean UTF-8 if supported - if (UTF8_ENABLED === TRUE) - { - $str = $this->uni->clean_string($str); - } - - // Remove control characters - $str = remove_invisible_characters($str, FALSE); - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Clean Keys - * - * Internal method that helps to prevent malicious users - * from trying to exploit keys we make sure that keys are - * only named with alpha-numeric text and a few other items. - * - * @param string $str Input string - * @param bool $fatal Whether to terminate script exection - * or to return FALSE if an invalid - * key is encountered - * @return string|bool - */ - protected function _clean_input_keys($str, $fatal = TRUE) - { - if ( ! preg_match('/^[a-z0-9:_\/|-]+$/i', $str)) - { - if ($fatal === TRUE) - { - return FALSE; - } - else - { - set_status_header(503); - echo 'Disallowed Key Characters.'; - exit(7); // EXIT_USER_INPUT - } - } - - // Clean UTF-8 if supported - if (UTF8_ENABLED === TRUE) - { - return $this->uni->clean_string($str); - } - - return $str; - } - - // -------------------------------------------------------------------- - /** * Request Headers * diff --git a/tests/mocks/core/input.php b/tests/mocks/core/input.php index 40e27441f..4d217a252 100644 --- a/tests/mocks/core/input.php +++ b/tests/mocks/core/input.php @@ -11,16 +11,10 @@ class Mock_Core_Input extends CI_Input { */ public function __construct($security, $utf8) { - $this->_allow_get_array = (config_item('allow_get_array') === TRUE); - $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); $this->_enable_csrf = (config_item('csrf_protection') === TRUE); // Assign Security and Utf8 classes $this->security = $security; - $this->uni = $utf8; - - // Sanitize global arrays - $this->_sanitize_globals(); } public function fetch_from_array($array, $index = '', $xss_clean = FALSE) @@ -28,16 +22,6 @@ class Mock_Core_Input extends CI_Input { return parent::_fetch_from_array($array, $index, $xss_clean); } - /** - * Lie about being a CLI request - * - * We take advantage of this in libraries/Session_test - */ - public function is_cli_request() - { - return FALSE; - } - public function __set($name, $value) { if ($name === 'ip_address') @@ -45,5 +29,4 @@ class Mock_Core_Input extends CI_Input { $this->ip_address = $value; } } - -} \ No newline at end of file +} diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 6501f40db..8434172e7 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -159,3 +159,21 @@ CodeIgniter versions that have been removed in 3.2.0: - ``send_email()`` (use ``mail()`` instead) - The entire *Smiley Helper* (an archived version is available on GitHub: `bcit-ci/ci3-smiley-helper `_) + +Step 8: Make sure you're validating all user inputs +=================================================== + +The :doc:`Input Library <../libraries/input>` used to (often +unconditionally) filter and/or sanitize user input in the ``$_GET``, +``$_POST`` and ``$_COOKIE`` superglobals. + +This was a legacy feature from older times, when things like +`register_globals `_ and +`magic_quotes_gpc `_ existed in +PHP. +It was a necessity back then, but this is no longer the case and reliance +on global filters is a bad practice, giving you a false sense of security. + +This functionality is now removed, and so if you've relied on it for +whatever reasons, you should double-check that you are properly validating +all user inputs in your application (as you always should do). diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 1961e3e57..97460c2c5 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -2,10 +2,8 @@ Input Class ########### -The Input Class serves two purposes: - -#. It pre-processes global input data for security. -#. It provides some helper methods for fetching input data and pre-processing it. +The Input Class provides some helper methods for accessing input data +and pre-processing it. .. note:: This class is initialized automatically by the system so there is no need to do it manually. @@ -17,25 +15,9 @@ The Input Class serves two purposes:
      -*************** -Input Filtering -*************** - -Security Filtering -================== - -The security filtering method is called automatically when a new -:doc:`controller <../general/controllers>` is invoked. It does the -following: - -- Destroys all global variables in the event register_globals is - turned on. -- Filters the GET/POST/COOKIE array keys, permitting only alpha-numeric - (and a few other) characters. - -******************* -Accessing form data -******************* +******************** +Accessing input data +******************** Using POST, GET, COOKIE, or SERVER Data ======================================= -- cgit v1.2.3-24-g4f1b From a299f56629c764afd8909c90ca3bb36625e84109 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 14:09:27 +0200 Subject: Remove dead parameter from form_upload() Close #3558 --- system/helpers/form_helper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 9756437ae..496fc1055 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -244,11 +244,10 @@ if ( ! function_exists('form_upload')) * Identical to the input function but adds the "file" type * * @param mixed - * @param string * @param mixed * @return string */ - function form_upload($data = '', $value = '', $extra = '') + function form_upload($data = '', $extra = '') { $defaults = array('type' => 'file', 'name' => ''); is_array($data) OR $data = array('name' => $data); -- cgit v1.2.3-24-g4f1b From af2edc36bf5e19aeda3f408a0a4019b63ed2d849 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 14:10:15 +0200 Subject: [ci skip] Update changelog; add an entry & upgrade instructions for last commit --- user_guide_src/source/changelog.rst | 52 ++++++++++++++-------- user_guide_src/source/helpers/form_helper.rst | 3 +- user_guide_src/source/installation/upgrade_320.rst | 17 +++++++ 3 files changed, 52 insertions(+), 20 deletions(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1a1b0d537..b0b239870 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -9,27 +9,21 @@ Release Date: Not Released - Core - - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. - - Removed previously deprecated ``$config['allow_get_array']``. - - Removed previously deprecated ``$config['standardize_newlines']``. - Removed previously deprecated ``$config['global_xss_filtering']``. - - Removed previously deprecated :doc:`Input Library ` method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). - - Removed previously deprecated :doc:`Form Validation Library ` method ``prep_for_form()`` / rule *prep_for_form*. - - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). - - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). - - Removed previously deprecated :doc:`HTML Helper ` functions ``br()`` and ``nbs()`` (use PHP's native ``str_repeat()`` with ``'
      '`` and ``' '`` respectively). - - Removed previously deprecated :doc:`String Helper ` functions ``trim_slashes()`` and ``repeater()`` (use PHP's native ``trim()`` with ``'/'`` and ``str_repeat()`` respectively). - - Removed previously deprecated :doc:`File Helper ` function ``read_file()`` (use PHP's native ``file_get_contents()`` instead). - - Removed previously deprecated :doc:`Form Helper ` function ``form_prep()`` (use :php:func:`html_escape()` instead). - - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). - - Removed previously deprecated *Smiley Helper*. - - Removed previously deprecated *Cart Library*. - - Removed previously deprecated *Javascript Library* (it was always experimental in the first place). + - Changed :doc:`URI Library ` to ignore the ``$config['url_suffix']``, ``$config['permitted_uri_chars']`` configuration settings for CLI requests. + + - :doc:`Input Library ` changes include: + + - Removed previously deprecated ``$config['allow_get_array']``. + - Removed previously deprecated ``$config['standardize_newlines']``. + - Removed previously deprecated method ``is_cli_request()`` (use :php:func:`is_cli()` instead). - Libraries + - Removed previously deprecated *Cart Library*. + - Removed previously deprecated *Javascript Library* (it was always experimental in the first place). - Added UNIX socket connection support to :doc:`Session Library ` 'redis' driver. - :doc:`Cache Library ` changes include: @@ -42,6 +36,7 @@ Release Date: Not Released - :doc:`Form Validation Library ` changes include: + - Removed previously deprecated method ``prep_for_form()`` / rule *prep_for_form*. - Changed method ``set_rules()`` to throw a ``BadMethodCallException`` when its first parameter is not an array and the ``$rules`` one is unused. - :doc:`HTML Table Library ` changes include: @@ -52,7 +47,7 @@ Release Date: Not Released - Changed the default value of the **validate** option to ``TRUE``. -- :doc:`Database ` +- :doc:`Database ` changes include: - 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. @@ -64,10 +59,31 @@ Release Date: Not Released - Helpers + - Removed previously deprecated *Email Helper* (had only two functions, aliases for PHP's native ``filter_var()`` and ``mail()``). + - Removed previously deprecated *Smiley Helper*. + - Removed previously deprecated :doc:`Date Helper ` function ``standard_date()`` (use PHP's native ``date()`` instead). + - Removed previously deprecated :doc:`Security Helper ` function ``do_hash()`` (use PHP's native ``hash()`` instead). + - Removed previously deprecated :doc:`File Helper ` function ``read_file()`` (use PHP's native ``file_get_contents()`` instead). - Added new function :php:func:`ordinal_format()` to :doc:`Inflector Helper `. - Updated :doc:`Download Helper ` :php:func:`force_download()` to allow existing files to be renamed for download. - - Updated :doc:`HTML Helper ` function :php:func:`meta()` with support for "charset" and "property" properties. - - Changed :doc:`HTML Helper ` function :php:func:`doctype()` default document type to HTML 5. + + - :doc:`String Helper ` changes include: + + - Removed previously deprecated function ``trim_slashes()`` (use PHP's native ``trim()`` with ``'/'`` instead). + - Removed previously deprecated function ``repeater()`` (use PHP's native ``str_repeat()`` instead). + + - :doc:`HTML Helper ` changes include: + + - Removed previously deprecated function ``br()`` (use PHP's native ``str_repeat()`` with ``'
      '`` instead). + - Removed previously deprecated function ``nbs()`` (use PHP's native ``str_repeat()`` with ``' '`` instead). + - Updated function :php:func:`meta()` with support for "charset" and "property" properties. + - Changed function :php:func:`doctype()` default document type to HTML 5. + + - :doc:`Form Helper ` changes include: + + - Removed previously deprecated function ``form_prep()`` (use :php:func:`html_escape()` instead). + - Removed the second (out of three) parameter from the :php:func:`form_upload()` function (it was never used). + Version 3.1.3 ============= diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index cf52cd523..97595c90b 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -243,10 +243,9 @@ The following functions are available: function above except that it uses the "password" input type. -.. php:function:: form_upload([$data = ''[, $value = ''[, $extra = '']]]) +.. php:function:: form_upload([$data = '', $extra = '']]) :param array $data: Field attributes data - :param string $value: Field value :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 diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 8434172e7..0cf311028 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -125,6 +125,23 @@ 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. +Step 6: Check usage of form_upload() Form helper +================================================ + +The :doc:`Form Helper <../helpers/form_helper>` function +:php:func:`form_upload()` used to have 3 parameters, the second of which +(``$value``) was never used, as it doesn't make sense for an HTML ``input`` +tag of the "file" type. + +That dead parameter is now removed, and so if you've used the third one +(``$extra``), having code like this:: + + form_upload('name', 'irrelevant value', $extra); + +You should change it to:: + + form_upload('name', $extra); + Step 7: Remove usage of previously deprecated functionalities ============================================================= -- cgit v1.2.3-24-g4f1b From 6bbd097269aa0e4ec5308ce506f840e5e214b298 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 14:57:11 +0200 Subject: Don't allow failures with PHP 7.1 on Travis-CI --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 334cb614f..3d0691e50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,6 @@ script: phpunit -d zend.enable_gc=0 -d date.timezone=UTC --coverage-text --confi matrix: allow_failures: - php: hhvm - - php: 7.1 exclude: - php: hhvm env: DB=pgsql -- cgit v1.2.3-24-g4f1b From 88303fd3af7e1347fb2ceeb80a4a898980f98677 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 14:58:16 +0200 Subject: [ci skip] Require PHP 5.4.8 as the absolute minimum We stopped testing this branch on 5.3 long ago --- readme.rst | 2 +- user_guide_src/source/changelog.rst | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.rst b/readme.rst index f5d737028..a2537b393 100644 --- a/readme.rst +++ b/readme.rst @@ -31,7 +31,7 @@ Server Requirements PHP version 5.6 or newer is recommended. -It should work on 5.3.7 as well, but we strongly advise you NOT to run +It should work on 5.4.8 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b0b239870..84ed718cd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.2.0 Release Date: Not Released +- General Changes + + - Officially dropped any kind of support for anything under PHP 5.4.8. + - Core - Removed previously deprecated ``$config['global_xss_filtering']``. -- cgit v1.2.3-24-g4f1b From 26313bddee1fb67af10141671a47bbe703a025fd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 15:15:03 +0200 Subject: [ci skip] More doc changes related to PHP 5.4.8 requirement --- user_guide_src/source/contributing/index.rst | 6 ++--- user_guide_src/source/general/common_functions.rst | 6 ++--- .../source/general/compatibility_functions.rst | 1 - user_guide_src/source/general/requirements.rst | 4 +-- user_guide_src/source/general/styleguide.rst | 4 +-- user_guide_src/source/installation/upgrade_320.rst | 29 +++++++++++++++------- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index be776ec1f..e102b8848 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -104,9 +104,9 @@ Compatibility ============= CodeIgniter recommends PHP 5.6 or newer to be used, but it should be -compatible with PHP 5.3.7 so all code supplied must stick to this -requirement. If PHP 5.4 (and above) functions or features are used then -there must be a fallback for PHP 5.3.7. +compatible with PHP 5.4.8 so all code supplied must stick to this +requirement. If PHP 5.5 (and above) functions or features are used then +there must be a fallback for PHP 5.4.8. Branching ========= diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 6d6744cf7..602a6c763 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -24,9 +24,9 @@ loading any libraries or helpers. Example:: - if (is_php('5.3')) + if (is_php('5.5')) { - $str = quoted_printable_encode($str); + echo json_last_error_msg(); } Returns boolean TRUE if the installed version of PHP is equal to or @@ -185,4 +185,4 @@ loading any libraries or helpers. .. note:: This function was introduced because Suhosin terminated script execution, but this turned out to be a bug. A fix has been available for some time (version 0.9.34), but is - unfortunately not released yet. \ No newline at end of file + unfortunately not released yet. diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 584968663..71559d0be 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -32,7 +32,6 @@ that is otherwise available only since PHP 5.5. Dependencies ============ -- PHP 5.3.7 - ``CRYPT_BLOWFISH`` support for ``crypt()`` Constants diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index f2729f3d5..2e24d6d03 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -4,7 +4,7 @@ Server Requirements `PHP `_ version 5.6 or newer is recommended. -It should work on 5.3.7 as well, but we strongly advise you NOT to run +It should work on 5.4.8 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. @@ -18,4 +18,4 @@ Currently supported databases are: - SQLite via the *sqlite* (version 2), *sqlite3* (version 3) and *pdo* drivers - CUBRID via the *cubrid* and *pdo* drivers - Interbase/Firebird via the *ibase* and *pdo* drivers - - ODBC via the *odbc* and *pdo* drivers (you should know that ODBC is actually an abstraction layer) \ No newline at end of file + - ODBC via the *odbc* and *pdo* drivers (you should know that ODBC is actually an abstraction layer) diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 9b4a84e14..5f25a5ae4 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -346,7 +346,7 @@ Compatibility ============= CodeIgniter recommends PHP 5.6 or newer to be used, but it should be -compatible with PHP 5.3.7. Your code must either be compatible with this +compatible with PHP 5.4.8. Your code must either be compatible with this requirement, provide a suitable fallback, or be an optional feature that dies quietly without affecting a user's application. @@ -633,4 +633,4 @@ Whenever appropriate, provide function argument defaults, which helps prevent PHP errors with mistaken calls and provides common fallback values which can save a few lines of code. Example:: - function foo($bar = '', $baz = FALSE) \ No newline at end of file + function foo($bar = '', $baz = FALSE) diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 0cf311028..a2772e10c 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -13,7 +13,18 @@ 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 +Step 2: Check your PHP version +============================== + +We recommend always running versions that are `currently supported +`_, which right now is at least PHP 5.6. + +PHP 5.3.x versions are now officially not supported by CodeIgniter, and while 5.4.8+ +may be at least runnable, we strongly discourage you from using any PHP versions below +the ones listed on the `PHP.net Supported Versions `_ +page. + +Step 3: Change database connection handling =========================================== "Loading" a database, whether by using the *config/autoload.php* settings @@ -58,7 +69,7 @@ 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 +Step 4: Check logic related to URI parsing of CLI requests ========================================================== When running a CodeIgniter application from the CLI, the @@ -71,7 +82,7 @@ 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) +Step 5: Check Cache Library configurations for Redis, Memcache(d) ================================================================= The new improvements for the 'redis' and 'memcached' drivers of the @@ -98,7 +109,7 @@ 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 the Email library +Step 6: Check usage of the Email library ======================================== The :doc:`Email Library <../libraries/email>` will now by default check the @@ -112,7 +123,7 @@ everything works fine. If something indeed goes wrong with that, please report it as a bug to us, and you can disable the **validate** option to revert to the old behavior. -Step 6: Check usage of doctype() HTML helper +Step 7: Check usage of doctype() HTML helper ============================================ The :doc:`HTML Helper <../helpers/html_helper>` function @@ -125,7 +136,7 @@ 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. -Step 6: Check usage of form_upload() Form helper +Step 8: Check usage of form_upload() Form helper ================================================ The :doc:`Form Helper <../helpers/form_helper>` function @@ -142,7 +153,7 @@ You should change it to:: form_upload('name', $extra); -Step 7: Remove usage of previously deprecated functionalities +Step 9: Remove usage of previously deprecated functionalities ============================================================= The following is a list of functionalities deprecated in previous @@ -177,8 +188,8 @@ CodeIgniter versions that have been removed in 3.2.0: - The entire *Smiley Helper* (an archived version is available on GitHub: `bcit-ci/ci3-smiley-helper `_) -Step 8: Make sure you're validating all user inputs -=================================================== +Step 10: Make sure you're validating all user inputs +==================================================== The :doc:`Input Library <../libraries/input>` used to (often unconditionally) filter and/or sanitize user input in the ``$_GET``, -- cgit v1.2.3-24-g4f1b From 24c866628d0ce5463d7e8b4eba512fa9e7752dfd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 16:14:13 +0200 Subject: Drop all PHP 5.3-related code --- application/config/config.php | 14 - application/config/database.php | 2 +- index.php | 9 +- system/core/CodeIgniter.php | 51 ---- system/core/Common.php | 7 +- system/core/Loader.php | 15 +- system/core/Log.php | 3 - system/core/Output.php | 3 - system/core/Security.php | 32 +- system/core/compat/hash.php | 2 - system/core/compat/password.php | 2 +- system/core/compat/standard.php | 48 --- system/database/drivers/postgre/postgre_driver.php | 2 +- system/database/drivers/sqlite/index.html | 11 - system/database/drivers/sqlite/sqlite_driver.php | 330 --------------------- system/database/drivers/sqlite/sqlite_forge.php | 205 ------------- system/database/drivers/sqlite/sqlite_result.php | 164 ---------- system/database/drivers/sqlite/sqlite_utility.php | 61 ---- system/libraries/Email.php | 36 +-- system/libraries/Encryption.php | 7 +- system/libraries/Session/Session.php | 21 +- .../libraries/Session/SessionHandlerInterface.php | 59 ---- system/libraries/Upload.php | 2 +- system/libraries/Xmlrpc.php | 4 +- system/libraries/Zip.php | 3 - tests/codeigniter/core/compat/standard_test.php | 32 -- user_guide_src/source/changelog.rst | 4 +- .../source/general/compatibility_functions.rst | 9 - user_guide_src/source/general/requirements.rst | 2 +- user_guide_src/source/installation/upgrade_320.rst | 3 + 30 files changed, 28 insertions(+), 1115 deletions(-) delete mode 100644 system/database/drivers/sqlite/index.html delete mode 100644 system/database/drivers/sqlite/sqlite_driver.php delete mode 100644 system/database/drivers/sqlite/sqlite_forge.php delete mode 100644 system/database/drivers/sqlite/sqlite_result.php delete mode 100644 system/database/drivers/sqlite/sqlite_utility.php delete mode 100644 system/libraries/Session/SessionHandlerInterface.php diff --git a/application/config/config.php b/application/config/config.php index d37af34b7..c6e1a7af5 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -452,20 +452,6 @@ $config['compress_output'] = FALSE; */ $config['time_reference'] = 'local'; -/* -|-------------------------------------------------------------------------- -| Rewrite PHP Short Tags -|-------------------------------------------------------------------------- -| -| If your PHP installation does not have short tag support enabled CI -| can rewrite the tags on-the-fly, enabling you to utilize that syntax -| in your view files. Options are TRUE or FALSE (boolean) -| -| Note: You need to have eval() enabled for this to work. -| -*/ -$config['rewrite_short_tags'] = FALSE; - /* |-------------------------------------------------------------------------- | Reverse Proxy IPs diff --git a/application/config/database.php b/application/config/database.php index bf9857fff..b4d8a6a3e 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -22,7 +22,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | ['dbdriver'] The database driver. e.g.: mysqli. | Currently supported: | cubrid, ibase, mssql, mysql, mysqli, oci8, -| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv +| odbc, pdo, postgre, sqlite3, sqlsrv | ['dbprefix'] You can add an optional prefix, which will be added | to the table name when using the Query Builder class | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection diff --git a/index.php b/index.php index d02b6bb38..8015672f3 100755 --- a/index.php +++ b/index.php @@ -73,14 +73,7 @@ switch (ENVIRONMENT) case 'testing': case 'production': ini_set('display_errors', 0); - if (version_compare(PHP_VERSION, '5.3', '>=')) - { - error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); - } - else - { - error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); - } + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); break; default: diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 97cac90ad..dfc90af2a 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -79,57 +79,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ require_once(BASEPATH.'core/Common.php'); - -/* - * ------------------------------------------------------ - * Security procedures - * ------------------------------------------------------ - */ - -if ( ! is_php('5.4')) -{ - ini_set('magic_quotes_runtime', 0); - - if ((bool) ini_get('register_globals')) - { - $_protected = array( - '_SERVER', - '_GET', - '_POST', - '_FILES', - '_REQUEST', - '_SESSION', - '_ENV', - '_COOKIE', - 'GLOBALS', - 'HTTP_RAW_POST_DATA', - 'system_path', - 'application_folder', - 'view_folder', - '_protected', - '_registered' - ); - - $_registered = ini_get('variables_order'); - foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal) - { - if (strpos($_registered, $key) === FALSE) - { - continue; - } - - foreach (array_keys($$superglobal) as $var) - { - if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE)) - { - $GLOBALS[$var] = NULL; - } - } - } - } -} - - /* * ------------------------------------------------------ * Define a custom error handler so we can log PHP errors diff --git a/system/core/Common.php b/system/core/Common.php index 91c585f7d..48eb233c2 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -81,8 +81,7 @@ if ( ! function_exists('is_really_writable')) * Tests for file writability * * is_writable() returns TRUE on Windows servers when you really can't write to - * the file, based on the read-only attribute. is_writable() is also unreliable - * on Unix servers if safe_mode is on. + * the file, based on the read-only attribute. * * @link https://bugs.php.net/bug.php?id=54709 * @param string @@ -90,8 +89,8 @@ if ( ! function_exists('is_really_writable')) */ function is_really_writable($file) { - // If we're on a Unix server with safe_mode off we call is_writable - if (DIRECTORY_SEPARATOR === '/' && (is_php('5.4') OR ! ini_get('safe_mode'))) + // If we're on a UNIX-like server, just is_writable() + if (DIRECTORY_SEPARATOR === '/') { return is_writable($file); } diff --git a/system/core/Loader.php b/system/core/Loader.php index 1111481b7..b52296499 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -954,7 +954,7 @@ class CI_Loader { } extract($this->_ci_cached_vars); - /* + /** * Buffer the output * * We buffer the output for two reasons: @@ -967,18 +967,7 @@ class CI_Loader { */ ob_start(); - // If the PHP installation does not support short tags we'll - // do a little string replacement, changing the short tags - // to standard PHP echo statements. - if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE) - { - echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/system/core/Output.php b/system/core/Output.php index 94a6340e7..febccdaef 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -836,9 +836,6 @@ class CI_Output { { if (self::$func_override) { - // mb_substr($str, $start, null, '8bit') returns an empty - // string on PHP 5.3 - isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/system/core/Security.php b/system/core/Security.php index d0308c5f9..a80b52fd1 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -626,7 +626,7 @@ class CI_Security { if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) { // Try not to waste entropy ... - is_php('5.4') && stream_set_chunk_size($fp, $length); + stream_set_chunk_size($fp, $length); $output = fread($fp, $length); fclose($fp); if ($output !== FALSE) @@ -671,26 +671,8 @@ class CI_Security { static $_entities; - isset($charset) OR $charset = $this->charset; - $flag = is_php('5.4') - ? ENT_COMPAT | ENT_HTML5 - : ENT_COMPAT; - - if ( ! isset($_entities)) - { - $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset)); - - // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 - // entities to the array manually - if ($flag === ENT_COMPAT) - { - $_entities[':'] = ':'; - $_entities['('] = '('; - $_entities[')'] = ')'; - $_entities["\n"] = ' '; - $_entities["\t"] = ' '; - } - } + isset($charset) OR $charset = $this->charset; + isset($_entities) OR $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, ENT_COMPAT | ENT_HTML5, $charset)); do { @@ -715,14 +697,9 @@ class CI_Security { // Decode numeric & UTF16 two byte entities $str = html_entity_decode( preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;])|(?:0*\d{2,4}(?![0-9;]))))/iS', '$1;', $str), - $flag, + ENT_COMPAT | ENT_HTML5, $charset ); - - if ($flag === ENT_COMPAT) - { - $str = str_replace(array_values($_entities), array_keys($_entities), $str); - } } while ($str_compare !== $str); return $str; @@ -1074,5 +1051,4 @@ class CI_Security { return $this->_csrf_hash; } - } diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index d567d0f80..5fec4cc67 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -203,8 +203,6 @@ if ( ! function_exists('hash_pbkdf2')) 'ripemd160' => 64, 'ripemd256' => 64, 'ripemd320' => 64, - 'salsa10' => 64, - 'salsa20' => 64, 'sha1' => 64, 'sha224' => 64, 'sha256' => 64, diff --git a/system/core/compat/password.php b/system/core/compat/password.php index 1b5219e7b..e58422557 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -141,7 +141,7 @@ if ( ! function_exists('password_hash')) } // Try not to waste entropy ... - is_php('5.4') && stream_set_chunk_size($fp, 16); + stream_set_chunk_size($fp, 16); $options['salt'] = ''; for ($read = 0; $read < 16; $read = ($func_override) ? mb_strlen($options['salt'], '8bit') : strlen($options['salt'])) diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index 6b7caa485..ca5046e56 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -132,51 +132,3 @@ if ( ! function_exists('array_column')) return $result; } } - -// ------------------------------------------------------------------------ - -if (is_php('5.4')) -{ - return; -} - -// ------------------------------------------------------------------------ - -if ( ! function_exists('hex2bin')) -{ - /** - * hex2bin() - * - * @link http://php.net/hex2bin - * @param string $data - * @return string - */ - function hex2bin($data) - { - if (in_array($type = gettype($data), array('array', 'double', 'object', 'resource'), TRUE)) - { - if ($type === 'object' && method_exists($data, '__toString')) - { - $data = (string) $data; - } - else - { - trigger_error('hex2bin() expects parameter 1 to be string, '.$type.' given', E_USER_WARNING); - return NULL; - } - } - - if (strlen($data) % 2 !== 0) - { - trigger_error('Hexadecimal input string must have an even length', E_USER_WARNING); - return FALSE; - } - elseif ( ! preg_match('/^[0-9a-f]*$/i', $data)) - { - trigger_error('Input string must be hexadecimal string', E_USER_WARNING); - return FALSE; - } - - return pack('H*', $data); - } -} diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 5cc6a421c..9f794a12e 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -315,7 +315,7 @@ class CI_DB_postgre_driver extends CI_DB { */ public function escape($str) { - if (is_php('5.4.4') && (is_string($str) OR (is_object($str) && method_exists($str, '__toString')))) + if (is_string($str) OR (is_object($str) && method_exists($str, '__toString'))) { return pg_escape_literal($this->conn_id, $str); } diff --git a/system/database/drivers/sqlite/index.html b/system/database/drivers/sqlite/index.html deleted file mode 100644 index b702fbc39..000000000 --- a/system/database/drivers/sqlite/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 403 Forbidden - - - -

      Directory access is forbidden.

      - - - diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php deleted file mode 100644 index 16b8c29c3..000000000 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ /dev/null @@ -1,330 +0,0 @@ -database, 0666, $error) - : sqlite_open($this->database, 0666, $error); - - isset($error) && log_message('error', $error); - - return $conn_id; - } - - // -------------------------------------------------------------------- - - /** - * Database version number - * - * @return string - */ - public function version() - { - return isset($this->data_cache['version']) - ? $this->data_cache['version'] - : $this->data_cache['version'] = sqlite_libversion(); - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ - protected function _execute($sql) - { - return $this->is_write_type($sql) - ? sqlite_exec($this->conn_id, $sql) - : sqlite_query($this->conn_id, $sql); - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @return bool - */ - protected function _trans_begin() - { - return $this->simple_query('BEGIN TRANSACTION'); - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @return bool - */ - protected function _trans_commit() - { - return $this->simple_query('COMMIT'); - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @return bool - */ - protected function _trans_rollback() - { - return $this->simple_query('ROLLBACK'); - } - - // -------------------------------------------------------------------- - - /** - * Platform-dependant string escape - * - * @param string - * @return string - */ - protected function _escape_str($str) - { - return sqlite_escape_string($str); - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @return int - */ - public function affected_rows() - { - return sqlite_changes($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @return int - */ - public function insert_id() - { - return sqlite_last_insert_rowid($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ - protected function _list_tables($prefix_limit = FALSE) - { - $sql = "SELECT name FROM sqlite_master WHERE type='table'"; - - if ($prefix_limit !== FALSE && $this->dbprefix != '') - { - return $sql." AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return bool - */ - protected function _list_columns($table = '') - { - // Not supported - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ - public function field_data($table) - { - if (($query = $this->query('PRAGMA TABLE_INFO('.$this->protect_identifiers($table, TRUE, NULL, FALSE).')')) === FALSE) - { - return FALSE; - } - - $query = $query->result_array(); - if (empty($query)) - { - return FALSE; - } - - $retval = array(); - for ($i = 0, $c = count($query); $i < $c; $i++) - { - $retval[$i] = new stdClass(); - $retval[$i]->name = $query[$i]['name']; - $retval[$i]->type = $query[$i]['type']; - $retval[$i]->max_length = NULL; - $retval[$i]->default = $query[$i]['dflt_value']; - $retval[$i]->primary_key = isset($query[$i]['pk']) ? (int) $query[$i]['pk'] : 0; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occured. - * - * @return array - */ - public function error() - { - $error = array('code' => sqlite_last_error($this->conn_id)); - $error['message'] = sqlite_error_string($error['code']); - return $error; - } - - // -------------------------------------------------------------------- - - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ - protected function _replace($table, $keys, $values) - { - return 'INSERT OR '.parent::_replace($table, $keys, $values); - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this function maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ - protected function _truncate($table) - { - return 'DELETE FROM '.$table; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @return void - */ - protected function _close() - { - sqlite_close($this->conn_id); - } - -} diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php deleted file mode 100644 index 3ad3477e4..000000000 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ /dev/null @@ -1,205 +0,0 @@ -db->database) OR ! @unlink($this->db->database)) - { - return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; - } - elseif ( ! empty($this->db->data_cache['db_names'])) - { - $key = array_search(strtolower($this->db->database), array_map('strtolower', $this->db->data_cache['db_names']), TRUE); - if ($key !== FALSE) - { - unset($this->db->data_cache['db_names'][$key]); - } - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * ALTER TABLE - * - * @todo implement drop_column(), modify_column() - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ - protected function _alter_table($alter_type, $table, $field) - { - if ($alter_type === 'DROP' OR $alter_type === 'CHANGE') - { - // drop_column(): - // BEGIN TRANSACTION; - // CREATE TEMPORARY TABLE t1_backup(a,b); - // INSERT INTO t1_backup SELECT a,b FROM t1; - // DROP TABLE t1; - // CREATE TABLE t1(a,b); - // INSERT INTO t1 SELECT a,b FROM t1_backup; - // DROP TABLE t1_backup; - // COMMIT; - - return FALSE; - } - - return parent::_alter_table($alter_type, $table, $field); - } - - // -------------------------------------------------------------------- - - /** - * Process column - * - * @param array $field - * @return string - */ - protected function _process_column($field) - { - return $this->db->escape_identifiers($field['name']) - .' '.$field['type'] - .$field['auto_increment'] - .$field['null'] - .$field['unique'] - .$field['default']; - } - - // -------------------------------------------------------------------- - - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ - protected function _attr_type(&$attributes) - { - switch (strtoupper($attributes['TYPE'])) - { - case 'ENUM': - case 'SET': - $attributes['TYPE'] = 'TEXT'; - return; - default: return; - } - } - - // -------------------------------------------------------------------- - - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ - protected function _attr_auto_increment(&$attributes, &$field) - { - if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) - { - $field['type'] = 'INTEGER PRIMARY KEY'; - $field['default'] = ''; - $field['null'] = ''; - $field['unique'] = ''; - $field['auto_increment'] = ' AUTOINCREMENT'; - - $this->primary_keys = array(); - } - } - -} diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php deleted file mode 100644 index d40b98aab..000000000 --- a/system/database/drivers/sqlite/sqlite_result.php +++ /dev/null @@ -1,164 +0,0 @@ -num_rows) - ? $this->num_rows - : $this->num_rows = @sqlite_num_rows($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @return int - */ - public function num_fields() - { - return @sqlite_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ - public function list_fields() - { - $field_names = array(); - for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) - { - $field_names[$i] = sqlite_field_name($this->result_id, $i); - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ - public function field_data() - { - $retval = array(); - for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) - { - $retval[$i] = new stdClass(); - $retval[$i]->name = sqlite_field_name($this->result_id, $i); - $retval[$i]->type = NULL; - $retval[$i]->max_length = NULL; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ - public function data_seek($n = 0) - { - return sqlite_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ - protected function _fetch_assoc() - { - return sqlite_fetch_array($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ - protected function _fetch_object($class_name = 'stdClass') - { - return sqlite_fetch_object($this->result_id, $class_name); - } - -} diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php deleted file mode 100644 index 59c46f9ef..000000000 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ /dev/null @@ -1,61 +0,0 @@ -db->display_error('db_unsupported_feature'); - } - -} diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 90a68f129..1191e2350 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -225,13 +225,6 @@ class CI_Email { // -------------------------------------------------------------------- - /** - * Whether PHP is running in safe mode. Initialized by the class constructor. - * - * @var bool - */ - protected $_safe_mode = FALSE; - /** * Subject header * @@ -395,7 +388,6 @@ class CI_Email { { $this->charset = config_item('charset'); $this->initialize($config); - $this->_safe_mode = ( ! is_php('5.4') && ini_get('safe_mode')); isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override')); @@ -676,18 +668,6 @@ class CI_Email { public function message($body) { $this->_body = rtrim(str_replace("\r", '', $body)); - - /* strip slashes only if magic quotes is ON - if we do it with magic quotes OFF, it strips real, user-inputted chars. - - NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and - it will probably not exist in future versions at all. - */ - if ( ! is_php('5.4') && get_magic_quotes_gpc()) - { - $this->_body = stripslashes($this->_body); - } - return $this; } @@ -1854,16 +1834,9 @@ class CI_Email { $this->_recipients = implode(', ', $this->_recipients); } - if ($this->_safe_mode === TRUE) - { - return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str); - } - else - { - // most documentation of sendmail using the "-f" flag lacks a space after it, however - // we've encountered servers that seem to require it to be in place. - return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, '-f '.$this->clean_email($this->_headers['Return-Path'])); - } + // most documentation of sendmail using the "-f" flag lacks a space after it, however + // we've encountered servers that seem to require it to be in place. + return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, '-f '.$this->clean_email($this->_headers['Return-Path'])); } // -------------------------------------------------------------------- @@ -2421,9 +2394,6 @@ class CI_Email { { if (self::$func_override) { - // mb_substr($str, $start, null, '8bit') returns an empty - // string on PHP 5.3 - isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index 545081b3b..c68ee2584 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -482,7 +482,7 @@ class CI_Encryption { $data, $params['handle'], $params['key'], - 1, // DO NOT TOUCH! + OPENSSL_RAW_DATA, $iv ); @@ -641,7 +641,7 @@ class CI_Encryption { $data, $params['handle'], $params['key'], - 1, // DO NOT TOUCH! + OPENSSL_RAW_DATA, $iv ); } @@ -930,9 +930,6 @@ class CI_Encryption { { if (self::$func_override) { - // mb_substr($str, $start, null, '8bit') returns an empty - // string on PHP 5.3 - isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 01989d2d7..9d3bd7a2f 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -105,23 +105,7 @@ class CI_Session { $class = new $class($this->_config); if ($class instanceof SessionHandlerInterface) { - if (is_php('5.4')) - { - session_set_save_handler($class, TRUE); - } - else - { - session_set_save_handler( - array($class, 'open'), - array($class, 'close'), - array($class, 'read'), - array($class, 'write'), - array($class, 'destroy'), - array($class, 'gc') - ); - - register_shutdown_function('session_write_close'); - } + session_set_save_handler($class, TRUE); } else { @@ -190,9 +174,6 @@ class CI_Session { */ protected function _ci_load_classes($driver) { - // PHP 5.4 compatibility - interface_exists('SessionHandlerInterface', FALSE) OR require_once(BASEPATH.'libraries/Session/SessionHandlerInterface.php'); - $prefix = config_item('subclass_prefix'); if ( ! class_exists('CI_Session_driver', FALSE)) diff --git a/system/libraries/Session/SessionHandlerInterface.php b/system/libraries/Session/SessionHandlerInterface.php deleted file mode 100644 index b3533dd1e..000000000 --- a/system/libraries/Session/SessionHandlerInterface.php +++ /dev/null @@ -1,59 +0,0 @@ - 0) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 7186646da..87f609e8d 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -836,9 +836,7 @@ class XML_RPC_Response { // error $this->errno = $code; - $this->errstr = htmlspecialchars($fstr, - (is_php('5.4') ? ENT_XML1 | ENT_NOQUOTES : ENT_NOQUOTES), - 'UTF-8'); + $this->errstr = htmlspecialchars($fstr, ENT_XML1 | ENT_NOQUOTES, 'UTF-8'); } elseif ( ! is_object($val)) { diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 25315c92e..82a43e9c9 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -519,9 +519,6 @@ class CI_Zip { { if (self::$func_override) { - // mb_substr($str, $start, null, '8bit') returns an empty - // string on PHP 5.3 - isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/tests/codeigniter/core/compat/standard_test.php b/tests/codeigniter/core/compat/standard_test.php index a98460129..54424bb9b 100644 --- a/tests/codeigniter/core/compat/standard_test.php +++ b/tests/codeigniter/core/compat/standard_test.php @@ -10,11 +10,6 @@ class standard_test extends CI_TestCase { } $this->assertTrue(function_exists('array_column')); - - if ( ! is_php('5.4')) - { - $this->assertTrue(function_exists('hex2bin')); - } } // ------------------------------------------------------------------------ @@ -330,25 +325,6 @@ class standard_test extends CI_TestCase { array_column($input, 'b', 'a') ); } - - // ------------------------------------------------------------------------ - - /** - * hex2bin() tests - * - * @depends test_bootstrap - */ - public function test_hex2bin() - { - if (is_php('5.4')) - { - return $this->markTestSkipped('hex2bin() is already available on PHP 5.4'); - } - - $this->assertEquals("\x03\x04", hex2bin("0304")); - $this->assertEquals('', hex2bin('')); - $this->assertEquals("\x01\x02\x03", hex2bin(new FooHex())); - } } // ------------------------------------------------------------------------ @@ -368,11 +344,3 @@ class Bar { return 'first_name'; } } - -class FooHex { - - public function __toString() - { - return '010203'; - } -} diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 84ed718cd..74fb15798 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -13,6 +13,7 @@ Release Date: Not Released - Core + - Removed ``$config['rewrite_short_tags']`` (irrelevant on PHP 5.4+). - Removed previously deprecated ``$config['global_xss_filtering']``. - Removed previously deprecated :doc:`Routing Class ` methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` (use the respective class properties instead). - Removed previously deprecated :doc:`Config Library ` method ``system_url()`` (encourages insecure practices). @@ -53,9 +54,10 @@ Release Date: Not Released - :doc:`Database ` changes include: + - Removed previously deprecated 'sqlite' driver (used for SQLite version 2; no longer shipped with PHP 5.4+). + - Removed method ``db_set_charset()`` and the ability to change a connection character set at runtime. - 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. - :doc:`Database Forge `: diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 71559d0be..522e43f60 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -220,12 +220,3 @@ Function reference For more information, please refer to the `PHP manual for array_column() `_. - -.. php:function:: hex2bin($data) - - :param array $data: Hexadecimal representation of data - :returns: Binary representation of the given data - :rtype: string - - For more information, please refer to the `PHP manual for hex2bin() - `_. diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index 2e24d6d03..982a6014f 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -15,7 +15,7 @@ Currently supported databases are: - Oracle via the *oci8* and *pdo* drivers - PostgreSQL via the *postgre* and *pdo* drivers - MS SQL via the *mssql*, *sqlsrv* (version 2005 and above only) and *pdo* drivers - - SQLite via the *sqlite* (version 2), *sqlite3* (version 3) and *pdo* drivers + - SQLite via the *sqlite3* and *pdo* drivers - CUBRID via the *cubrid* and *pdo* drivers - Interbase/Firebird via the *ibase* and *pdo* drivers - ODBC via the *odbc* and *pdo* drivers (you should know that ODBC is actually an abstraction layer) diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index a2772e10c..95d9aab4d 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -161,6 +161,9 @@ CodeIgniter versions that have been removed in 3.2.0: - ``$config['allow_get_array']`` (use ``$_GET = array();`` instead) - ``$config['standardize_newlines']`` +- ``$config['rewrite_short_tags']`` (no impact; irrelevant on PHP 5.4+) + +- 'sqlite' database driver (no longer shipped with PHP 5.4+; 'sqlite3' is still available) - ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead) - ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory`` instead) -- cgit v1.2.3-24-g4f1b From dcd6f5153b7e7e6d798d5a77af65b7460f152e5c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 18:14:35 +0200 Subject: Isolate CI_Security instantiation from CI_Input; improve tests --- system/core/CodeIgniter.php | 4 +- system/core/Input.php | 7 ++- system/core/Utf8.php | 10 ++-- tests/codeigniter/core/Input_test.php | 4 +- tests/codeigniter/core/URI_test.php | 9 ++++ tests/codeigniter/core/Utf8_test.php | 53 +++++++++++----------- tests/codeigniter/helpers/cookie_helper_test.php | 5 +- tests/codeigniter/helpers/text_helper_test.php | 23 ++++++---- tests/codeigniter/helpers/url_helper_test.php | 12 ++++- .../codeigniter/libraries/Form_validation_test.php | 4 +- tests/mocks/ci_testcase.php | 4 +- tests/mocks/core/input.php | 8 ++-- tests/mocks/core/utf8.php | 19 -------- 13 files changed, 79 insertions(+), 83 deletions(-) delete mode 100644 tests/mocks/core/utf8.php diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index dfc90af2a..410b9613b 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -243,7 +243,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * Instantiate the UTF-8 class * ------------------------------------------------------ */ - $UNI =& load_class('Utf8', 'core'); + $UNI =& load_class('Utf8', 'core', $charset); /* * ------------------------------------------------------ @@ -288,7 +288,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * Load the Input class and sanitize globals * ------------------------------------------------------ */ - $IN =& load_class('Input', 'core'); + $IN =& load_class('Input', 'core', $SEC); /* * ------------------------------------------------------ diff --git a/system/core/Input.php b/system/core/Input.php index aefc3b7d8..d881e253d 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -113,11 +113,10 @@ class CI_Input { * * @return void */ - public function __construct() + public function __construct(CI_Security &$security) { - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - - $this->security =& load_class('Security', 'core'); + $this->_enable_csrf = (config_item('csrf_protection') === TRUE); + $this->security = $security; // CSRF Protection check if ($this->_enable_csrf === TRUE && ! is_cli()) diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 93c611675..042ca4316 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -57,13 +57,13 @@ class CI_Utf8 { * * @return void */ - public function __construct() + public function __construct($charset) { if ( - defined('PREG_BAD_UTF8_ERROR') // PCRE must support UTF-8 - && (ICONV_ENABLED === TRUE OR MB_ENABLED === TRUE) // iconv or mbstring must be installed - && strtoupper(config_item('charset')) === 'UTF-8' // Application charset must be UTF-8 - ) + defined('PREG_BAD_UTF8_ERROR') // PCRE must support UTF-8 + && (ICONV_ENABLED === TRUE OR MB_ENABLED === TRUE) // iconv or mbstring must be installed + && $charset === 'UTF-8' // Application charset must be UTF-8 + ) { define('UTF8_ENABLED', TRUE); log_message('info', 'UTF-8 Support Enabled'); diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index e1f4011b5..78b659691 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -15,9 +15,7 @@ class Input_test extends CI_TestCase { $security = new Mock_Core_Security(); $this->ci_set_config('charset', 'UTF-8'); - $utf8 = new Mock_Core_Utf8(); - - $this->input = new Mock_Core_Input($security, $utf8); + $this->input = new Mock_Core_Input($security); } // -------------------------------------------------------------------- diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php index 42dff3639..f862c666e 100644 --- a/tests/codeigniter/core/URI_test.php +++ b/tests/codeigniter/core/URI_test.php @@ -119,8 +119,13 @@ class URI_test extends CI_TestCase { */ // -------------------------------------------------------------------- + /** + * @runInSeparateProcess + */ public function test_filter_uri_passing() { + define('UTF8_ENABLED', FALSE); + $this->uri->_set_permitted_uri_chars('a-z 0-9~%.:_\-'); $str = 'abc01239~%.:_-'; @@ -129,8 +134,12 @@ class URI_test extends CI_TestCase { // -------------------------------------------------------------------- + /** + * @runInSeparateProcess + */ public function test_filter_uri_throws_error() { + define('UTF8_ENABLED', FALSE); $this->setExpectedException('RuntimeException'); $this->uri->config->set_item('enable_query_strings', FALSE); diff --git a/tests/codeigniter/core/Utf8_test.php b/tests/codeigniter/core/Utf8_test.php index 7e6ffd930..f40bb9848 100644 --- a/tests/codeigniter/core/Utf8_test.php +++ b/tests/codeigniter/core/Utf8_test.php @@ -1,31 +1,27 @@ ci_set_config('charset', 'UTF-8'); - $this->utf8 = new Mock_Core_Utf8(); - $this->ci_instance_var('utf8', $this->utf8); + if ( ! defined('PREG_BAD_UTF8_ERROR') OR (ICONV_ENABLED === FALSE && MB_ENABLED === FALSE)) + { + return $this->markTestSkipped('PCRE_UTF8 and/or both ext/mbstring & ext/iconv are unavailable'); + } + + new CI_Utf8('UTF-8'); + $this->assertTrue(UTF8_ENABLED); } // -------------------------------------------------------------------- - /** - * __construct() test - * - * @covers CI_Utf8::__construct - */ - public function test___construct() + public function test__constructUTF8_DISABLED() { - if (defined('PREG_BAD_UTF8_ERROR') && (ICONV_ENABLED === TRUE OR MB_ENABLED === TRUE) && strtoupper(config_item('charset')) === 'UTF-8') - { - $this->assertTrue(UTF8_ENABLED); - } - else - { - $this->assertFalse(UTF8_ENABLED); - } + new CI_Utf8('WINDOWS-1251'); + $this->assertFalse(UTF8_ENABLED); } // -------------------------------------------------------------------- @@ -37,8 +33,9 @@ class Utf8_test extends CI_TestCase { */ public function test_is_ascii() { - $this->assertTrue($this->utf8->is_ascii('foo bar')); - $this->assertFalse($this->utf8->is_ascii('теŃŃ‚')); + $utf8 = new CI_Utf8('UTF-8'); + $this->assertTrue($utf8->is_ascii('foo bar')); + $this->assertFalse($utf8->is_ascii('теŃŃ‚')); } // -------------------------------------------------------------------- @@ -51,21 +48,22 @@ class Utf8_test extends CI_TestCase { */ public function test_clean_string() { - $this->assertEquals('foo bar', $this->utf8->clean_string('foo bar')); + $utf8 = new CI_Utf8('UTF-8'); + $this->assertEquals('foo bar', $utf8->clean_string('foo bar')); $illegal_utf8 = "\xc0теŃŃ‚"; if (MB_ENABLED) { - $this->assertEquals('теŃŃ‚', $this->utf8->clean_string($illegal_utf8)); + $this->assertEquals('теŃŃ‚', $utf8->clean_string($illegal_utf8)); } elseif (ICONV_ENABLED) { // This is a known issue, iconv doesn't always work with //IGNORE - $this->assertTrue(in_array($this->utf8->clean_string($illegal_utf8), array('теŃŃ‚', ''), TRUE)); + $this->assertTrue(in_array($utf8->clean_string($illegal_utf8), array('теŃŃ‚', ''), TRUE)); } else { - $this->assertEquals($illegal_utf8, $this->utf8->clean_string($illegal_utf8)); + $this->assertEquals($illegal_utf8, $utf8->clean_string($illegal_utf8)); } } @@ -78,14 +76,15 @@ class Utf8_test extends CI_TestCase { */ public function test_convert_to_utf8() { + $utf8 = new CI_Utf8('UTF-8'); if (MB_ENABLED OR ICONV_ENABLED) { - $this->assertEquals('теŃŃ‚', $this->utf8->convert_to_utf8('ňĺńň', 'WINDOWS-1251')); + $this->assertEquals('теŃŃ‚', $utf8->convert_to_utf8('ňĺńň', 'WINDOWS-1251')); } else { - $this->assertFalse($this->utf8->convert_to_utf8('ňĺńň', 'WINDOWS-1251')); + $this->assertFalse($utf8->convert_to_utf8('ňĺńň', 'WINDOWS-1251')); } } -} \ No newline at end of file +} diff --git a/tests/codeigniter/helpers/cookie_helper_test.php b/tests/codeigniter/helpers/cookie_helper_test.php index fba68f20f..1fbb57f67 100644 --- a/tests/codeigniter/helpers/cookie_helper_test.php +++ b/tests/codeigniter/helpers/cookie_helper_test.php @@ -29,9 +29,8 @@ class Cookie_helper_test extends CI_TestCase { $_COOKIE['foo'] = 'bar'; $security = new Mock_Core_Security(); - $utf8 = new Mock_Core_Utf8(); $input_cls = $this->ci_core_class('input'); - $this->ci_instance_var('input', new Mock_Core_Input($security, $utf8)); + $this->ci_instance_var('input', new Mock_Core_Input($security)); $this->assertEquals('bar', get_cookie('foo', FALSE)); $this->assertEquals('bar', get_cookie('foo', TRUE)); @@ -56,4 +55,4 @@ class Cookie_helper_test extends CI_TestCase { $this->markTestSkipped('Need to find a way to overcome a headers already set exception'); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/helpers/text_helper_test.php b/tests/codeigniter/helpers/text_helper_test.php index 7a7dc0a12..36465f203 100644 --- a/tests/codeigniter/helpers/text_helper_test.php +++ b/tests/codeigniter/helpers/text_helper_test.php @@ -2,21 +2,19 @@ class Text_helper_test extends CI_TestCase { - private $_long_string; - public function set_up() { $this->helper('text'); - - $this->_long_string = 'Once upon a time, a framework had no tests. It sad. So some nice people began to write tests. The more time that went on, the happier it became. Everyone was happy.'; } // ------------------------------------------------------------------------ public function test_word_limiter() { - $this->assertEquals('Once upon a time,…', word_limiter($this->_long_string, 4)); - $this->assertEquals('Once upon a time,…', word_limiter($this->_long_string, 4, '…')); + $long_string = 'Once upon a time, a framework had no tests. It sad. So some nice people began to write tests. The more time that went on, the happier it became. Everyone was happy.'; + + $this->assertEquals('Once upon a time,…', word_limiter($long_string, 4)); + $this->assertEquals('Once upon a time,…', word_limiter($long_string, 4, '…')); $this->assertEquals('', word_limiter('', 4)); } @@ -24,8 +22,10 @@ class Text_helper_test extends CI_TestCase { public function test_character_limiter() { - $this->assertEquals('Once upon a time, a…', character_limiter($this->_long_string, 20)); - $this->assertEquals('Once upon a time, a…', character_limiter($this->_long_string, 20, '…')); + $long_string = 'Once upon a time, a framework had no tests. It sad. So some nice people began to write tests. The more time that went on, the happier it became. Everyone was happy.'; + + $this->assertEquals('Once upon a time, a…', character_limiter($long_string, 20)); + $this->assertEquals('Once upon a time, a…', character_limiter($long_string, 20, '…')); $this->assertEquals('Short', character_limiter('Short', 20)); $this->assertEquals('Short', character_limiter('Short', 5)); } @@ -103,8 +103,13 @@ class Text_helper_test extends CI_TestCase { // ------------------------------------------------------------------------ + /** + * @runInSeparateProcess + */ public function test_highlight_phrase() { + define('UTF8_ENABLED', FALSE); + $strs = array( 'this is a phrase' => 'this is a phrase', 'this is another' => 'this is another', @@ -171,4 +176,4 @@ class Text_helper_test extends CI_TestCase { $this->assertEquals(strpos(word_wrap($string), "\n"), 73); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/helpers/url_helper_test.php b/tests/codeigniter/helpers/url_helper_test.php index 24823a634..c5b0f80b7 100644 --- a/tests/codeigniter/helpers/url_helper_test.php +++ b/tests/codeigniter/helpers/url_helper_test.php @@ -7,8 +7,13 @@ class Url_helper_test extends CI_TestCase { $this->helper('url'); } + /** + * @runInSeparateProcess + */ public function test_url_title() { + define('UTF8_ENABLED', FALSE); + $words = array( 'foo bar /' => 'foo-bar', '\ testing 12' => 'testing-12' @@ -22,8 +27,13 @@ class Url_helper_test extends CI_TestCase { // -------------------------------------------------------------------- + /** + * @runInSeparateProcess + */ public function test_url_title_extra_dashes() { + define('UTF8_ENABLED', FALSE); + $words = array( '_foo bar_' => 'foo_bar', '_What\'s wrong with CSS?_' => 'Whats_wrong_with_CSS' @@ -76,4 +86,4 @@ class Url_helper_test extends CI_TestCase { } } -} \ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 4be080f90..5b7830dd8 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -13,10 +13,8 @@ class Form_validation_test extends CI_TestCase { // Same applies for lang $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); - $this->ci_set_config('charset', 'UTF-8'); - $utf8 = new Mock_Core_Utf8(); $security = new Mock_Core_Security(); - $input = new Mock_Core_Input($security, $utf8); + $input = new Mock_Core_Input($security); $this->ci_instance_var('lang', $lang); $this->ci_instance_var('load', $loader); diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php index a2c37b92e..b320aab74 100644 --- a/tests/mocks/ci_testcase.php +++ b/tests/mocks/ci_testcase.php @@ -24,9 +24,9 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { // -------------------------------------------------------------------- - public function __construct() + public function __construct($name = null, array $data = [], $dataName = '') { - parent::__construct(); + parent::__construct($name, $data, $dataName); $this->ci_instance = new stdClass(); } diff --git a/tests/mocks/core/input.php b/tests/mocks/core/input.php index 4d217a252..6f6a91365 100644 --- a/tests/mocks/core/input.php +++ b/tests/mocks/core/input.php @@ -9,12 +9,10 @@ class Mock_Core_Input extends CI_Input { * * @covers CI_Input::__construct() */ - public function __construct($security, $utf8) + public function __construct($security) { - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - - // Assign Security and Utf8 classes - $this->security = $security; + $this->_enable_csrf = (config_item('csrf_protection') === TRUE); + $this->security = $security; } public function fetch_from_array($array, $index = '', $xss_clean = FALSE) diff --git a/tests/mocks/core/utf8.php b/tests/mocks/core/utf8.php deleted file mode 100644 index 3a6282e1d..000000000 --- a/tests/mocks/core/utf8.php +++ /dev/null @@ -1,19 +0,0 @@ - Date: Wed, 14 Dec 2016 18:41:52 +0200 Subject: Move csrf_verify() call out of CI_Input --- system/core/CodeIgniter.php | 2 +- system/core/Input.php | 20 +---------- system/core/Security.php | 9 ++--- tests/codeigniter/core/Input_test.php | 40 ++++++++++++---------- tests/codeigniter/core/Security_test.php | 5 +-- tests/codeigniter/helpers/cookie_helper_test.php | 4 +-- tests/codeigniter/helpers/security_helper_test.php | 2 +- .../codeigniter/libraries/Form_validation_test.php | 4 +-- tests/codeigniter/libraries/Session_test.php | 5 +-- tests/codeigniter/libraries/Upload_test.php | 2 +- tests/mocks/core/input.php | 30 ---------------- 11 files changed, 41 insertions(+), 82 deletions(-) delete mode 100644 tests/mocks/core/input.php diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 410b9613b..977d1427d 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -281,7 +281,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * Load the security class for xss and csrf support * ----------------------------------------------------- */ - $SEC =& load_class('Security', 'core'); + $SEC =& load_class('Security', 'core', $charset); /* * ------------------------------------------------------ diff --git a/system/core/Input.php b/system/core/Input.php index d881e253d..ab60e45c3 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -57,16 +57,6 @@ class CI_Input { */ protected $ip_address = FALSE; - /** - * Enable CSRF flag - * - * Enables a CSRF cookie token to be set. - * Set automatically based on config setting. - * - * @var bool - */ - protected $_enable_csrf = FALSE; - /** * List of all HTTP request headers * @@ -115,15 +105,7 @@ class CI_Input { */ public function __construct(CI_Security &$security) { - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - $this->security = $security; - - // CSRF Protection check - if ($this->_enable_csrf === TRUE && ! is_cli()) - { - $this->security->csrf_verify(); - } - + $this->security = $security; log_message('info', 'Input Class Initialized'); } diff --git a/system/core/Security.php b/system/core/Security.php index a80b52fd1..fb0ca3d4e 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -167,10 +167,12 @@ class CI_Security { * * @return void */ - public function __construct() + public function __construct($charset) { + $this->charset = $charset; + // Is CSRF protection enabled? - if (config_item('csrf_protection')) + if (config_item('csrf_protection') && ! is_cli()) { // CSRF config foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key) @@ -189,10 +191,9 @@ class CI_Security { // Set the CSRF hash $this->_csrf_set_hash(); + $this->csrf_verify(); } - $this->charset = strtoupper(config_item('charset')); - log_message('info', 'Security Class Initialized'); } diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index 78b659691..e068a84be 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -12,10 +12,8 @@ class Input_test extends CI_TestCase { $this->ci_set_config('global_xss_filtering', FALSE); $this->ci_set_config('csrf_protection', FALSE); - $security = new Mock_Core_Security(); - - $this->ci_set_config('charset', 'UTF-8'); - $this->input = new Mock_Core_Input($security); + $security = new Mock_Core_Security('UTF-8'); + $this->input = new CI_Input($security); } // -------------------------------------------------------------------- @@ -120,14 +118,17 @@ class Input_test extends CI_TestCase { public function test_fetch_from_array() { + $reflection = new ReflectionMethod($this->input, '_fetch_from_array'); + $reflection->setAccessible(TRUE); + $data = array( 'foo' => 'bar', 'harm' => 'Hello, i try to your site', ); - $foo = $this->input->fetch_from_array($data, 'foo'); - $harm = $this->input->fetch_from_array($data, 'harm'); - $harmless = $this->input->fetch_from_array($data, 'harm', TRUE); + $foo = $reflection->invokeArgs($this->input, [&$data, 'foo']); + $harm = $reflection->invokeArgs($this->input, [&$data, 'harm']); + $harmless = $reflection->invokeArgs($this->input, [&$data, 'harm', TRUE]); $this->assertEquals('bar', $foo); $this->assertEquals("Hello, i try to your site", $harm); @@ -215,57 +216,60 @@ class Input_test extends CI_TestCase { public function test_ip_address() { - $this->input->ip_address = '127.0.0.1'; + $reflection = new ReflectionProperty($this->input, 'ip_address'); + $reflection->setAccessible(TRUE); + + $reflection->setValue($this->input, '127.0.0.1'); $this->assertEquals('127.0.0.1', $this->input->ip_address()); // 127.0.0.1 is set in our Bootstrap file - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $this->assertEquals('127.0.0.1', $this->input->ip_address()); // Invalid $_SERVER['REMOTE_ADDR'] = 'invalid_ip_address'; - $this->input->ip_address = FALSE; // reset cached value + $reflection->setValue($this->input, FALSE); // reset cached value $this->assertEquals('0.0.0.0', $this->input->ip_address()); $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // Proxy_ips tests - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $this->ci_set_config('proxy_ips', '127.0.0.3, 127.0.0.4, 127.0.0.2'); $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.2'; $this->assertEquals('127.0.0.1', $this->input->ip_address()); // Invalid spoof - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $this->ci_set_config('proxy_ips', 'invalid_ip_address'); $_SERVER['HTTP_CLIENT_IP'] = 'invalid_ip_address'; $this->assertEquals('127.0.0.1', $this->input->ip_address()); - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $this->ci_set_config('proxy_ips', 'http://foo/bar/baz, 127.0.0.1/1'); $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.1'; $this->assertEquals('127.0.0.1', $this->input->ip_address()); - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $this->ci_set_config('proxy_ips', 'http://foo/bar/baz, 127.0.0.2'); $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.2'; $_SERVER['REMOTE_ADDR'] = '127.0.0.2'; $this->assertEquals('127.0.0.2', $this->input->ip_address()); - //IPv6 - $this->input->ip_address = FALSE; + // IPv6 + $reflection->setValue($this->input, FALSE); $this->ci_set_config('proxy_ips', 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329/1, FE80:0000:0000:0000:0202:B3FF:FE1E:8300/2'); $_SERVER['HTTP_CLIENT_IP'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8300'; $_SERVER['REMOTE_ADDR'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329'; $this->assertEquals('FE80:0000:0000:0000:0202:B3FF:FE1E:8300', $this->input->ip_address()); - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $this->ci_set_config('proxy_ips', '0::/32'); $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.7'; $_SERVER['REMOTE_ADDR'] = '0000:0000:0000:0000:0000:0000:0000:0001'; $this->assertEquals('127.0.0.7', $this->input->ip_address()); - $this->input->ip_address = FALSE; + $reflection->setValue($this->input, FALSE); $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality } diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index cbf0285ec..2e1127f87 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -12,7 +12,8 @@ class Security_test extends CI_TestCase { $this->ci_set_config('csrf_token_name', 'ci_csrf_token'); $this->ci_set_config('csrf_cookie_name', 'ci_csrf_cookie'); - $this->security = new Mock_Core_Security(); + $_SERVER['REQUEST_METHOD'] = 'GET'; + $this->security = new Mock_Core_Security('UTF-8'); } // -------------------------------------------------------------------- @@ -341,7 +342,7 @@ class Security_test extends CI_TestCase { // leave csrf_cookie_name as blank to test _csrf_set_hash function $this->ci_set_config('csrf_cookie_name', ''); - $this->security = new Mock_Core_Security(); + $this->security = new Mock_Core_Security('UTF-8'); $this->assertNotEmpty($this->security->get_csrf_hash()); } diff --git a/tests/codeigniter/helpers/cookie_helper_test.php b/tests/codeigniter/helpers/cookie_helper_test.php index 1fbb57f67..e984be21c 100644 --- a/tests/codeigniter/helpers/cookie_helper_test.php +++ b/tests/codeigniter/helpers/cookie_helper_test.php @@ -28,9 +28,9 @@ class Cookie_helper_test extends CI_TestCase { { $_COOKIE['foo'] = 'bar'; - $security = new Mock_Core_Security(); + $security = new Mock_Core_Security('UTF-8'); $input_cls = $this->ci_core_class('input'); - $this->ci_instance_var('input', new Mock_Core_Input($security)); + $this->ci_instance_var('input', new CI_Input($security)); $this->assertEquals('bar', get_cookie('foo', FALSE)); $this->assertEquals('bar', get_cookie('foo', TRUE)); diff --git a/tests/codeigniter/helpers/security_helper_test.php b/tests/codeigniter/helpers/security_helper_test.php index ab05d57ba..d7e3f4734 100644 --- a/tests/codeigniter/helpers/security_helper_test.php +++ b/tests/codeigniter/helpers/security_helper_test.php @@ -6,7 +6,7 @@ class Security_helper_tests extends CI_TestCase { { $this->helper('security'); $obj = new stdClass; - $obj->security = new Mock_Core_Security(); + $obj->security = new Mock_Core_Security('UTF-8'); $this->ci_instance($obj); } diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 5b7830dd8..edbe9da4a 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -13,8 +13,8 @@ class Form_validation_test extends CI_TestCase { // Same applies for lang $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); - $security = new Mock_Core_Security(); - $input = new Mock_Core_Input($security); + $security = new Mock_Core_Security('UTF-8'); + $input = new CI_Input($security); $this->ci_instance_var('lang', $lang); $this->ci_instance_var('load', $loader); diff --git a/tests/codeigniter/libraries/Session_test.php b/tests/codeigniter/libraries/Session_test.php index 76a4fcc98..840df076a 100644 --- a/tests/codeigniter/libraries/Session_test.php +++ b/tests/codeigniter/libraries/Session_test.php @@ -37,7 +37,8 @@ return; $ci = $this->ci_instance(); $ldr = $this->ci_core_class('load'); $ci->load = new $ldr(); - $ci->input = new Mock_Core_Input(NULL, NULL); + $security = new Mock_Core_Security('UTF-8'); + $ci->input = new CI_Input($security); // Make sure string helper is available $this->ci_vfs_clone('system/helpers/string_helper.php'); @@ -437,4 +438,4 @@ return; $this->assertNull($this->session->native->userdata($key)); } -} \ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Upload_test.php b/tests/codeigniter/libraries/Upload_test.php index 8bac597b3..74a7d2c22 100644 --- a/tests/codeigniter/libraries/Upload_test.php +++ b/tests/codeigniter/libraries/Upload_test.php @@ -6,7 +6,7 @@ class Upload_test extends CI_TestCase { { $ci = $this->ci_instance(); $ci->upload = new CI_Upload(); - $ci->security = new Mock_Core_Security(); + $ci->security = new Mock_Core_Security('UTF-8'); $ci->lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load', 'line'))->getMock(); $ci->lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->upload = $ci->upload; diff --git a/tests/mocks/core/input.php b/tests/mocks/core/input.php deleted file mode 100644 index 6f6a91365..000000000 --- a/tests/mocks/core/input.php +++ /dev/null @@ -1,30 +0,0 @@ -_enable_csrf = (config_item('csrf_protection') === TRUE); - $this->security = $security; - } - - public function fetch_from_array($array, $index = '', $xss_clean = FALSE) - { - return parent::_fetch_from_array($array, $index, $xss_clean); - } - - public function __set($name, $value) - { - if ($name === 'ip_address') - { - $this->ip_address = $value; - } - } -} -- cgit v1.2.3-24-g4f1b From 8d369209b9c1db8cf3fe06bba54441ca84a8d6e4 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Thu, 15 Dec 2016 23:17:16 +0100 Subject: Small code simplification in character_limiter() --- system/helpers/text_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 4f9210f2d..e54ed04e1 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -102,7 +102,7 @@ if ( ! function_exists('character_limiter')) } // a bit complicated, but faster than preg_replace with \s+ - $str = preg_replace('/ {2,}/', ' ', str_replace(array("\r", "\n", "\t", "\x0B", "\x0C"), ' ', $str)); + $str = preg_replace('/ {2,}/', ' ', str_replace(array("\r", "\n", "\t", "\v", "\f"), ' ', $str)); if (mb_strlen($str) <= $n) { -- cgit v1.2.3-24-g4f1b From 468d16a24f2ecd07e922e158f541e9f6831636f2 Mon Sep 17 00:00:00 2001 From: Tomaz Lovrec Date: Fri, 16 Dec 2016 12:00:19 +0000 Subject: Remove needless constructor in model documentation PHP will execute the parent constructor regardless if a constructor method is defined in the child class or not. Defining an empty constructor just to call the parents constructor can be considered bad practice. --- user_guide_src/source/general/models.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 1cfe736de..08e9f5b30 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -22,12 +22,6 @@ model class might look like:: public $content; public $date; - public function __construct() - { - // Call the CI_Model constructor - parent::__construct(); - } - public function get_last_ten_entries() { $query = $this->db->get('entries', 10); -- cgit v1.2.3-24-g4f1b From 1398b72b32e3fb9628be2e09ffe97bea88565868 Mon Sep 17 00:00:00 2001 From: Tomaz Lovrec Date: Fri, 16 Dec 2016 12:02:12 +0000 Subject: Add constructor comments to match controller docs Empty constructors are pointless and bad practice, but removing them from this part of the documentation makes it less readable, makes less of a point, and would be quite frankly weird. Added a comment that suggests that further user code should be put there, like it is in the controller documentation --- user_guide_src/source/general/core_classes.rst | 1 + user_guide_src/source/general/models.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/user_guide_src/source/general/core_classes.rst b/user_guide_src/source/general/core_classes.rst index 07c0b00ba..79f73ef06 100644 --- a/user_guide_src/source/general/core_classes.rst +++ b/user_guide_src/source/general/core_classes.rst @@ -101,6 +101,7 @@ your new class in your application controller's constructors. public function __construct() { parent::__construct(); + // Your own constructor code } public function index() diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 08e9f5b30..eb842e927 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -70,6 +70,7 @@ The basic prototype for a model class is this:: public function __construct() { parent::__construct(); + // Your own constructor code } } @@ -85,6 +86,7 @@ The file name must match the class name. For example, if this is your class:: public function __construct() { parent::__construct(); + // Your own constructor code } } -- cgit v1.2.3-24-g4f1b From 0c48f3982196df8171bd6f17f2660077168a3864 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Dec 2016 14:52:54 +0200 Subject: Merge pull request #4947 from slax0rr/develop [ci skip] Remove needless constructor in model general topics documentation --- user_guide_src/source/general/core_classes.rst | 1 + user_guide_src/source/general/models.rst | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/user_guide_src/source/general/core_classes.rst b/user_guide_src/source/general/core_classes.rst index 07c0b00ba..79f73ef06 100644 --- a/user_guide_src/source/general/core_classes.rst +++ b/user_guide_src/source/general/core_classes.rst @@ -101,6 +101,7 @@ your new class in your application controller's constructors. public function __construct() { parent::__construct(); + // Your own constructor code } public function index() diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 1cfe736de..eb842e927 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -22,12 +22,6 @@ model class might look like:: public $content; public $date; - public function __construct() - { - // Call the CI_Model constructor - parent::__construct(); - } - public function get_last_ten_entries() { $query = $this->db->get('entries', 10); @@ -76,6 +70,7 @@ The basic prototype for a model class is this:: public function __construct() { parent::__construct(); + // Your own constructor code } } @@ -91,6 +86,7 @@ The file name must match the class name. For example, if this is your class:: public function __construct() { parent::__construct(); + // Your own constructor code } } -- cgit v1.2.3-24-g4f1b From 2b26ccfe25708e23d5d87b56d6984c09157df2b5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Dec 2016 12:02:00 +0200 Subject: Merge pull request #4945 from vlakoff/text_helper Small code simplification in character_limiter() --- system/helpers/text_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 4f9210f2d..e54ed04e1 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -102,7 +102,7 @@ if ( ! function_exists('character_limiter')) } // a bit complicated, but faster than preg_replace with \s+ - $str = preg_replace('/ {2,}/', ' ', str_replace(array("\r", "\n", "\t", "\x0B", "\x0C"), ' ', $str)); + $str = preg_replace('/ {2,}/', ' ', str_replace(array("\r", "\n", "\t", "\v", "\f"), ' ', $str)); if (mb_strlen($str) <= $n) { -- cgit v1.2.3-24-g4f1b From 62adbbd6cb2bc56258817efbc8f201250de6b64d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Dec 2016 15:48:14 +0200 Subject: [ci skip] Remove a function_exists() call from CI_Image_lib We use this function elsewhere without checking for existence; nobody has complained --- system/libraries/Image_lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 475649c46..884d0dcec 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1194,7 +1194,7 @@ class CI_Image_lib { } // Build the finalized image - if ($wm_img_type === 3 && function_exists('imagealphablending')) + if ($wm_img_type === 3) { @imagealphablending($src_img, TRUE); } -- cgit v1.2.3-24-g4f1b From a927ae4ee86fb6727ac340e7b96aee6f82b5542b Mon Sep 17 00:00:00 2001 From: Alex Fang Date: Thu, 22 Dec 2016 12:49:45 +0800 Subject: Fix bug: DB_query_builder do not add parenthesis for cached group_by --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b88ec956a..6d165fc79 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1402,7 +1402,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_orderby = NULL; } - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby)) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR in_array('groupby', $this->qb_cache_exists)) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); -- cgit v1.2.3-24-g4f1b From 8112b5341ec02d38e448e767ab95196df9a84a74 Mon Sep 17 00:00:00 2001 From: Alex Fang Date: Fri, 23 Dec 2016 10:38:11 +0800 Subject: 1. Updated last comit with comment for https://github.com/bcit-ci/CodeIgniter/pull/4955 --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 6d165fc79..48c857125 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1402,7 +1402,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_orderby = NULL; } - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR in_array('groupby', $this->qb_cache_exists)) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby)) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); -- cgit v1.2.3-24-g4f1b From fced25f5728ce81fe810216fcaa4ccec7523f6c9 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 31 Dec 2016 08:46:18 -0800 Subject: Update copyright data to 2017 --- .gitignore | 1 + index.php | 4 ++-- license.txt | 2 +- system/core/Benchmark.php | 4 ++-- system/core/CodeIgniter.php | 4 ++-- system/core/Common.php | 4 ++-- system/core/Config.php | 4 ++-- system/core/Controller.php | 4 ++-- system/core/Exceptions.php | 4 ++-- system/core/Hooks.php | 4 ++-- system/core/Input.php | 4 ++-- system/core/Lang.php | 4 ++-- system/core/Loader.php | 4 ++-- system/core/Log.php | 4 ++-- system/core/Model.php | 4 ++-- system/core/Output.php | 4 ++-- system/core/Router.php | 4 ++-- system/core/Security.php | 4 ++-- system/core/URI.php | 4 ++-- system/core/Utf8.php | 4 ++-- system/core/compat/hash.php | 4 ++-- system/core/compat/mbstring.php | 4 ++-- system/core/compat/password.php | 4 ++-- system/core/compat/standard.php | 4 ++-- system/database/DB.php | 4 ++-- system/database/DB_cache.php | 4 ++-- system/database/DB_driver.php | 4 ++-- system/database/DB_forge.php | 4 ++-- system/database/DB_query_builder.php | 4 ++-- system/database/DB_result.php | 4 ++-- system/database/DB_utility.php | 4 ++-- system/database/drivers/cubrid/cubrid_driver.php | 4 ++-- system/database/drivers/cubrid/cubrid_forge.php | 4 ++-- system/database/drivers/cubrid/cubrid_result.php | 4 ++-- system/database/drivers/cubrid/cubrid_utility.php | 4 ++-- system/database/drivers/ibase/ibase_driver.php | 4 ++-- system/database/drivers/ibase/ibase_forge.php | 4 ++-- system/database/drivers/ibase/ibase_result.php | 4 ++-- system/database/drivers/ibase/ibase_utility.php | 4 ++-- system/database/drivers/mssql/mssql_driver.php | 4 ++-- system/database/drivers/mssql/mssql_forge.php | 4 ++-- system/database/drivers/mssql/mssql_result.php | 4 ++-- system/database/drivers/mssql/mssql_utility.php | 4 ++-- system/database/drivers/mysql/mysql_driver.php | 4 ++-- system/database/drivers/mysql/mysql_forge.php | 4 ++-- system/database/drivers/mysql/mysql_result.php | 4 ++-- system/database/drivers/mysql/mysql_utility.php | 4 ++-- system/database/drivers/mysqli/mysqli_driver.php | 4 ++-- system/database/drivers/mysqli/mysqli_forge.php | 4 ++-- system/database/drivers/mysqli/mysqli_result.php | 4 ++-- system/database/drivers/mysqli/mysqli_utility.php | 4 ++-- system/database/drivers/oci8/oci8_driver.php | 4 ++-- system/database/drivers/oci8/oci8_forge.php | 4 ++-- system/database/drivers/oci8/oci8_result.php | 4 ++-- system/database/drivers/oci8/oci8_utility.php | 4 ++-- system/database/drivers/odbc/odbc_driver.php | 4 ++-- system/database/drivers/odbc/odbc_forge.php | 4 ++-- system/database/drivers/odbc/odbc_result.php | 4 ++-- system/database/drivers/odbc/odbc_utility.php | 4 ++-- system/database/drivers/pdo/pdo_driver.php | 4 ++-- system/database/drivers/pdo/pdo_forge.php | 4 ++-- system/database/drivers/pdo/pdo_result.php | 4 ++-- system/database/drivers/pdo/pdo_utility.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_informix_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_informix_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php | 4 ++-- system/database/drivers/postgre/postgre_driver.php | 4 ++-- system/database/drivers/postgre/postgre_forge.php | 4 ++-- system/database/drivers/postgre/postgre_result.php | 4 ++-- system/database/drivers/postgre/postgre_utility.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_driver.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_forge.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_result.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_utility.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_driver.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_forge.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_result.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_utility.php | 4 ++-- system/helpers/array_helper.php | 4 ++-- system/helpers/captcha_helper.php | 4 ++-- system/helpers/cookie_helper.php | 4 ++-- system/helpers/date_helper.php | 4 ++-- system/helpers/directory_helper.php | 4 ++-- system/helpers/download_helper.php | 4 ++-- system/helpers/file_helper.php | 4 ++-- system/helpers/form_helper.php | 4 ++-- system/helpers/html_helper.php | 4 ++-- system/helpers/inflector_helper.php | 4 ++-- system/helpers/language_helper.php | 4 ++-- system/helpers/number_helper.php | 4 ++-- system/helpers/path_helper.php | 4 ++-- system/helpers/security_helper.php | 4 ++-- system/helpers/string_helper.php | 4 ++-- system/helpers/text_helper.php | 4 ++-- system/helpers/typography_helper.php | 4 ++-- system/helpers/url_helper.php | 4 ++-- system/helpers/xml_helper.php | 4 ++-- system/language/english/calendar_lang.php | 4 ++-- system/language/english/date_lang.php | 4 ++-- system/language/english/db_lang.php | 4 ++-- system/language/english/email_lang.php | 4 ++-- system/language/english/form_validation_lang.php | 4 ++-- system/language/english/ftp_lang.php | 4 ++-- system/language/english/imglib_lang.php | 4 ++-- system/language/english/migration_lang.php | 4 ++-- system/language/english/number_lang.php | 4 ++-- system/language/english/pagination_lang.php | 4 ++-- system/language/english/profiler_lang.php | 4 ++-- system/language/english/unit_test_lang.php | 4 ++-- system/language/english/upload_lang.php | 4 ++-- system/libraries/Cache/Cache.php | 4 ++-- system/libraries/Cache/drivers/Cache_apc.php | 4 ++-- system/libraries/Cache/drivers/Cache_dummy.php | 4 ++-- system/libraries/Cache/drivers/Cache_file.php | 4 ++-- system/libraries/Cache/drivers/Cache_memcached.php | 4 ++-- system/libraries/Cache/drivers/Cache_redis.php | 4 ++-- system/libraries/Cache/drivers/Cache_wincache.php | 4 ++-- system/libraries/Calendar.php | 4 ++-- system/libraries/Driver.php | 4 ++-- system/libraries/Email.php | 4 ++-- system/libraries/Encrypt.php | 4 ++-- system/libraries/Encryption.php | 4 ++-- system/libraries/Form_validation.php | 4 ++-- system/libraries/Ftp.php | 4 ++-- system/libraries/Image_lib.php | 4 ++-- system/libraries/Migration.php | 4 ++-- system/libraries/Pagination.php | 4 ++-- system/libraries/Parser.php | 4 ++-- system/libraries/Profiler.php | 4 ++-- system/libraries/Session/Session.php | 4 ++-- system/libraries/Session/Session_driver.php | 4 ++-- system/libraries/Session/drivers/Session_database_driver.php | 4 ++-- system/libraries/Session/drivers/Session_files_driver.php | 4 ++-- system/libraries/Session/drivers/Session_memcached_driver.php | 4 ++-- system/libraries/Session/drivers/Session_redis_driver.php | 4 ++-- system/libraries/Table.php | 4 ++-- system/libraries/Trackback.php | 4 ++-- system/libraries/Typography.php | 4 ++-- system/libraries/Unit_test.php | 4 ++-- system/libraries/Upload.php | 4 ++-- system/libraries/User_agent.php | 4 ++-- system/libraries/Xmlrpc.php | 4 ++-- system/libraries/Xmlrpcs.php | 4 ++-- system/libraries/Zip.php | 4 ++-- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/license.rst | 2 +- 167 files changed, 331 insertions(+), 330 deletions(-) diff --git a/.gitignore b/.gitignore index 5982f9bad..97f1d3159 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ user_guide_src/cilexer/pycilexer.egg-info/* *.stTheme.cache *.sublime-workspace *.sublime-project +/tests/tests/ \ No newline at end of file diff --git a/index.php b/index.php index 8015672f3..b4e1fb146 100755 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/license.txt b/license.txt index 388eee337..934e126ff 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ 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 diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index b1d74f78f..b3ac79c62 100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 977d1427d..8eed52eb7 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Common.php b/system/core/Common.php index 48eb233c2..d3ffaf0cd 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Config.php b/system/core/Config.php index 6704a0a7e..d7236df1f 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Controller.php b/system/core/Controller.php index 83b3df26c..59a916734 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 4e10f2831..47d153f49 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 856795cba..f2d6f21ca 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Input.php b/system/core/Input.php index ab60e45c3..a7918aefb 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Lang.php b/system/core/Lang.php index 1fcff078a..569b02368 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Loader.php b/system/core/Loader.php index b52296499..987679550 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Log.php b/system/core/Log.php index 902162647..5be7baea8 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Model.php b/system/core/Model.php index 941881a9f..c809e7b84 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Output.php b/system/core/Output.php index febccdaef..0887717d9 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Router.php b/system/core/Router.php index 42d0e2952..e92a8f540 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Security.php b/system/core/Security.php index fb0ca3d4e..0c187e72f 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/URI.php b/system/core/URI.php index 7f07bfe1e..275c07900 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 042ca4316..1aafbf3a3 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index 5fec4cc67..c0eab4909 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php index 554d10040..f466e1c34 100644 --- a/system/core/compat/mbstring.php +++ b/system/core/compat/mbstring.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/password.php b/system/core/compat/password.php index e58422557..84be66738 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index ca5046e56..6fd292a26 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/DB.php b/system/database/DB.php index 37dfdd632..009035032 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 8855cc1b1..b74c31924 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index c142a1354..d6e9a7df3 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 9add5cab7..83b646d6e 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b88ec956a..661f5fe69 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 4e2429376..98d8876a7 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 49cd301df..944d45881 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 77f591ced..257925d88 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 46a3b2185..27bfc1466 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php index 9cccb2570..251b70a63 100644 --- a/system/database/drivers/cubrid/cubrid_result.php +++ b/system/database/drivers/cubrid/cubrid_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_utility.php b/system/database/drivers/cubrid/cubrid_utility.php index 942fa3b4e..555ae7a91 100644 --- a/system/database/drivers/cubrid/cubrid_utility.php +++ b/system/database/drivers/cubrid/cubrid_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index 671a353bc..106d5efac 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php index b35cc3749..44bb24e68 100644 --- a/system/database/drivers/ibase/ibase_forge.php +++ b/system/database/drivers/ibase/ibase_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php index f3c21fcec..7d7dd79ac 100644 --- a/system/database/drivers/ibase/ibase_result.php +++ b/system/database/drivers/ibase/ibase_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_utility.php b/system/database/drivers/ibase/ibase_utility.php index 619ebad01..3c152101a 100644 --- a/system/database/drivers/ibase/ibase_utility.php +++ b/system/database/drivers/ibase/ibase_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 76f58564b..7709c37bb 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php index 91b5794bc..6b6109868 100644 --- a/system/database/drivers/mssql/mssql_forge.php +++ b/system/database/drivers/mssql/mssql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b62bf75cb..38a0a0574 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php index cd23be828..95ce88f13 100644 --- a/system/database/drivers/mssql/mssql_utility.php +++ b/system/database/drivers/mssql/mssql_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 70b4f68ba..6e445cf72 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index fa84be371..7ed8f8d38 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 20cade2e1..7aa265ebb 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index 4c1f2391b..bc01fc58d 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index cf931a351..8c1b99caa 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php index c17f729c0..c5b23b6ca 100644 --- a/system/database/drivers/mysqli/mysqli_forge.php +++ b/system/database/drivers/mysqli/mysqli_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index 0ce07414f..929c2b455 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index 79d9f3670..4a3dad4d1 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 56fdf32cf..c7f033019 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 23e025757..ac33cde0c 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index fc860ea12..0c3543333 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php index ebe49c463..ce0dfc5f8 100644 --- a/system/database/drivers/oci8/oci8_utility.php +++ b/system/database/drivers/oci8/oci8_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 82efa498c..9f5a86fa0 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php index bac30bedc..77b2fdf62 100644 --- a/system/database/drivers/odbc/odbc_forge.php +++ b/system/database/drivers/odbc/odbc_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index 110d6ab0f..845aa9c79 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 2e344963d..643f6ec0c 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 2da9cf38f..d816dcb64 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_forge.php b/system/database/drivers/pdo/pdo_forge.php index 2595f7b6e..685b6776d 100644 --- a/system/database/drivers/pdo/pdo_forge.php +++ b/system/database/drivers/pdo/pdo_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php index d1809bef2..bbc2cdc5a 100644 --- a/system/database/drivers/pdo/pdo_result.php +++ b/system/database/drivers/pdo/pdo_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index 384661bf0..5029cac94 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php index 3dedfd9b3..7eaeaa1fd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index 41994f9db..3f636d3bd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 4eb7f0ba6..fc49e0dd0 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index b5b95078e..276cbb6bc 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index 9a1cbcaf4..3249a1d7f 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index 830200325..d0cca38dd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 7811d3da4..aa5e7d6e7 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 50df76905..20c5a6897 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php index 2366c4036..26b556a78 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php index a2dbfc25a..4238ca082 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php index d40d17a88..050171f64 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php index 5af39b181..2ddc2a933 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 6452b787b..66c15dac6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php index 9d04a8a9a..c7a92b826 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index dd1d31c26..abf9167d6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index 705b1c711..c8983ee56 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index ebe1ed6f0..f4a2f08f3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php index 7c65daa84..a2a3bada3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 05b8350d1..9aed3a2fe 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index 214b6f528..18e399dac 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index cb06c2a9d..9b70f3ea6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index b124bcad1..18c475b17 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index dfccb7d69..1cf6c614d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index 56bf87f3a..82a0d515d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 9f794a12e..058a8044c 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index 8d985ba7d..f7bbf7441 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index 354bb08d5..57864a7f3 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index bb5e6e04b..5ca358da5 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index 9743499bd..2d78a0f8a 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index c45472f54..5ee6daae3 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php index aa559eef6..03751f0dc 100644 --- a/system/database/drivers/sqlite3/sqlite3_result.php +++ b/system/database/drivers/sqlite3/sqlite3_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_utility.php b/system/database/drivers/sqlite3/sqlite3_utility.php index b47c086f6..20d562f96 100644 --- a/system/database/drivers/sqlite3/sqlite3_utility.php +++ b/system/database/drivers/sqlite3/sqlite3_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index c55d5f7b7..10aad115f 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index 4f0ce9d6f..aa8490ee4 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php index fde7264b9..f784ebea8 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_result.php +++ b/system/database/drivers/sqlsrv/sqlsrv_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_utility.php b/system/database/drivers/sqlsrv/sqlsrv_utility.php index 726fe3ea6..19c93d0c6 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_utility.php +++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index 3fdccf909..74c7c15a8 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index f2ff4dccf..8f44806cc 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index f8943fde3..30b475ce6 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 1f8e319ca..799c9f6d2 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index cdc4c16bc..2785241e6 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 9619c61b1..b9a0e6be9 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 484bf3228..6af632b07 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 496fc1055..9844c752a 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 22ef39c2e..b5e8ed783 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index f14f57c54..49e2a53db 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 3721164b7..d26cf5b8d 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index e7810c706..cc8a7760c 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 6c846a211..6896cb97b 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 048f06b68..72736fa7d 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 62b1a18e0..311f7a420 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index e54ed04e1..07c01c3af 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index 928cb6d04..183e117bf 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 8a5a75c44..99e82ef9f 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 3489da91c..a12ee25db 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/calendar_lang.php b/system/language/english/calendar_lang.php index 8af5e8056..77911e983 100644 --- a/system/language/english/calendar_lang.php +++ b/system/language/english/calendar_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/date_lang.php b/system/language/english/date_lang.php index 39af5a239..bb454edfb 100644 --- a/system/language/english/date_lang.php +++ b/system/language/english/date_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/db_lang.php b/system/language/english/db_lang.php index ed93452b4..b44bda951 100644 --- a/system/language/english/db_lang.php +++ b/system/language/english/db_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php index 84fb09109..22dc0fa78 100644 --- a/system/language/english/email_lang.php +++ b/system/language/english/email_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 92d6d5ebb..aa9ff330b 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/ftp_lang.php b/system/language/english/ftp_lang.php index 9e72bce42..eada3e5d5 100644 --- a/system/language/english/ftp_lang.php +++ b/system/language/english/ftp_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php index 7f23233b4..363b90074 100644 --- a/system/language/english/imglib_lang.php +++ b/system/language/english/imglib_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/migration_lang.php b/system/language/english/migration_lang.php index bce9210d3..168496090 100644 --- a/system/language/english/migration_lang.php +++ b/system/language/english/migration_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/language/english/number_lang.php b/system/language/english/number_lang.php index 0aaf51e72..9723ce5ec 100644 --- a/system/language/english/number_lang.php +++ b/system/language/english/number_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/pagination_lang.php b/system/language/english/pagination_lang.php index 4d36bdee8..d24dd047b 100644 --- a/system/language/english/pagination_lang.php +++ b/system/language/english/pagination_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/profiler_lang.php b/system/language/english/profiler_lang.php index 2d8fa51f4..20949a20a 100644 --- a/system/language/english/profiler_lang.php +++ b/system/language/english/profiler_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/unit_test_lang.php b/system/language/english/unit_test_lang.php index 29a4137a5..a89cb2d93 100644 --- a/system/language/english/unit_test_lang.php +++ b/system/language/english/unit_test_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/upload_lang.php b/system/language/english/upload_lang.php index 058dca993..ec611f9ac 100644 --- a/system/language/english/upload_lang.php +++ b/system/language/english/upload_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 349af1579..267dffb09 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index fb8df03a7..f2b61adb1 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php index 4323a68af..c6d9a61f1 100644 --- a/system/libraries/Cache/drivers/Cache_dummy.php +++ b/system/libraries/Cache/drivers/Cache_dummy.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 93932d4cf..8a36e9d79 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index ab8bfab8b..73584278d 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 2d1ead452..bb26b3b47 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index d6a0d4fb6..f296a5e26 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index 1f8ef814f..edb0fb4d9 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index 38c6aefe6..00e8416f9 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 1191e2350..fbf0cb7dc 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 1372a311f..46f374726 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index c68ee2584..6799d0fef 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index c2bc22f95..6f654deb4 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 88f265808..ac960a419 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 884d0dcec..0685692de 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 3e2107e83..2a87d9d7c 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 44f848fe0..1df5f9cd5 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 22cffb2c4..fdd958b22 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index cf455d3da..e9e03cfe0 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 9d3bd7a2f..3e4865cd1 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 55ddb25e0..f32f14ae0 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 2f5241256..31f5a4663 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 37315d3cd..6016e094e 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index eb1dcd3d8..2556bf0f7 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index 233b15619..5313de04c 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 2f1b3b414..dc309890b 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.1 diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 7222c00c2..55e9a0ee6 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index c45398bdc..ce31ba317 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 3122ed624..38e0fbd24 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.1 diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index ac5c9e42d..3a1731e58 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 60d159966..cda3ef0a0 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 87f609e8d..7af96c233 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index f343a7ec0..21de937c8 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 82a43e9c9..d6974b13a 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 4714b0d62..e0312d3c1 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -41,7 +41,7 @@ master_doc = 'index' # 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 @@ -229,7 +229,7 @@ man_pages = [ epub_title = u'CodeIgniter' epub_author = u'British Columbia Institute of Technology' epub_publisher = u'British Columbia Institute of Technology' -epub_copyright = u'2014 - 2016, British Columbia Institute of Technology' +epub_copyright = u'2014 - 2017, British Columbia Institute of Technology' # The language of the text. It defaults to the language option # or en if the language is not set. diff --git a/user_guide_src/source/license.rst b/user_guide_src/source/license.rst index 3f7b2f58b..c943c294a 100644 --- a/user_guide_src/source/license.rst +++ b/user_guide_src/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 -- cgit v1.2.3-24-g4f1b From da60e9bc66ec90970fbd2dfd08b0a6e66b9f5f5f Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 31 Dec 2016 08:46:18 -0800 Subject: Update copyright data to 2017 --- .gitignore | 1 + index.php | 4 ++-- license.txt | 2 +- system/core/Benchmark.php | 4 ++-- system/core/CodeIgniter.php | 4 ++-- system/core/Common.php | 4 ++-- system/core/Config.php | 4 ++-- system/core/Controller.php | 4 ++-- system/core/Exceptions.php | 4 ++-- system/core/Hooks.php | 4 ++-- system/core/Input.php | 4 ++-- system/core/Lang.php | 4 ++-- system/core/Loader.php | 4 ++-- system/core/Log.php | 4 ++-- system/core/Model.php | 4 ++-- system/core/Output.php | 4 ++-- system/core/Router.php | 4 ++-- system/core/Security.php | 4 ++-- system/core/URI.php | 4 ++-- system/core/Utf8.php | 4 ++-- system/core/compat/hash.php | 4 ++-- system/core/compat/mbstring.php | 4 ++-- system/core/compat/password.php | 4 ++-- system/core/compat/standard.php | 4 ++-- system/database/DB.php | 4 ++-- system/database/DB_cache.php | 4 ++-- system/database/DB_driver.php | 4 ++-- system/database/DB_forge.php | 4 ++-- system/database/DB_query_builder.php | 4 ++-- system/database/DB_result.php | 4 ++-- system/database/DB_utility.php | 4 ++-- system/database/drivers/cubrid/cubrid_driver.php | 4 ++-- system/database/drivers/cubrid/cubrid_forge.php | 4 ++-- system/database/drivers/cubrid/cubrid_result.php | 4 ++-- system/database/drivers/cubrid/cubrid_utility.php | 4 ++-- system/database/drivers/ibase/ibase_driver.php | 4 ++-- system/database/drivers/ibase/ibase_forge.php | 4 ++-- system/database/drivers/ibase/ibase_result.php | 4 ++-- system/database/drivers/ibase/ibase_utility.php | 4 ++-- system/database/drivers/mssql/mssql_driver.php | 4 ++-- system/database/drivers/mssql/mssql_forge.php | 4 ++-- system/database/drivers/mssql/mssql_result.php | 4 ++-- system/database/drivers/mssql/mssql_utility.php | 4 ++-- system/database/drivers/mysql/mysql_driver.php | 4 ++-- system/database/drivers/mysql/mysql_forge.php | 4 ++-- system/database/drivers/mysql/mysql_result.php | 4 ++-- system/database/drivers/mysql/mysql_utility.php | 4 ++-- system/database/drivers/mysqli/mysqli_driver.php | 4 ++-- system/database/drivers/mysqli/mysqli_forge.php | 4 ++-- system/database/drivers/mysqli/mysqli_result.php | 4 ++-- system/database/drivers/mysqli/mysqli_utility.php | 4 ++-- system/database/drivers/oci8/oci8_driver.php | 4 ++-- system/database/drivers/oci8/oci8_forge.php | 4 ++-- system/database/drivers/oci8/oci8_result.php | 4 ++-- system/database/drivers/oci8/oci8_utility.php | 4 ++-- system/database/drivers/odbc/odbc_driver.php | 4 ++-- system/database/drivers/odbc/odbc_forge.php | 4 ++-- system/database/drivers/odbc/odbc_result.php | 4 ++-- system/database/drivers/odbc/odbc_utility.php | 4 ++-- system/database/drivers/pdo/pdo_driver.php | 4 ++-- system/database/drivers/pdo/pdo_forge.php | 4 ++-- system/database/drivers/pdo/pdo_result.php | 4 ++-- system/database/drivers/pdo/pdo_utility.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_4d_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_informix_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_informix_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_oci_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php | 4 ++-- system/database/drivers/postgre/postgre_driver.php | 4 ++-- system/database/drivers/postgre/postgre_forge.php | 4 ++-- system/database/drivers/postgre/postgre_result.php | 4 ++-- system/database/drivers/postgre/postgre_utility.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_driver.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_forge.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_result.php | 4 ++-- system/database/drivers/sqlite3/sqlite3_utility.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_driver.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_forge.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_result.php | 4 ++-- system/database/drivers/sqlsrv/sqlsrv_utility.php | 4 ++-- system/helpers/array_helper.php | 4 ++-- system/helpers/captcha_helper.php | 4 ++-- system/helpers/cookie_helper.php | 4 ++-- system/helpers/date_helper.php | 4 ++-- system/helpers/directory_helper.php | 4 ++-- system/helpers/download_helper.php | 4 ++-- system/helpers/file_helper.php | 4 ++-- system/helpers/form_helper.php | 4 ++-- system/helpers/html_helper.php | 4 ++-- system/helpers/inflector_helper.php | 4 ++-- system/helpers/language_helper.php | 4 ++-- system/helpers/number_helper.php | 4 ++-- system/helpers/path_helper.php | 4 ++-- system/helpers/security_helper.php | 4 ++-- system/helpers/string_helper.php | 4 ++-- system/helpers/text_helper.php | 4 ++-- system/helpers/typography_helper.php | 4 ++-- system/helpers/url_helper.php | 4 ++-- system/helpers/xml_helper.php | 4 ++-- system/language/english/calendar_lang.php | 4 ++-- system/language/english/date_lang.php | 4 ++-- system/language/english/db_lang.php | 4 ++-- system/language/english/email_lang.php | 4 ++-- system/language/english/form_validation_lang.php | 4 ++-- system/language/english/ftp_lang.php | 4 ++-- system/language/english/imglib_lang.php | 4 ++-- system/language/english/migration_lang.php | 4 ++-- system/language/english/number_lang.php | 4 ++-- system/language/english/pagination_lang.php | 4 ++-- system/language/english/profiler_lang.php | 4 ++-- system/language/english/unit_test_lang.php | 4 ++-- system/language/english/upload_lang.php | 4 ++-- system/libraries/Cache/Cache.php | 4 ++-- system/libraries/Cache/drivers/Cache_apc.php | 4 ++-- system/libraries/Cache/drivers/Cache_dummy.php | 4 ++-- system/libraries/Cache/drivers/Cache_file.php | 4 ++-- system/libraries/Cache/drivers/Cache_memcached.php | 4 ++-- system/libraries/Cache/drivers/Cache_redis.php | 4 ++-- system/libraries/Cache/drivers/Cache_wincache.php | 4 ++-- system/libraries/Calendar.php | 4 ++-- system/libraries/Driver.php | 4 ++-- system/libraries/Email.php | 4 ++-- system/libraries/Encrypt.php | 4 ++-- system/libraries/Encryption.php | 4 ++-- system/libraries/Form_validation.php | 4 ++-- system/libraries/Ftp.php | 4 ++-- system/libraries/Image_lib.php | 4 ++-- system/libraries/Migration.php | 4 ++-- system/libraries/Pagination.php | 4 ++-- system/libraries/Parser.php | 4 ++-- system/libraries/Profiler.php | 4 ++-- system/libraries/Session/Session.php | 4 ++-- system/libraries/Session/Session_driver.php | 4 ++-- system/libraries/Session/drivers/Session_database_driver.php | 4 ++-- system/libraries/Session/drivers/Session_files_driver.php | 4 ++-- system/libraries/Session/drivers/Session_memcached_driver.php | 4 ++-- system/libraries/Session/drivers/Session_redis_driver.php | 4 ++-- system/libraries/Table.php | 4 ++-- system/libraries/Trackback.php | 4 ++-- system/libraries/Typography.php | 4 ++-- system/libraries/Unit_test.php | 4 ++-- system/libraries/Upload.php | 4 ++-- system/libraries/User_agent.php | 4 ++-- system/libraries/Xmlrpc.php | 4 ++-- system/libraries/Xmlrpcs.php | 4 ++-- system/libraries/Zip.php | 4 ++-- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/license.rst | 2 +- 167 files changed, 331 insertions(+), 330 deletions(-) diff --git a/.gitignore b/.gitignore index 5982f9bad..97f1d3159 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ user_guide_src/cilexer/pycilexer.egg-info/* *.stTheme.cache *.sublime-workspace *.sublime-project +/tests/tests/ \ No newline at end of file diff --git a/index.php b/index.php index d02b6bb38..c27a78ea5 100755 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/license.txt b/license.txt index 388eee337..934e126ff 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ 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 diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index b1d74f78f..b3ac79c62 100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index c9cb5c89f..77365b1c3 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Common.php b/system/core/Common.php index 91c585f7d..7b3eb6a4e 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Config.php b/system/core/Config.php index 9fd3e4a7d..cda62241b 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Controller.php b/system/core/Controller.php index 83b3df26c..59a916734 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 4e10f2831..47d153f49 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 856795cba..f2d6f21ca 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Input.php b/system/core/Input.php index 24fe8a9cc..d7cd29261 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Lang.php b/system/core/Lang.php index 1fcff078a..569b02368 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Loader.php b/system/core/Loader.php index 1111481b7..0515723b4 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Log.php b/system/core/Log.php index cf6c75a95..3e11b35f5 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Model.php b/system/core/Model.php index 941881a9f..c809e7b84 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Output.php b/system/core/Output.php index 57c78ab19..349955cd2 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Router.php b/system/core/Router.php index 045d36687..1abe4c4e5 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Security.php b/system/core/Security.php index d0308c5f9..8b313a9a2 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/URI.php b/system/core/URI.php index 544f6c85f..3ccdfa7b0 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/core/Utf8.php b/system/core/Utf8.php index f2f42e6ca..dfbbfff2c 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php index d567d0f80..ba0198e10 100644 --- a/system/core/compat/hash.php +++ b/system/core/compat/hash.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php index 554d10040..f466e1c34 100644 --- a/system/core/compat/mbstring.php +++ b/system/core/compat/mbstring.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/password.php b/system/core/compat/password.php index 1b5219e7b..b209cbe70 100644 --- a/system/core/compat/password.php +++ b/system/core/compat/password.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php index 6b7caa485..7db2efb57 100644 --- a/system/core/compat/standard.php +++ b/system/core/compat/standard.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/DB.php b/system/database/DB.php index b4b7767e8..c19eef72c 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 8855cc1b1..b74c31924 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 151340596..19afdd492 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index ed6f4b672..2b2ff1c24 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b88ec956a..661f5fe69 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 4e2429376..98d8876a7 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 70528286c..25d842c09 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 77f591ced..257925d88 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 46a3b2185..27bfc1466 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php index 9cccb2570..251b70a63 100644 --- a/system/database/drivers/cubrid/cubrid_result.php +++ b/system/database/drivers/cubrid/cubrid_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/cubrid/cubrid_utility.php b/system/database/drivers/cubrid/cubrid_utility.php index 942fa3b4e..555ae7a91 100644 --- a/system/database/drivers/cubrid/cubrid_utility.php +++ b/system/database/drivers/cubrid/cubrid_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index 671a353bc..106d5efac 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php index b35cc3749..44bb24e68 100644 --- a/system/database/drivers/ibase/ibase_forge.php +++ b/system/database/drivers/ibase/ibase_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php index f3c21fcec..7d7dd79ac 100644 --- a/system/database/drivers/ibase/ibase_result.php +++ b/system/database/drivers/ibase/ibase_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/ibase/ibase_utility.php b/system/database/drivers/ibase/ibase_utility.php index 619ebad01..3c152101a 100644 --- a/system/database/drivers/ibase/ibase_utility.php +++ b/system/database/drivers/ibase/ibase_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 66d7572e4..f0cfb2ff9 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php index 91b5794bc..6b6109868 100644 --- a/system/database/drivers/mssql/mssql_forge.php +++ b/system/database/drivers/mssql/mssql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index b62bf75cb..38a0a0574 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php index cd23be828..95ce88f13 100644 --- a/system/database/drivers/mssql/mssql_utility.php +++ b/system/database/drivers/mssql/mssql_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 7804dda58..8f2dd744d 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index fa84be371..7ed8f8d38 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 20cade2e1..7aa265ebb 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index 4c1f2391b..bc01fc58d 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 4a14eea93..7e4290474 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php index c17f729c0..c5b23b6ca 100644 --- a/system/database/drivers/mysqli/mysqli_forge.php +++ b/system/database/drivers/mysqli/mysqli_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index 0ce07414f..929c2b455 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index 79d9f3670..4a3dad4d1 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 56fdf32cf..c7f033019 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 23e025757..ac33cde0c 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index fc860ea12..0c3543333 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php index ebe49c463..ce0dfc5f8 100644 --- a/system/database/drivers/oci8/oci8_utility.php +++ b/system/database/drivers/oci8/oci8_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.4.1 diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 82efa498c..9f5a86fa0 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php index bac30bedc..77b2fdf62 100644 --- a/system/database/drivers/odbc/odbc_forge.php +++ b/system/database/drivers/odbc/odbc_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index 110d6ab0f..845aa9c79 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 2e344963d..643f6ec0c 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 2da9cf38f..d816dcb64 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_forge.php b/system/database/drivers/pdo/pdo_forge.php index 2595f7b6e..685b6776d 100644 --- a/system/database/drivers/pdo/pdo_forge.php +++ b/system/database/drivers/pdo/pdo_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php index d1809bef2..bbc2cdc5a 100644 --- a/system/database/drivers/pdo/pdo_result.php +++ b/system/database/drivers/pdo/pdo_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index 384661bf0..5029cac94 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.1.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php index 3dedfd9b3..7eaeaa1fd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index 41994f9db..3f636d3bd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 4eb7f0ba6..fc49e0dd0 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index b5b95078e..276cbb6bc 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index 9a1cbcaf4..3249a1d7f 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index 830200325..d0cca38dd 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 7811d3da4..aa5e7d6e7 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 50df76905..20c5a6897 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php index 2366c4036..26b556a78 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php index a2dbfc25a..4238ca082 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php index d40d17a88..050171f64 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php index 5af39b181..2ddc2a933 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 6452b787b..66c15dac6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php index 9d04a8a9a..c7a92b826 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index dd1d31c26..abf9167d6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index 705b1c711..c8983ee56 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php index ebe1ed6f0..f4a2f08f3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php index 7c65daa84..a2a3bada3 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php index 05b8350d1..9aed3a2fe 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index 214b6f528..18e399dac 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index cb06c2a9d..9b70f3ea6 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index b124bcad1..18c475b17 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index dfccb7d69..1cf6c614d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index 56bf87f3a..82a0d515d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 51916fcc1..cef464af4 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index 8d985ba7d..f7bbf7441 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index 354bb08d5..57864a7f3 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index bb5e6e04b..5ca358da5 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index 9743499bd..2d78a0f8a 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index c45472f54..5ee6daae3 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php index aa559eef6..03751f0dc 100644 --- a/system/database/drivers/sqlite3/sqlite3_result.php +++ b/system/database/drivers/sqlite3/sqlite3_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlite3/sqlite3_utility.php b/system/database/drivers/sqlite3/sqlite3_utility.php index b47c086f6..20d562f96 100644 --- a/system/database/drivers/sqlite3/sqlite3_utility.php +++ b/system/database/drivers/sqlite3/sqlite3_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index c55d5f7b7..10aad115f 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php index 4f0ce9d6f..aa8490ee4 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php index fde7264b9..f784ebea8 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_result.php +++ b/system/database/drivers/sqlsrv/sqlsrv_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/database/drivers/sqlsrv/sqlsrv_utility.php b/system/database/drivers/sqlsrv/sqlsrv_utility.php index 726fe3ea6..19c93d0c6 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_utility.php +++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.3 diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index 3fdccf909..74c7c15a8 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index f2ff4dccf..8f44806cc 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index ca4324495..bb90cba1e 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 0606a4562..bb1504260 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index cdc4c16bc..2785241e6 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a6463dfd7..b2a1458de 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 3cb36a551..d227f4684 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index aa7379f77..fc7d2a6a0 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index fdc463fca..de1b92cde 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index f54dac019..26a5a5ca9 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 3721164b7..d26cf5b8d 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index e7810c706..cc8a7760c 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php index 6c846a211..6896cb97b 100644 --- a/system/helpers/path_helper.php +++ b/system/helpers/path_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 4eb63883d..5e2970a5c 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index db531fa9a..23608e5f4 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index e54ed04e1..07c01c3af 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index 928cb6d04..183e117bf 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index fd7b5e116..84023affd 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 3489da91c..a12ee25db 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/calendar_lang.php b/system/language/english/calendar_lang.php index 8af5e8056..77911e983 100644 --- a/system/language/english/calendar_lang.php +++ b/system/language/english/calendar_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/date_lang.php b/system/language/english/date_lang.php index 39af5a239..bb454edfb 100644 --- a/system/language/english/date_lang.php +++ b/system/language/english/date_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/db_lang.php b/system/language/english/db_lang.php index ed93452b4..b44bda951 100644 --- a/system/language/english/db_lang.php +++ b/system/language/english/db_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php index 84fb09109..22dc0fa78 100644 --- a/system/language/english/email_lang.php +++ b/system/language/english/email_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 92d6d5ebb..aa9ff330b 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/ftp_lang.php b/system/language/english/ftp_lang.php index 9e72bce42..eada3e5d5 100644 --- a/system/language/english/ftp_lang.php +++ b/system/language/english/ftp_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php index 7f23233b4..363b90074 100644 --- a/system/language/english/imglib_lang.php +++ b/system/language/english/imglib_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/migration_lang.php b/system/language/english/migration_lang.php index bce9210d3..168496090 100644 --- a/system/language/english/migration_lang.php +++ b/system/language/english/migration_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/language/english/number_lang.php b/system/language/english/number_lang.php index 0aaf51e72..9723ce5ec 100644 --- a/system/language/english/number_lang.php +++ b/system/language/english/number_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/pagination_lang.php b/system/language/english/pagination_lang.php index 4d36bdee8..d24dd047b 100644 --- a/system/language/english/pagination_lang.php +++ b/system/language/english/pagination_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/profiler_lang.php b/system/language/english/profiler_lang.php index 2d8fa51f4..20949a20a 100644 --- a/system/language/english/profiler_lang.php +++ b/system/language/english/profiler_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/unit_test_lang.php b/system/language/english/unit_test_lang.php index 29a4137a5..a89cb2d93 100644 --- a/system/language/english/unit_test_lang.php +++ b/system/language/english/unit_test_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/language/english/upload_lang.php b/system/language/english/upload_lang.php index 058dca993..ec611f9ac 100644 --- a/system/language/english/upload_lang.php +++ b/system/language/english/upload_lang.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 349af1579..267dffb09 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index fb8df03a7..f2b61adb1 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php index 4323a68af..c6d9a61f1 100644 --- a/system/libraries/Cache/drivers/Cache_dummy.php +++ b/system/libraries/Cache/drivers/Cache_dummy.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 93932d4cf..8a36e9d79 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 836336d46..17e361107 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0 diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index d4d95ebb1..ac67be077 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index d6a0d4fb6..f296a5e26 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index 1f8ef814f..edb0fb4d9 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index 38c6aefe6..00e8416f9 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 2e6f5be90..4ab873586 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 1372a311f..46f374726 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index 545081b3b..74832ede6 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index c39b65d89..4f679a17f 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 88f265808..ac960a419 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 475649c46..3e45cb845 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 3e2107e83..2a87d9d7c 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 44f848fe0..1df5f9cd5 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 22cffb2c4..fdd958b22 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index cf455d3da..e9e03cfe0 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 01989d2d7..eb433de64 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 2.0.0 diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index 55ddb25e0..f32f14ae0 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php index 2f5241256..31f5a4663 100644 --- a/system/libraries/Session/drivers/Session_database_driver.php +++ b/system/libraries/Session/drivers/Session_database_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 37315d3cd..6016e094e 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index eb1dcd3d8..2556bf0f7 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index a780100b1..d260f7b82 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 diff --git a/system/libraries/Table.php b/system/libraries/Table.php index f2fa434d9..fef9bb039 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.1 diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 7222c00c2..55e9a0ee6 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index c45398bdc..ce31ba317 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 3122ed624..38e0fbd24 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.1 diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 778ed6892..b37cc2f59 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 60d159966..cda3ef0a0 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 7186646da..f043e0f90 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index f343a7ec0..21de937c8 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 25315c92e..46f6c145d 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 4d2edbe60..5c447b722 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -41,7 +41,7 @@ master_doc = 'index' # 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 @@ -229,7 +229,7 @@ man_pages = [ epub_title = u'CodeIgniter' epub_author = u'British Columbia Institute of Technology' epub_publisher = u'British Columbia Institute of Technology' -epub_copyright = u'2014 - 2016, British Columbia Institute of Technology' +epub_copyright = u'2014 - 2017, British Columbia Institute of Technology' # The language of the text. It defaults to the language option # or en if the language is not set. diff --git a/user_guide_src/source/license.rst b/user_guide_src/source/license.rst index 3f7b2f58b..c943c294a 100644 --- a/user_guide_src/source/license.rst +++ b/user_guide_src/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 -- cgit v1.2.3-24-g4f1b From d1896bc74e884c347c3ef02a55babace82a61d39 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 12:28:07 +0200 Subject: [ci skip] Update year to 2017 in user_guide_src/cilexer --- user_guide_src/cilexer/cilexer/cilexer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index 40582f88a..4ecfd0bc4 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -1,11 +1,11 @@ # CodeIgniter # https://codeigniter.com -# +# # 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 +# 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 -- cgit v1.2.3-24-g4f1b From 0642faa79669826603502239b8fc092d0f1a437a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 12:31:41 +0200 Subject: [ci skip] Update year number in remaining files that were recently deleted from develop --- system/database/drivers/sqlite/sqlite_driver.php | 4 ++-- system/database/drivers/sqlite/sqlite_forge.php | 4 ++-- system/database/drivers/sqlite/sqlite_result.php | 4 ++-- system/database/drivers/sqlite/sqlite_utility.php | 4 ++-- system/helpers/email_helper.php | 4 ++-- system/helpers/smiley_helper.php | 4 ++-- system/libraries/Cart.php | 4 ++-- system/libraries/Javascript.php | 4 ++-- system/libraries/Javascript/Jquery.php | 4 ++-- system/libraries/Session/SessionHandlerInterface.php | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 16b8c29c3..03c96e448 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 3ad3477e4..a0fc0cdb0 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index d40b98aab..34d3ac3c1 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php index 59c46f9ef..90ca4b161 100644 --- a/system/database/drivers/sqlite/sqlite_utility.php +++ b/system/database/drivers/sqlite/sqlite_utility.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.3.0 diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php index 35944fc7b..b3755d453 100644 --- a/system/helpers/email_helper.php +++ b/system/helpers/email_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index 688ca24c2..2c9a3b4a6 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php index 44d87e0bf..734c43420 100644 --- a/system/libraries/Cart.php +++ b/system/libraries/Cart.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index dcf933779..7648526b4 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php index 9df1be1c1..ee5f9dea5 100644 --- a/system/libraries/Javascript/Jquery.php +++ b/system/libraries/Javascript/Jquery.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 diff --git a/system/libraries/Session/SessionHandlerInterface.php b/system/libraries/Session/SessionHandlerInterface.php index b3533dd1e..2eef61db8 100644 --- a/system/libraries/Session/SessionHandlerInterface.php +++ b/system/libraries/Session/SessionHandlerInterface.php @@ -6,7 +6,7 @@ * * This content is released under 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 -- cgit v1.2.3-24-g4f1b From b3f2e9bcc34c2046a56f34d2bc67dc65dbb61185 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 12:28:07 +0200 Subject: [ci skip] Update year to 2017 in user_guide_src/cilexer --- user_guide_src/cilexer/cilexer/cilexer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index 40582f88a..4ecfd0bc4 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -1,11 +1,11 @@ # CodeIgniter # https://codeigniter.com -# +# # 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 +# 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 -- cgit v1.2.3-24-g4f1b From 593ce680b87fadb05af6ba13c857ef8b16303bcf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 12:40:32 +0200 Subject: [ci skip] Fix 4953 --- system/database/DB_forge.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 2b2ff1c24..7289235c8 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -348,7 +348,7 @@ abstract class CI_DB_forge { if (($result = $this->db->query($sql)) !== FALSE) { - empty($this->db->data_cache['table_names']) OR $this->db->data_cache['table_names'][] = $table; + isset($this->db->data_cache['table_names']) && $this->db->data_cache['table_names'][] = $table; // Most databases don't support creating indexes from within the CREATE TABLE statement if ( ! empty($this->keys)) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d7977f4ce..f176977a7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -31,6 +31,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#4937) - :doc:`Image Manipulation Library ` method ``initialize()`` didn't translate *new_image* inputs to absolute paths. - Fixed a bug (#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. +- Fixed a bug (#4953) - :doc:`Database Forge ` method ``create_table()`` didn't update an internal tables list cache if it exists but is empty. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 2cae5587fed1f1b448a48e978ab28f0af3e0ec88 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 13:18:27 +0200 Subject: Merge pull request #4958 from boxsnake/develop Fix a bug where QB count_all_results() doesn't take into account qb_cache_orderby --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 661f5fe69..3f1a8021a 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1402,7 +1402,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_orderby = NULL; } - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby)) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby)) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); -- cgit v1.2.3-24-g4f1b From 6e8a3e96aa0794081212f7a61a7e28f04e04c2ae Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 13:19:55 +0200 Subject: [ci skip] Add changelog entry for PR #4958 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f176977a7..ac245c998 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -32,6 +32,7 @@ Bug fixes for 3.1.3 - Fixed a bug (#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. - Fixed a bug (#4953) - :doc:`Database Forge ` method ``create_table()`` didn't update an internal tables list cache if it exists but is empty. +- Fixed a bug (#4958) - :doc:`Query Builder ` method ``count_all_results()`` didn't take into account cached ``ORDER BY`` clauses. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 973dbfc648705b26234d5100c08625af8e1a34d6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 13:54:12 +0200 Subject: [ci skip] Remove /tests/tests/ from .gitignore It got there by accident --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 97f1d3159..5982f9bad 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,3 @@ user_guide_src/cilexer/pycilexer.egg-info/* *.stTheme.cache *.sublime-workspace *.sublime-project -/tests/tests/ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 51c84f3a436ecfebe371177ba5537b9e475cc3c6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 17:42:26 +0200 Subject: Fix #4804 --- system/database/DB_query_builder.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 3f1a8021a..ab19d97a2 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1553,7 +1553,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { is_bool($escape) OR $escape = $this->_protect_identifiers; - $keys = array_keys($this->_object_to_array(current($key))); + $keys = array_keys($this->_object_to_array(reset($key))); sort($keys); foreach ($key as $row) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ac245c998..73a0232be 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -33,6 +33,7 @@ Bug fixes for 3.1.3 - Fixed a regression (#4892) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. - Fixed a bug (#4953) - :doc:`Database Forge ` method ``create_table()`` didn't update an internal tables list cache if it exists but is empty. - Fixed a bug (#4958) - :doc:`Query Builder ` method ``count_all_results()`` didn't take into account cached ``ORDER BY`` clauses. +- Fixed a bug (#4804) - :doc:`Query Builder ` method ``insert_batch()`` would skip input data elements if the input array pointer was modified on PHP 7+. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From d6ebcbaec2755b7bb3c80fbd5f2d3d6d91766906 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 17:55:18 +0200 Subject: [ci skip] Correct changelog entry for issue #4804 --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 73a0232be..1c7ef16c6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -33,7 +33,7 @@ Bug fixes for 3.1.3 - Fixed a regression (#4892) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. - Fixed a bug (#4953) - :doc:`Database Forge ` method ``create_table()`` didn't update an internal tables list cache if it exists but is empty. - Fixed a bug (#4958) - :doc:`Query Builder ` method ``count_all_results()`` didn't take into account cached ``ORDER BY`` clauses. -- Fixed a bug (#4804) - :doc:`Query Builder ` method ``insert_batch()`` would skip input data elements if the input array pointer was modified on PHP 7+. +- Fixed a bug (#4804) - :doc:`Query Builder ` method ``insert_batch()`` could skip input data elements if the input array pointer was modified. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 2fa068d238c65cbe8e048809b1839fa0cda3123b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 18:15:30 +0200 Subject: [ci skip] Correct changelog entry for issue #4804, again --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1c7ef16c6..3ae234102 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -33,7 +33,7 @@ Bug fixes for 3.1.3 - Fixed a regression (#4892) - :doc:`Query Builder ` method ``update_batch()`` didn't properly handle identifier escaping. - Fixed a bug (#4953) - :doc:`Database Forge ` method ``create_table()`` didn't update an internal tables list cache if it exists but is empty. - Fixed a bug (#4958) - :doc:`Query Builder ` method ``count_all_results()`` didn't take into account cached ``ORDER BY`` clauses. -- Fixed a bug (#4804) - :doc:`Query Builder ` method ``insert_batch()`` could skip input data elements if the input array pointer was modified. +- Fixed a bug (#4804) - :doc:`Query Builder ` method ``insert_batch()`` could fail if the input array pointer was modified. Version 3.1.2 ============= -- cgit v1.2.3-24-g4f1b From 2ab1c1902711c8b0caf5c3e8f2fa825d72f6755d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Jan 2017 15:26:35 +0200 Subject: Fix an XSS vulnerability --- system/core/Security.php | 2 +- tests/codeigniter/core/Security_test.php | 5 +++++ user_guide_src/source/changelog.rst | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/system/core/Security.php b/system/core/Security.php index 8b313a9a2..d198b663b 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -499,7 +499,7 @@ class CI_Security { * Becomes: <blink> */ $pattern = '#' - .'<((?/*\s*)(?[a-z0-9]+)(?=[^a-z0-9]|$)' // tag start and name, followed by a non-tag character + .'<((?/*\s*)((?[a-z0-9]+)(?=[^a-z0-9]|$)|.+)' // tag start and name, followed by a non-tag character .'[^\s\042\047a-z0-9>/=]*' // a valid attribute character immediately after the tag would count as a separator // optional attributes .'(?(?:[\s\042\047/=]*' // non-attribute characters, excluding > (tag close) for obvious reasons diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index cbf0285ec..4c54ec9fa 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -154,6 +154,11 @@ class Security_test extends CI_TestCase { 'on=">"x onerror="alert(1)">', $this->security->xss_clean('on=">"x onerror="alert(1)">') ); + + $this->assertEquals( + "\n><!-\n