summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--application/config/config.php8
-rw-r--r--application/config/hooks.php2
-rw-r--r--application/config/memcached.php2
-rw-r--r--application/config/mimes.php2
-rw-r--r--application/config/profiler.php2
-rw-r--r--application/config/routes.php2
-rw-r--r--application/config/smileys.php2
-rw-r--r--application/config/user_agents.php3
-rw-r--r--application/controllers/Welcome.php2
-rw-r--r--composer.json2
-rw-r--r--contributing.md4
-rwxr-xr-xindex.php6
-rw-r--r--license.txt2
-rw-r--r--readme.rst8
-rw-r--r--system/core/Benchmark.php10
-rw-r--r--system/core/CodeIgniter.php10
-rw-r--r--system/core/Common.php10
-rw-r--r--system/core/Config.php10
-rw-r--r--system/core/Controller.php10
-rw-r--r--system/core/Exceptions.php10
-rw-r--r--system/core/Hooks.php10
-rw-r--r--system/core/Input.php10
-rw-r--r--system/core/Lang.php10
-rw-r--r--system/core/Loader.php42
-rw-r--r--system/core/Log.php10
-rw-r--r--system/core/Model.php10
-rw-r--r--system/core/Output.php10
-rw-r--r--system/core/Router.php11
-rw-r--r--system/core/Security.php26
-rw-r--r--system/core/URI.php12
-rw-r--r--system/core/Utf8.php10
-rw-r--r--system/core/compat/hash.php10
-rw-r--r--system/core/compat/mbstring.php10
-rw-r--r--system/core/compat/password.php10
-rw-r--r--system/core/compat/standard.php10
-rw-r--r--system/database/DB.php15
-rw-r--r--system/database/DB_cache.php10
-rw-r--r--system/database/DB_driver.php100
-rw-r--r--system/database/DB_forge.php14
-rw-r--r--system/database/DB_query_builder.php12
-rw-r--r--system/database/DB_result.php10
-rw-r--r--system/database/DB_utility.php24
-rw-r--r--system/database/drivers/cubrid/cubrid_driver.php10
-rw-r--r--system/database/drivers/cubrid/cubrid_forge.php10
-rw-r--r--system/database/drivers/cubrid/cubrid_result.php10
-rw-r--r--system/database/drivers/cubrid/cubrid_utility.php10
-rw-r--r--system/database/drivers/ibase/ibase_driver.php10
-rw-r--r--system/database/drivers/ibase/ibase_forge.php10
-rw-r--r--system/database/drivers/ibase/ibase_result.php10
-rw-r--r--system/database/drivers/ibase/ibase_utility.php10
-rw-r--r--system/database/drivers/mssql/mssql_driver.php26
-rw-r--r--system/database/drivers/mssql/mssql_forge.php10
-rw-r--r--system/database/drivers/mssql/mssql_result.php10
-rw-r--r--system/database/drivers/mssql/mssql_utility.php10
-rw-r--r--system/database/drivers/mysql/mysql_driver.php60
-rw-r--r--system/database/drivers/mysql/mysql_forge.php10
-rw-r--r--system/database/drivers/mysql/mysql_result.php10
-rw-r--r--system/database/drivers/mysql/mysql_utility.php10
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php103
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php10
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php10
-rw-r--r--system/database/drivers/mysqli/mysqli_utility.php10
-rw-r--r--system/database/drivers/oci8/oci8_driver.php26
-rw-r--r--system/database/drivers/oci8/oci8_forge.php10
-rw-r--r--system/database/drivers/oci8/oci8_result.php10
-rw-r--r--system/database/drivers/oci8/oci8_utility.php10
-rw-r--r--system/database/drivers/odbc/odbc_driver.php28
-rw-r--r--system/database/drivers/odbc/odbc_forge.php10
-rw-r--r--system/database/drivers/odbc/odbc_result.php10
-rw-r--r--system/database/drivers/odbc/odbc_utility.php10
-rw-r--r--system/database/drivers/pdo/pdo_driver.php10
-rw-r--r--system/database/drivers/pdo/pdo_forge.php10
-rw-r--r--system/database/drivers/pdo/pdo_result.php10
-rw-r--r--system/database/drivers/pdo/pdo_utility.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_4d_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_4d_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_informix_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_informix_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php39
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_driver.php41
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php28
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php17
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php10
-rw-r--r--system/database/drivers/postgre/postgre_driver.php37
-rw-r--r--system/database/drivers/postgre/postgre_forge.php10
-rw-r--r--system/database/drivers/postgre/postgre_result.php10
-rw-r--r--system/database/drivers/postgre/postgre_utility.php10
-rw-r--r--system/database/drivers/sqlite/sqlite_driver.php10
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php10
-rw-r--r--system/database/drivers/sqlite/sqlite_result.php10
-rw-r--r--system/database/drivers/sqlite/sqlite_utility.php10
-rw-r--r--system/database/drivers/sqlite3/sqlite3_driver.php10
-rw-r--r--system/database/drivers/sqlite3/sqlite3_forge.php10
-rw-r--r--system/database/drivers/sqlite3/sqlite3_result.php10
-rw-r--r--system/database/drivers/sqlite3/sqlite3_utility.php10
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php10
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_forge.php10
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_result.php10
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_utility.php10
-rw-r--r--system/helpers/array_helper.php10
-rw-r--r--system/helpers/captcha_helper.php13
-rw-r--r--system/helpers/cookie_helper.php10
-rw-r--r--system/helpers/date_helper.php10
-rw-r--r--system/helpers/directory_helper.php10
-rw-r--r--system/helpers/download_helper.php10
-rw-r--r--system/helpers/email_helper.php10
-rw-r--r--system/helpers/file_helper.php10
-rw-r--r--system/helpers/form_helper.php51
-rw-r--r--system/helpers/html_helper.php10
-rw-r--r--system/helpers/inflector_helper.php10
-rw-r--r--system/helpers/language_helper.php10
-rw-r--r--system/helpers/number_helper.php10
-rw-r--r--system/helpers/path_helper.php10
-rw-r--r--system/helpers/security_helper.php10
-rw-r--r--system/helpers/smiley_helper.php10
-rw-r--r--system/helpers/string_helper.php13
-rw-r--r--system/helpers/text_helper.php10
-rw-r--r--system/helpers/typography_helper.php10
-rw-r--r--system/helpers/url_helper.php10
-rw-r--r--system/helpers/xml_helper.php10
-rw-r--r--system/language/english/calendar_lang.php8
-rw-r--r--system/language/english/date_lang.php8
-rw-r--r--system/language/english/db_lang.php8
-rw-r--r--system/language/english/email_lang.php8
-rw-r--r--system/language/english/form_validation_lang.php8
-rw-r--r--system/language/english/ftp_lang.php8
-rw-r--r--system/language/english/imglib_lang.php8
-rw-r--r--system/language/english/migration_lang.php8
-rw-r--r--system/language/english/number_lang.php8
-rw-r--r--system/language/english/pagination_lang.php8
-rw-r--r--system/language/english/profiler_lang.php8
-rw-r--r--system/language/english/unit_test_lang.php8
-rw-r--r--system/language/english/upload_lang.php8
-rw-r--r--system/libraries/Cache/Cache.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_apc.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_dummy.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_memcached.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_wincache.php8
-rw-r--r--system/libraries/Calendar.php10
-rw-r--r--system/libraries/Cart.php10
-rw-r--r--system/libraries/Driver.php8
-rw-r--r--system/libraries/Email.php44
-rw-r--r--system/libraries/Encrypt.php12
-rw-r--r--system/libraries/Encryption.php15
-rw-r--r--system/libraries/Form_validation.php19
-rw-r--r--system/libraries/Ftp.php10
-rw-r--r--system/libraries/Image_lib.php10
-rw-r--r--system/libraries/Javascript.php10
-rw-r--r--system/libraries/Javascript/Jquery.php10
-rw-r--r--system/libraries/Migration.php8
-rw-r--r--system/libraries/Pagination.php10
-rw-r--r--system/libraries/Parser.php10
-rw-r--r--system/libraries/Profiler.php10
-rw-r--r--system/libraries/Session/Session.php10
-rw-r--r--system/libraries/Session/SessionHandlerInterface.php10
-rw-r--r--system/libraries/Session/Session_driver.php33
-rw-r--r--system/libraries/Session/drivers/Session_database_driver.php71
-rw-r--r--system/libraries/Session/drivers/Session_files_driver.php77
-rw-r--r--system/libraries/Session/drivers/Session_memcached_driver.php60
-rw-r--r--system/libraries/Session/drivers/Session_redis_driver.php52
-rw-r--r--system/libraries/Table.php10
-rw-r--r--system/libraries/Trackback.php10
-rw-r--r--system/libraries/Typography.php10
-rw-r--r--system/libraries/Unit_test.php10
-rw-r--r--system/libraries/Upload.php10
-rw-r--r--system/libraries/User_agent.php10
-rw-r--r--system/libraries/Xmlrpc.php18
-rw-r--r--system/libraries/Xmlrpcs.php10
-rw-r--r--system/libraries/Zip.php10
-rw-r--r--tests/codeigniter/database/DB_driver_test.php2
-rw-r--r--tests/codeigniter/libraries/Form_validation_test.php2
-rw-r--r--user_guide_src/cilexer/cilexer/cilexer.py8
-rw-r--r--user_guide_src/source/changelog.rst44
-rw-r--r--user_guide_src/source/conf.py4
-rw-r--r--user_guide_src/source/contributing/index.rst4
-rw-r--r--user_guide_src/source/database/db_driver_reference.rst14
-rw-r--r--user_guide_src/source/general/routing.rst11
-rw-r--r--user_guide_src/source/helpers/cookie_helper.rst6
-rw-r--r--user_guide_src/source/helpers/form_helper.rst8
-rw-r--r--user_guide_src/source/installation/upgrade_150.rst4
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst2
-rw-r--r--user_guide_src/source/installation/upgrade_310.rst45
-rw-r--r--user_guide_src/source/libraries/form_validation.rst6
-rw-r--r--user_guide_src/source/libraries/image_lib.rst2
-rw-r--r--user_guide_src/source/libraries/trackback.rst2
-rw-r--r--user_guide_src/source/license.rst2
204 files changed, 1520 insertions, 1189 deletions
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
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/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',
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 599c79b0e..8ebf62bfa 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/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(
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/<method_name>
- * @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 f4d6705ed..10b89b1db 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..13fcd5996 100755
--- a/index.php
+++ b/index.php
@@ -28,10 +28,10 @@
*
* @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 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/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/readme.rst b/readme.rst
index 64ace3a39..84ecc67f9 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
-<http://www.codeigniter.com/download>`_ page.
+<https://codeigniter.com/download>`_ page.
**************************
Changelog and New Features
@@ -39,7 +39,7 @@ issues, as well as missing features.
Installation
************
-Please see the `installation section <http://www.codeigniter.com/user_guide/installation/index.html>`_
+Please see the `installation section <https://codeigniter.com/user_guide/installation/index.html>`_
of the CodeIgniter User Guide.
*******
@@ -53,11 +53,11 @@ agreement <https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/so
Resources
*********
-- `User Guide <http://www.codeigniter.com/docs>`_
+- `User Guide <https://codeigniter.com/docs>`_
- `Language File Translations <https://github.com/bcit-ci/codeigniter3-translations>`_
- `Community Forums <http://forum.codeigniter.com/>`_
- `Community Wiki <https://github.com/bcit-ci/CodeIgniter/wiki>`_
-- `Community IRC <http://www.codeigniter.com/irc>`_
+- `Community IRC <https://webchat.freenode.net/?channels=%23codeigniter>`_
Report security issues to our `Security Panel <mailto:security@codeigniter.com>`_
or via our `page on HackerOne <https://hackerone.com/codeigniter>`_, thank you.
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php
index e420f62a1..b1d74f78f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 fece65bde..14f62edaa 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 3ab98cf6d..b87ce4d62 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c507f342c..ca6fb3793 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 a0d97baa2..83b3df26c 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d8f62c0fe..a1c6a1970 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 3b4fb2250..856795cba 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 4e7a4e95e..a7c9ecd0d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 deb955414..1fcff078a 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 18e4c5287..37d1ecaf9 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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/system/core/Log.php b/system/core/Log.php
index e8cb401f5..72d3cfbae 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 a0469de11..941881a9f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 76c1329d2..ad87f8545 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 a84be1f1d..045d36687 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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/Security.php b/system/core/Security.php
index 36dea4cf2..bad511dd3 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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/core/URI.php b/system/core/URI.php
index 5b658f679..544f6c85f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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)
diff --git a/system/core/Utf8.php b/system/core/Utf8.php
index 9d8ac41e1..f2f42e6ca 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 15954559c..6854e4c26 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 e335c85f7..554d10040 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 7b933aa04..f0c22c780 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 5a428c114..47d47aeff 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 23de414b5..37dfdd632 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
@@ -28,10 +28,10 @@
*
* @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) 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 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
@@ -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_cache.php b/system/database/DB_cache.php
index 223055f60..8855cc1b1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 25e70ec3f..e565f0fd1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -380,7 +380,8 @@ abstract class CI_DB_driver {
/**
* Initialize Database Settings
*
- * @return bool
+ * @return void
+ * @throws RuntimeException In case of failure
*/
public function initialize()
{
@@ -392,7 +393,7 @@ abstract class CI_DB_driver {
*/
if ($this->conn_id)
{
- return TRUE;
+ return;
}
// ----------------------------------------------------------------
@@ -429,19 +430,9 @@ 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');
- }
-
- return FALSE;
+ 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);
}
// --------------------------------------------------------------------
@@ -505,26 +496,13 @@ abstract class CI_DB_driver {
// --------------------------------------------------------------------
/**
- * Set client character set
+ * Last error
*
- * @param string
- * @return bool
+ * @return array
*/
- public function db_set_charset($charset)
+ public function error()
{
- 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;
+ return array('code' => NULL, 'message' => NULL);
}
// --------------------------------------------------------------------
@@ -622,7 +600,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;
@@ -664,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
@@ -710,9 +683,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.
@@ -742,26 +715,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
* we only use it when running transaction commands since they do
@@ -772,14 +725,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/system/database/DB_forge.php b/system/database/DB_forge.php
index f9cf76a14..826aa1ebf 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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']).')'
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index cf1100d27..e92c57091 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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/system/database/DB_result.php b/system/database/DB_result.php
index 746f2a110..d9d1fccc7 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 b51893e18..49cd301df 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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)
{
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php
index 65f4adb3f..77f591ced 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9484e94e1..8262beb6b 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 e666bab56..9cccb2570 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 de7d71568..942fa3b4e 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 82550d51b..cbc1022ff 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 0e748c710..9c358c365 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 991146f45..f3c21fcec 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 79d2788e5..619ebad01 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 883973ae1..72e31e00d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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);
@@ -248,26 +249,13 @@ 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
*
* @return string
*/
protected function _version()
{
- return 'SELECT @@VERSION AS ver';
+ return "SELECT SERVERPROPERTY('ProductVersion') AS ver";
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index 84406a016..24d1fc204 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c1c42a486..b62bf75cb 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 1040b5e41..cd23be828 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9c630d0d6..d903406d1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -84,7 +84,7 @@ class CI_DB_mysql_driver extends CI_DB {
*
* @var bool
*/
- public $stricton = FALSE;
+ public $stricton;
// --------------------------------------------------------------------
@@ -147,12 +147,41 @@ 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', $this->char_set) : FALSE;
+ }
+
+ if (isset($this->stricton))
+ {
+ 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(REPLACE(REPLACE(REPLACE(
+ @@sql_mode,
+ "STRICT_ALL_TABLES,", ""),
+ ",STRICT_ALL_TABLES", ""),
+ "STRICT_ALL_TABLES", ""),
+ "STRICT_TRANS_TABLES,", ""),
+ ",STRICT_TRANS_TABLES", ""),
+ "STRICT_TRANS_TABLES", "")'
+ );
+ }
+ }
+
+ return $this->conn_id;
}
- return $this->conn_id;
+ return FALSE;
}
// --------------------------------------------------------------------
@@ -200,19 +229,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
*
* @return string
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index cb90065f2..fa84be371 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 26aaddd32..20cade2e1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 55857ab08..4c1f2391b 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 827470078..431bce50a 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -84,7 +84,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*
* @var bool
*/
- public $stricton = FALSE;
+ public $stricton;
// --------------------------------------------------------------------
@@ -98,6 +98,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
*
* @param bool $persistent
@@ -122,13 +133,30 @@ 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)
+ if (isset($this->stricton))
{
- $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")');
+ }
+ else
+ {
+ $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))
@@ -142,13 +170,26 @@ 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']))
{
- $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;
- $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 +199,29 @@ 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;
+ if ( ! $this->_mysqli->set_charset($this->char_set))
+ {
+ log_message('error', "Database: Unable to set the configured connection charset ('{$this->char_set}').");
+ $this->_mysqli->close();
+ return ($this->db->db_debug) ? $this->display_error('db_unable_to_set_charset', $this->char_set) : FALSE;
+ }
+
+ return $this->_mysqli;
}
return FALSE;
@@ -224,19 +272,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
*
* @return string
@@ -457,11 +492,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/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 196afa845..c17f729c0 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d648828bd..0ce07414f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 04fcd1ded..79d9f3670 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 916ddeb90..59f0e8456 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
@@ -28,10 +28,10 @@
*
* @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) 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 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/
*/
/**
@@ -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;
}
// --------------------------------------------------------------------
@@ -650,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) : '');
diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php
index 80100977a..1ca559a32 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9ec54cc5c..fc860ea12 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 90022a8c1..ebe49c463 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 409284b44..19b7b744b 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -189,6 +189,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
*
* @param string
diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php
index 45c5dc108..bac30bedc 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 10b93d4fc..110d6ab0f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 0e6c23328..2e344963d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 8c5a5e7e3..c6f84e0f9 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 eedd9722d..2595f7b6e 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 fe26fea6e..d1809bef2 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 72169c3ca..384661bf0 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 7a767ef40..3dedfd9b3 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 6b420540c..41994f9db 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 98ac89f3d..837779804 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 15b100d9b..5f854061d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 ae2b9983b..84695ee9b 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d3dd9032e..d5dd9aad1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 0bafde861..96dcc5ec1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 ad28a6550..256fa1413 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 5dba26ec9..2366c4036 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d1b5f92c9..a2dbfc25a 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9f8c017a5..d40d17a88 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 22bdf6104..5af39b181 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 e9d25cebc..70f2bfd4e 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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
{
- $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;
+ }
}
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
index e8e24c6b3..9d04a8a9a 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d17e311f7..dd1d31c26 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -130,6 +130,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(?<version>\d+(?:\.\d+)+)#', $version_string, $match))
+ {
+ return $this->data_cache['version'] = $match[1];
+ }
+
+ return FALSE;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Show table query
*
* Generates a platform-specific query string so that the table names can be fetched
@@ -288,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): '');
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
index e2078cf39..d0b7be8f2 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 51c70b630..333448838 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -161,6 +161,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
*
* Generates a platform-specific query string so that the table names can be fetched
diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php
index 291352982..7c65daa84 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 2dd41ca87..ee8f76348 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
index b4a6160a8..214b6f528 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 409e6501b..62690139c 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 15afbdef5..f6f9bb481 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 f8ae5f6db..dfccb7d69 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 602a1d426..602f895f1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 b1df326f7..ce21260ef 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -163,6 +163,13 @@ class CI_DB_postgre_driver extends CI_DB {
return FALSE;
}
+ 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', $this->char_set) : FALSE;
+ }
+
empty($this->schema) OR $this->simple_query('SET search_path TO '.$this->schema.',public');
}
@@ -190,19 +197,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
*
* @return string
@@ -288,7 +282,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/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index d26e84cbc..8d985ba7d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 a8ad24edf..354bb08d5 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 7c6c02590..bb5e6e04b 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 e000a8e50..16b8c29c3 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 2bba330c0..8a1659430 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 487d00366..d40b98aab 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9cb454274..59c46f9ef 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 73e453785..9743499bd 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 24690ba20..43cbe33e5 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 387481b7f..aa559eef6 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 336f68754..b47c086f6 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 414669a4b..0cd9ce16d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 b22b60a4a..f915dad3e 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d2be926aa..fde7264b9 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 77cf0aaf3..726fe3ea6 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 2ce55b9c4..3fdccf909 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 85bcfb5a0..fd1b8f1ed 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
@@ -28,10 +28,10 @@
*
* @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) 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 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
*/
// ------------------------------------------------------------------------
@@ -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/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index c2dc73a17..ca4324495 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c9b71c30f..c43209f05 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 8f05c5b18..cdc4c16bc 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 73f6456c4..a6463dfd7 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c4d705810..35944fc7b 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 f6cb1629a..0d8d1d0d9 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 fd807769a..04778b084 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
@@ -28,10 +28,10 @@
*
* @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) 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 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
*/
// ------------------------------------------------------------------------
@@ -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/system/helpers/html_helper.php b/system/helpers/html_helper.php
index 9ed21a168..5cc994ff1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 f2890059f..96b723c8d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 25ce8abe1..3721164b7 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 3a24259e1..e7810c706 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c96d0b8b3..838ece9e9 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 adbf136bb..4eb63883d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d053dd22c..688ca24c2 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 637835160..db531fa9a 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
@@ -28,10 +28,10 @@
*
* @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) 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 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
*/
// ------------------------------------------------------------------------
@@ -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/system/helpers/text_helper.php b/system/helpers/text_helper.php
index fb47036f2..1fdbedda5 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 45bb9b1d4..928cb6d04 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 d65f92f1b..fd7b5e116 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 55f9c2f66..3489da91c 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9d3352868..8af5e8056 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c61c9c2ad..39af5a239 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 5b67da659..ed93452b4 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 cc6b2fd5a..84fb09109 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 75d6e4b82..92d6d5ebb 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 bccc27397..9e72bce42 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 41129cd6e..7f23233b4 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9e4a7c58c..bce9210d3 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 db229c5b5..0aaf51e72 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 be133781e..4d36bdee8 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 ba3edba60..2d8fa51f4 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 639829ed8..29a4137a5 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 a536dda31..058dca993 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 0c87a5628..349af1579 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 e0d2ffb39..dd18e7bc8 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 bf80945a9..4323a68af 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 c046f3b7d..e1ce16a5a 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 59cf4685d..c44958b97 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 ea0059ff7..81b49e2fc 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9cc6ff016..f66080514 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 f6a0c39c4..1f8ef814f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 bf27c6392..44d87e0bf 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 da4c548e6..38c6aefe6 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 ebff7567a..007f9b431 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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'
@@ -1829,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/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index a46d4f462..1372a311f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 f3e039881..92c38a0ed 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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);
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index a158225ee..31632762d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 2d345c294..88f265808 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 e813efd89..f594b7125 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 4cc628692..dcf933779 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 11f2d2361..9df1be1c1 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 45a3cbbce..7aefb6c23 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 4d18998b9..cef98ebf4 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 57981af95..22cffb2c4 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 1e464d8b0..cc7641436 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 05a470d86..b93c00c15 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 9dab5ac07..b3533dd1e 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 47376da5b..98fc897e3 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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..3ba9d3d36 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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;
}
// ------------------------------------------------------------------------
@@ -144,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;
@@ -196,12 +202,15 @@ 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)
{
if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id))
{
- return FALSE;
+ return $this->_failure;
}
$this->_row_exists = FALSE;
@@ -209,7 +218,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 +233,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 +257,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 +274,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;
}
// ------------------------------------------------------------------------
@@ -283,18 +293,28 @@ 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'])
{
$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;
+ }
}
- return ($this->close() && $this->_cookie_destroy());
+ if ($this->close() === $this->_success)
+ {
+ $this->_cookie_destroy();
+ return $this->_success;
+ }
+
+ return $this->_failure;
}
// ------------------------------------------------------------------------
@@ -309,7 +329,12 @@ 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));
+ // 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;
}
// ------------------------------------------------------------------------
@@ -390,4 +415,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 45da91c46..119bf6572 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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
@@ -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_handle === FALSE)
+ {
+ return $this->_failure;
+ }
else
{
rewind($this->_file_handle);
@@ -218,20 +224,20 @@ 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 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)
@@ -254,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;
}
// ------------------------------------------------------------------------
@@ -279,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;
}
// ------------------------------------------------------------------------
@@ -297,21 +302,33 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
*/
public function destroy($session_id)
{
- if ($this->close())
+ if ($this->close() === $this->_success)
{
- 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;
}
// ------------------------------------------------------------------------
@@ -329,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;
@@ -356,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..d017dfb2f 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -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;
}
// ------------------------------------------------------------------------
@@ -297,9 +300,14 @@ 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);
+ 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 +324,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 +335,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 4fa6c28b3..c7c574202 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 {
@@ -136,7 +136,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();
@@ -161,7 +161,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
else
{
$this->_redis = $redis;
- return TRUE;
+ return $this->_success;
}
}
else
@@ -169,7 +169,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
log_message('error', 'Session: Unable to connect to Redis with the configured settings.');
}
- return FALSE;
+ return $this->_failure;
}
// ------------------------------------------------------------------------
@@ -194,7 +194,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
return $session_data;
}
- return FALSE;
+ return $this->_failure;
}
// ------------------------------------------------------------------------
@@ -212,14 +212,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('');
@@ -234,16 +234,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;
}
// ------------------------------------------------------------------------
@@ -263,9 +265,9 @@ 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 FALSE;
+ return $this->_failure;
}
}
}
@@ -275,10 +277,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;
}
// ------------------------------------------------------------------------
@@ -300,10 +302,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;
}
// ------------------------------------------------------------------------
@@ -319,7 +322,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;
}
// ------------------------------------------------------------------------
@@ -334,7 +337,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/system/libraries/Table.php b/system/libraries/Table.php
index 2d9823093..3bce294d8 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 23bdbbd58..a9b256464 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 3b6cb1645..c45398bdc 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 3f986f3e8..3ac6af78e 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 8a2dec76a..15caebebe 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 53d932a53..c4e11592d 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 55555f56f..f965858e2 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 00d1feca6..afcdbe68c 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
@@ -28,10 +28,10 @@
*
* @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) 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 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 3e98ac568..140ad7212 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
@@ -28,10 +28,10 @@
*
* @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) 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 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/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)
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(''));
diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py
index 2580b0b30..40582f88a 100644
--- a/user_guide_src/cilexer/cilexer/cilexer.py
+++ b/user_guide_src/cilexer/cilexer/cilexer.py
@@ -1,11 +1,11 @@
# CodeIgniter
-# http://codeigniter.com
+# https://codeigniter.com
#
# An open source application development framework for PHP
#
# 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
@@ -25,8 +25,8 @@
# 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) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
+# 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
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 986525437..7a0d0f9fa 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -11,12 +11,52 @@ Release Date: Not Released
- Added UNIX socket connection support to :doc:`Session Library <libraries/sessions>` 'redis' driver.
+- 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.
Version 3.0.4
=============
Release Date: Not Released
+- General Changes
+
+ - Updated :doc:`Security Library <libraries/security>` method ``get_random_bytes()`` to use PHP 7's ``random_bytes()`` function when possible.
+ - Updated :doc:`Encryption Library <libraries/security>` method ``create_key()`` to use PHP 7's ``random_bytes()`` function when possible.
+
+- :doc:`Database <database/index>`
+
+ - 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 <https://secure.php.net/ChangeLog-5.php#5.6.16>`_ for the 'mysqli' driver.
+
+Bug fixes for 3.0.4
+-------------------
+
+- Fixed a bug (#4212) - :doc:`Query Builder <database/query_builder>` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used.
+- Fixed a bug where :doc:`Form Helper <helpers/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 <libraries/config>` 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 <helpers/captcha_helper>` entered an infinite loop while generating a random string.
+- Fixed a bug (#4223) - :doc:`Database <database/index>` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly.
+- Fixed a bug (#4244) - :doc:`Email Library <libraries/email>` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding.
+- Fixed a bug (#4245) - :doc:`Database Forge <database/forge>` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values.
+- Fixed a bug (#4283) - :doc:`String Helper <helpers/string_helper>` function :php:func:`alternator()` couldn't be called without arguments.
+- Fixed a bug (#4306) - :doc:`Database <database/index>` method ``version()`` didn't work properly with the 'mssql' driver.
+- Fixed a bug (#4039) - :doc:`Session Library <libraries/sessions>` 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 <libraries/sessions>` didn't have proper error handling on PHP 5 (due to a PHP bug).
+- Fixed a bug (#4312) - :doc:`Form Validation Library <libraries/form_validation>` didn't provide error feedback for failed validation on empty requests.
+- Fixed a bug where :doc:`Database <database/index>` method `version()` returned banner text instead of only the version number with the 'oci8' and 'pdo/oci' drivers.
+- Fixed a bug (#4331) - :doc:`Database <database/index>` method ``error()`` didn't really work for connection errors with the 'mysqli' driver.
+- Fixed a bug (#4343) - :doc:`Email Library <libraries/email>` failing with a *"More than one 'from' person"* message when using *sendmail*.
+- Fixed a bug (#4350) - :doc:`Loader Library <libraries/loader>` method ``model()`` logic directly instantiated the ``CI_Model`` or ``MY_Model`` classes.
+- Fixed a bug (#4337) - :doc:`Database <database/index>` method ``query()`` didn't return a result set for queries with the ``RETURNING`` statement on PostgreSQL.
+- Fixed a bug (#4362) - :doc:`Session Library <libraries/sessions>` doesn't properly maintain its state after ID regeneration with the 'redis' and 'memcached' drivers on PHP 7.
+- Fixed a bug (#4349) - :doc:`Database <database/index>` drivers 'mysql', 'mysqli', 'pdo/mysql' discard other ``sql_mode`` flags when "stricton" is enabled.
+- Fixed a bug (#4349) - :doc:`Database <database/index>` 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 <libraries/sessions>` with the 'database' driver could be affected by userspace :doc:`Query Builder <database/query_builder>` conditions.
+
Version 3.0.3
=============
@@ -28,7 +68,7 @@ Release Date: October 31, 2015
- Changed :doc:`Config Library <libraries/config>` 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 <helpers/captcha_helper>` to use the operating system's PRNG when possible.
-- Database
+- :doc:`Database`
- Optimized :doc:`Database Utility <database/utilities>` method ``csv_from_result()`` for speed with larger result sets.
- Added proper return values to :doc:`Database Transactions <database/transactions>` method ``trans_start()``.
@@ -37,7 +77,7 @@ Bug fixes for 3.0.3
-------------------
- Fixed a bug (#4170) - :doc:`Database <database/index>` method ``insert_id()`` could return an identity from the wrong scope with the 'sqlsrv' driver.
-- Fixed a bug (#4179) - :doc:`Session Library <libraries/sessions>` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP7.
+- Fixed a bug (#4179) - :doc:`Session Library <libraries/sessions>` doesn't properly maintain its state after ID regeneration with the 'database' driver on PHP 7.
- Fixed a bug (#4173) - :doc:`Database Forge <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 <database/transactions>` didn't work with nesting in methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()``.
- Fixed a bug where :doc:`Database Transaction <database/transactions>` methods ``trans_begin()``, ``trans_commit()``, ``trans_rollback()`` ignored failures.
diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py
index de55513bf..cd060ed67 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/contributing/index.rst b/user_guide_src/source/contributing/index.rst
index ef6f4aab4..da5bb527b 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
-<http://www.codeigniter.com/userguide3/general/styleguide.html>`_, which is
+<https://codeigniter.com/userguide3/general/styleguide.html>`_, which is
essentially the `Allman indent style
-<http://en.wikipedia.org/wiki/Indent_style#Allman_style>`_, underscores and
+<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.
diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst
index 8fc26c01b..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,8 @@ This article is intended to be a reference for them.
.. php:method:: initialize()
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
+ :rtype: void
+ :throws: RuntimeException In case of failure
Initialize database settings, establish a connection to
the database.
@@ -61,14 +61,6 @@ This article is intended to be a reference for them.
Select / switch the current database.
- .. php:method:: db_set_charset($charset)
-
- :param string $charset: Character set name
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
-
- Set client character set.
-
.. php:method:: platform()
:returns: Platform name
@@ -83,7 +75,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/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 <http://www.regular-expressions.info/>`
+more about them, `regular-expressions.info <http://www.regular-expressions.info/>`_
might be a good starting point.
.. note:: You can also mix and match wildcards with regular expressions.
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..bc30a0e98 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:
<input type="hidden" name="member_id" value="234" />
-.. 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:
<input type="hidden" name="email" value="john@example.com" id="hiddenemail" class="hiddenemail" />
*/
-.. 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
@@ -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 = '']]]])
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_';
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
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.
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index c288cc8c0..9189d082e 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::
<?php
@@ -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');
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();
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
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