summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/Benchmark.php2
-rw-r--r--system/core/CodeIgniter.php6
-rw-r--r--system/core/Common.php4
-rw-r--r--system/core/Config.php2
-rw-r--r--system/core/Controller.php2
-rw-r--r--system/core/Exceptions.php2
-rw-r--r--system/core/Hooks.php2
-rw-r--r--system/core/Input.php2
-rw-r--r--system/core/Lang.php2
-rw-r--r--system/core/Loader.php2
-rw-r--r--system/core/Log.php2
-rw-r--r--system/core/Model.php2
-rw-r--r--system/core/Output.php2
-rw-r--r--system/core/Router.php2
-rw-r--r--system/core/Security.php2
-rw-r--r--system/core/URI.php2
-rw-r--r--system/core/Utf8.php2
-rw-r--r--system/core/compat/hash.php4
-rw-r--r--system/core/compat/mbstring.php4
-rw-r--r--system/core/compat/password.php4
-rw-r--r--system/core/compat/standard.php2
-rw-r--r--system/database/DB.php4
-rw-r--r--system/database/DB_cache.php2
-rw-r--r--system/database/DB_driver.php14
-rw-r--r--system/database/DB_forge.php2
-rw-r--r--system/database/DB_query_builder.php8
-rw-r--r--system/database/DB_result.php2
-rw-r--r--system/database/DB_utility.php2
-rw-r--r--system/database/drivers/cubrid/cubrid_driver.php2
-rw-r--r--system/database/drivers/cubrid/cubrid_forge.php2
-rw-r--r--system/database/drivers/cubrid/cubrid_result.php2
-rw-r--r--system/database/drivers/cubrid/cubrid_utility.php2
-rw-r--r--system/database/drivers/ibase/ibase_driver.php2
-rw-r--r--system/database/drivers/ibase/ibase_forge.php6
-rw-r--r--system/database/drivers/ibase/ibase_result.php2
-rw-r--r--system/database/drivers/ibase/ibase_utility.php2
-rw-r--r--system/database/drivers/mssql/mssql_driver.php2
-rw-r--r--system/database/drivers/mssql/mssql_forge.php2
-rw-r--r--system/database/drivers/mssql/mssql_result.php2
-rw-r--r--system/database/drivers/mssql/mssql_utility.php2
-rw-r--r--system/database/drivers/mysql/mysql_driver.php2
-rw-r--r--system/database/drivers/mysql/mysql_forge.php2
-rw-r--r--system/database/drivers/mysql/mysql_result.php2
-rw-r--r--system/database/drivers/mysql/mysql_utility.php2
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php2
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php2
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php2
-rw-r--r--system/database/drivers/mysqli/mysqli_utility.php2
-rw-r--r--system/database/drivers/oci8/oci8_driver.php2
-rw-r--r--system/database/drivers/oci8/oci8_forge.php26
-rw-r--r--system/database/drivers/oci8/oci8_result.php2
-rw-r--r--system/database/drivers/oci8/oci8_utility.php2
-rw-r--r--system/database/drivers/odbc/odbc_driver.php2
-rw-r--r--system/database/drivers/odbc/odbc_result.php2
-rw-r--r--system/database/drivers/pdo/pdo_driver.php17
-rw-r--r--system/database/drivers/pdo/pdo_result.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_4d_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_4d_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php6
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_informix_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_informix_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_driver.php6
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_forge.php28
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php6
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php6
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php2
-rw-r--r--system/database/drivers/postgre/postgre_driver.php21
-rw-r--r--system/database/drivers/postgre/postgre_forge.php6
-rw-r--r--system/database/drivers/postgre/postgre_result.php2
-rw-r--r--system/database/drivers/postgre/postgre_utility.php2
-rw-r--r--system/database/drivers/sqlite/sqlite_driver.php2
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php2
-rw-r--r--system/database/drivers/sqlite/sqlite_result.php2
-rw-r--r--system/database/drivers/sqlite/sqlite_utility.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_driver.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_forge.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_result.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_utility.php2
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php2
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_forge.php2
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_result.php2
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_utility.php2
-rw-r--r--system/helpers/array_helper.php2
-rw-r--r--system/helpers/captcha_helper.php19
-rw-r--r--system/helpers/cookie_helper.php2
-rw-r--r--system/helpers/date_helper.php2
-rw-r--r--system/helpers/directory_helper.php2
-rw-r--r--system/helpers/download_helper.php2
-rw-r--r--system/helpers/email_helper.php2
-rw-r--r--system/helpers/file_helper.php2
-rw-r--r--system/helpers/form_helper.php2
-rw-r--r--system/helpers/html_helper.php2
-rw-r--r--system/helpers/inflector_helper.php2
-rw-r--r--system/helpers/language_helper.php2
-rw-r--r--system/helpers/number_helper.php2
-rw-r--r--system/helpers/path_helper.php2
-rw-r--r--system/helpers/security_helper.php2
-rw-r--r--system/helpers/smiley_helper.php2
-rw-r--r--system/helpers/string_helper.php2
-rw-r--r--system/helpers/text_helper.php2
-rw-r--r--system/helpers/typography_helper.php2
-rw-r--r--system/helpers/url_helper.php2
-rw-r--r--system/helpers/xml_helper.php2
-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_redis.php27
-rw-r--r--system/libraries/Cache/drivers/Cache_wincache.php8
-rw-r--r--system/libraries/Calendar.php2
-rw-r--r--system/libraries/Cart.php2
-rw-r--r--system/libraries/Email.php2
-rw-r--r--system/libraries/Encrypt.php4
-rw-r--r--system/libraries/Encryption.php2
-rw-r--r--system/libraries/Form_validation.php2
-rw-r--r--system/libraries/Ftp.php2
-rw-r--r--system/libraries/Image_lib.php2
-rw-r--r--system/libraries/Javascript.php2
-rw-r--r--system/libraries/Javascript/Jquery.php2
-rw-r--r--system/libraries/Migration.php2
-rw-r--r--system/libraries/Pagination.php2
-rw-r--r--system/libraries/Parser.php2
-rw-r--r--system/libraries/Profiler.php20
-rw-r--r--system/libraries/Session/Session.php6
-rw-r--r--system/libraries/Session/SessionHandlerInterface.php2
-rw-r--r--system/libraries/Session/Session_driver.php2
-rw-r--r--system/libraries/Session/drivers/Session_database_driver.php2
-rw-r--r--system/libraries/Session/drivers/Session_files_driver.php6
-rw-r--r--system/libraries/Session/drivers/Session_memcached_driver.php2
-rw-r--r--system/libraries/Session/drivers/Session_redis_driver.php2
-rw-r--r--system/libraries/Table.php2
-rw-r--r--system/libraries/Trackback.php2
-rw-r--r--system/libraries/Typography.php2
-rw-r--r--system/libraries/Unit_test.php2
-rw-r--r--system/libraries/Upload.php6
-rw-r--r--system/libraries/User_agent.php2
-rw-r--r--system/libraries/Xmlrpc.php10
-rw-r--r--system/libraries/Xmlrpcs.php4
-rw-r--r--system/libraries/Zip.php7
150 files changed, 320 insertions, 227 deletions
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php
index 014220a44..0b48d4d0c 100644
--- a/system/core/Benchmark.php
+++ b/system/core/Benchmark.php
@@ -47,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/benchmark.html
+ * @link https://codeigniter.com/userguide3/libraries/benchmark.html
*/
class CI_Benchmark {
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 8aecc0a27..120dba599 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage CodeIgniter
* @category Front-controller
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/
+ * @link https://codeigniter.com/userguide3/
*/
/**
@@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @var string
*
*/
- const CI_VERSION = '3.1.11';
+ const CI_VERSION = '3.1.12-dev';
/*
* ------------------------------------------------------
@@ -434,7 +434,7 @@ if ( ! is_php('5.4'))
* ReflectionMethod::isConstructor() is the ONLY reliable check,
* knowing which method will be executed as a constructor.
*/
- elseif ( ! is_callable(array($class, $method)))
+ else
{
$reflection = new ReflectionMethod($class, $method);
if ( ! $reflection->isPublic() OR $reflection->isConstructor())
diff --git a/system/core/Common.php b/system/core/Common.php
index 624b5a9f7..9e23a4ea5 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage CodeIgniter
* @category Common Functions
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/
+ * @link https://codeigniter.com/userguide3/
*/
// ------------------------------------------------------------------------
@@ -565,7 +565,7 @@ if ( ! function_exists('set_status_header'))
return;
}
- $server_protocol = (isset($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.0', 'HTTP/1.1', 'HTTP/2'), TRUE))
+ $server_protocol = (isset($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.0', 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0'), TRUE))
? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
header($server_protocol.' '.$code.' '.$text, TRUE, $code);
}
diff --git a/system/core/Config.php b/system/core/Config.php
index fc6c30f86..03acf5d48 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/config.html
+ * @link https://codeigniter.com/userguide3/libraries/config.html
*/
class CI_Config {
diff --git a/system/core/Controller.php b/system/core/Controller.php
index e25b8472c..ac27989f3 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -47,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/general/controllers.html
+ * @link https://codeigniter.com/userguide3/general/controllers.html
*/
class CI_Controller {
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 90ff1abf4..986e888b6 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Exceptions
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/exceptions.html
+ * @link https://codeigniter.com/userguide3/libraries/exceptions.html
*/
class CI_Exceptions {
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 6236dd498..5560b1dc5 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/general/hooks.html
+ * @link https://codeigniter.com/userguide3/general/hooks.html
*/
class CI_Hooks {
diff --git a/system/core/Input.php b/system/core/Input.php
index 30b31d0d7..3fb4121eb 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Input
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/input.html
+ * @link https://codeigniter.com/userguide3/libraries/input.html
*/
class CI_Input {
diff --git a/system/core/Lang.php b/system/core/Lang.php
index 2c8654dcf..5cfeaf37e 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Language
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/language.html
+ * @link https://codeigniter.com/userguide3/libraries/language.html
*/
class CI_Lang {
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 14888e49a..eb3505bbe 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Loader
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/loader.html
+ * @link https://codeigniter.com/userguide3/libraries/loader.html
*/
class CI_Loader {
diff --git a/system/core/Log.php b/system/core/Log.php
index f37726e02..f66f1aa48 100644
--- a/system/core/Log.php
+++ b/system/core/Log.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Logging
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/general/errors.html
+ * @link https://codeigniter.com/userguide3/general/errors.html
*/
class CI_Log {
diff --git a/system/core/Model.php b/system/core/Model.php
index 0aadbcdc8..7e5c96894 100644
--- a/system/core/Model.php
+++ b/system/core/Model.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/config.html
+ * @link https://codeigniter.com/userguide3/libraries/config.html
*/
class CI_Model {
diff --git a/system/core/Output.php b/system/core/Output.php
index 64e7ee1f9..cef092600 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Output
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/output.html
+ * @link https://codeigniter.com/userguide3/libraries/output.html
*/
class CI_Output {
diff --git a/system/core/Router.php b/system/core/Router.php
index 90b69d07a..b528a96db 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/general/routing.html
+ * @link https://codeigniter.com/userguide3/general/routing.html
*/
class CI_Router {
diff --git a/system/core/Security.php b/system/core/Security.php
index 6a81faff1..e1dc2a92f 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Security
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/security.html
+ * @link https://codeigniter.com/userguide3/libraries/security.html
*/
class CI_Security {
diff --git a/system/core/URI.php b/system/core/URI.php
index a8b98ae93..9c1baa239 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category URI
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/uri.html
+ * @link https://codeigniter.com/userguide3/libraries/uri.html
*/
class CI_URI {
diff --git a/system/core/Utf8.php b/system/core/Utf8.php
index 9ee63e929..418fc7e17 100644
--- a/system/core/Utf8.php
+++ b/system/core/Utf8.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category UTF-8
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/utf8.html
+ * @link https://codeigniter.com/userguide3/libraries/utf8.html
*/
class CI_Utf8 {
diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php
index 8f5510c3f..e2a4414d0 100644
--- a/system/core/compat/hash.php
+++ b/system/core/compat/hash.php
@@ -44,8 +44,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage CodeIgniter
* @category Compatibility
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/
- * @link http://php.net/hash
+ * @link https://codeigniter.com/userguide3/
+ * @link https://secure.php.net/hash
*/
// ------------------------------------------------------------------------
diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php
index 552e72719..c7ad926c1 100644
--- a/system/core/compat/mbstring.php
+++ b/system/core/compat/mbstring.php
@@ -44,8 +44,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage CodeIgniter
* @category Compatibility
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/
- * @link http://php.net/mbstring
+ * @link https://codeigniter.com/userguide3/
+ * @link https://secure.php.net/mbstring
*/
// ------------------------------------------------------------------------
diff --git a/system/core/compat/password.php b/system/core/compat/password.php
index 5a3bc2076..42e82b25a 100644
--- a/system/core/compat/password.php
+++ b/system/core/compat/password.php
@@ -44,8 +44,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage CodeIgniter
* @category Compatibility
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/
- * @link http://php.net/password
+ * @link https://codeigniter.com/userguide3/
+ * @link https://secure.php.net/password
*/
// ------------------------------------------------------------------------
diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php
index 2c528fd7c..0ae47d3bd 100644
--- a/system/core/compat/standard.php
+++ b/system/core/compat/standard.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage CodeIgniter
* @category Compatibility
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/
+ * @link https://codeigniter.com/userguide3/
*/
// ------------------------------------------------------------------------
diff --git a/system/database/DB.php b/system/database/DB.php
index 02e0e1d39..f9ed0be76 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*
* @param string|string[] $params
* @param bool $query_builder_override
@@ -185,7 +185,7 @@ function &DB($params = '', $query_builder_override = NULL)
elseif ( ! class_exists('CI_DB', FALSE))
{
/**
- * @ignore
+ * @ignore
*/
class CI_DB extends CI_DB_driver { }
}
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index afcfc4cf9..2467a30f2 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_Cache {
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 5ae0442a3..c7bca96d8 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
abstract class CI_DB_driver {
@@ -887,6 +887,18 @@ abstract class CI_DB_driver {
{
return $this->_trans_status;
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Returns TRUE if a transaction is currently active
+ *
+ * @return bool
+ */
+ public function trans_active()
+ {
+ return (bool) $this->_trans_depth;
+ }
// --------------------------------------------------------------------
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 85b58fdeb..7c31bd3c3 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
abstract class CI_DB_forge {
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index f35b9fd0a..52538c695 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
abstract class CI_DB_query_builder extends CI_DB_driver {
@@ -529,7 +529,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
{
$type = strtoupper(trim($type));
- if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
+ if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER', 'FULL OUTER', 'FULL'), TRUE))
{
$type = '';
}
@@ -1119,7 +1119,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
/**
* GROUP BY
*
- * @param string $by
+ * @param mixed $by
* @param bool $escape
* @return CI_DB_query_builder
*/
@@ -1412,7 +1412,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$qb_cache_orderby = $this->qb_cache_orderby;
$this->qb_orderby = $this->qb_cache_orderby = array();
- $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby) OR $this->qb_limit OR $this->qb_offset)
+ $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby) OR ! empty($this->qb_having) OR $this->qb_limit OR $this->qb_offset)
? $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 ed5252d49..b481de475 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_result {
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 6642fda8f..a843754b4 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
abstract class CI_DB_utility {
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php
index b3b436fed..b133c1025 100644
--- a/system/database/drivers/cubrid/cubrid_driver.php
+++ b/system/database/drivers/cubrid/cubrid_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author Esen Sagynov
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 69b53dd49..8c7cd52db 100644
--- a/system/database/drivers/cubrid/cubrid_forge.php
+++ b/system/database/drivers/cubrid/cubrid_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author Esen Sagynov
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 75d702558..988fba6d8 100644
--- a/system/database/drivers/cubrid/cubrid_result.php
+++ b/system/database/drivers/cubrid/cubrid_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author Esen Sagynov
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 ccf794b75..d860bee08 100644
--- a/system/database/drivers/cubrid/cubrid_utility.php
+++ b/system/database/drivers/cubrid/cubrid_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author Esen Sagynov
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 27e87d427..85badc2fe 100644
--- a/system/database/drivers/ibase/ibase_driver.php
+++ b/system/database/drivers/ibase/ibase_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 29a3acf69..940080320 100644
--- a/system/database/drivers/ibase/ibase_forge.php
+++ b/system/database/drivers/ibase/ibase_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_ibase_forge extends CI_DB_forge {
@@ -140,7 +140,7 @@ class CI_DB_ibase_forge extends CI_DB_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -183,7 +183,7 @@ class CI_DB_ibase_forge extends CI_DB_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php
index 86530973b..c3e4ed7a6 100644
--- a/system/database/drivers/ibase/ibase_result.php
+++ b/system/database/drivers/ibase/ibase_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 a80874924..1fc34254e 100644
--- a/system/database/drivers/ibase/ibase_utility.php
+++ b/system/database/drivers/ibase/ibase_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 e197cfb02..fbb7e1032 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_mssql_driver extends CI_DB {
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index 07b93c24d..f79416031 100644
--- a/system/database/drivers/mssql/mssql_forge.php
+++ b/system/database/drivers/mssql/mssql_forge.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 5d7d3bedc..6cae3050d 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 5c9941aca..1aad485b7 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 440715ae1..e5d16bd88 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_mysql_driver extends CI_DB {
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index b69aa36b4..e59366bed 100644
--- a/system/database/drivers/mysql/mysql_forge.php
+++ b/system/database/drivers/mysql/mysql_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 842d7d399..461f643df 100644
--- a/system/database/drivers/mysql/mysql_result.php
+++ b/system/database/drivers/mysql/mysql_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 a54892975..6089da533 100644
--- a/system/database/drivers/mysql/mysql_utility.php
+++ b/system/database/drivers/mysql/mysql_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 0ca0f48fc..c16897632 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_mysqli_driver extends CI_DB {
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 92b1e94d1..b67fe56cb 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 0856eca4e..7e4e45f39 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 606424655..75e35d116 100644
--- a/system/database/drivers/mysqli/mysqli_utility.php
+++ b/system/database/drivers/mysqli/mysqli_utility.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 a825c4a38..a9d75ebf2 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
/**
diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php
index 58f3c3913..7dc7b2ade 100644
--- a/system/database/drivers/oci8/oci8_forge.php
+++ b/system/database/drivers/oci8/oci8_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_oci8_forge extends CI_DB_forge {
@@ -159,7 +159,29 @@ class CI_DB_oci8_forge extends CI_DB_forge {
*/
protected function _attr_auto_increment(&$attributes, &$field)
{
- // Not supported - sequences and triggers must be used instead
+ if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'number') !== FALSE && version_compare($this->db->version(), '12.1', '>='))
+ {
+ $field['auto_increment'] = ' GENERATED ALWAYS AS IDENTITY';
+ }
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Process column
+ *
+ * @param array $field
+ * @return string
+ */
+ protected function _process_column($field)
+ {
+ return $this->db->escape_identifiers($field['name'])
+ .' '.$field['type'].$field['length']
+ .$field['unsigned']
+ .$field['default']
+ .$field['auto_increment']
+ .$field['null']
+ .$field['unique'];
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index 3da49aa76..7fd911e82 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 3a7261c15..a0a9c2c95 100644
--- a/system/database/drivers/oci8/oci8_utility.php
+++ b/system/database/drivers/oci8/oci8_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 72289bf9f..f02da4d13 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_odbc_driver extends CI_DB_driver {
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index a06ac4b9e..6aff76941 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_odbc_result extends CI_DB_result {
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index c5d120fd3..d0a2bf959 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_driver extends CI_DB {
@@ -302,7 +302,7 @@ class CI_DB_pdo_driver extends CI_DB {
$error['code'] = isset($pdo_error[1]) ? $pdo_error[0].'/'.$pdo_error[1] : $pdo_error[0];
if (isset($pdo_error[2]))
{
- $error['message'] = $pdo_error[2];
+ $error['message'] = $pdo_error[2];
}
return $error;
@@ -326,4 +326,17 @@ class CI_DB_pdo_driver extends CI_DB {
return 'TRUNCATE TABLE '.$table;
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Close DB Connection
+ *
+ * @return void
+ */
+ protected function _close()
+ {
+ $this->result_id = FALSE;
+ $this->conn_id = FALSE;
+ }
+
}
diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php
index b3973da46..f0f56c3f7 100644
--- a/system/database/drivers/pdo/pdo_result.php
+++ b/system/database/drivers/pdo/pdo_result.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_result extends CI_DB_result {
diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
index 2e39bb236..63f6f84b5 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 306150b9a..f7fa54316 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 9a6b643fc..05887bcfb 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 f2ee3f5ea..32ccc8cca 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 09dbdf08f..06f03ccce 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 f38ac99ba..692b76d89 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 2c49f1216..4e4dd27e1 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 eceb59796..c3d25b6f6 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge {
@@ -126,7 +126,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -169,7 +169,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
index 00654d7c0..16b1c6e11 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 99d75b645..8ea4838db 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 114eb7470..98f463895 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 1f4bcd1af..91a935908 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 73b88bcfd..0f53e3192 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
index 01595a603..7713f6732 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 dba49585c..82f0145ba 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver {
@@ -142,9 +142,9 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver {
}
$version_string = parent::version();
- if (preg_match('#Release\s(?<version>\d+(?:\.\d+)+)#', $version_string, $match))
+ if (preg_match('#(Release\s)?(?<version>\d+(?:\.\d+)+)#', $version_string, $match))
{
- return $this->data_cache['version'] = $match[1];
+ return $this->data_cache['version'] = $match['version'];
}
return FALSE;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
index b5d3eb143..0700d6369 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge {
@@ -150,9 +150,33 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge {
*/
protected function _attr_auto_increment(&$attributes, &$field)
{
- // Not supported - sequences and triggers must be used instead
+ if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'number') !== FALSE && version_compare($this->db->version(), '12.1', '>='))
+ {
+ $field['auto_increment'] = ' GENERATED ALWAYS AS IDENTITY';
+ }
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Process column
+ *
+ * @param array $field
+ * @return string
+ */
+ protected function _process_column($field)
+ {
+ return $this->db->escape_identifiers($field['name'])
+ .' '.$field['type'].$field['length']
+ .$field['unsigned']
+ .$field['default']
+ .$field['auto_increment']
+ .$field['null']
+ .$field['unique'];
}
+ // --------------------------------------------------------------------
+
/**
* Field attribute TYPE
*
diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
index 93a6420e5..2522debec 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver {
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
index 2d0c74b2e..f6241136d 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
@@ -255,7 +255,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
{
return 'SELECT "column_name"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
}
// --------------------------------------------------------------------
@@ -270,7 +270,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
{
$sql = 'SELECT "column_name", "data_type", "character_maximum_length", "numeric_precision", "column_default"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
if (($query = $this->query($sql)) === FALSE)
{
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
index a4ccff407..187cb2d09 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
@@ -106,7 +106,7 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -154,7 +154,7 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php
index f55d9a6c7..634b837c9 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 545b2a3d8..fd9696fb8 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 84109ae30..1c83593df 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 b23c6d44e..22375949a 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 5ce276105..84717d8b5 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_postgre_driver extends CI_DB {
@@ -78,22 +78,12 @@ class CI_DB_postgre_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Class constructor
+ * Build DSN
*
- * Creates a DSN string to be used for db_connect() and db_pconnect()
- *
- * @param array $params
* @return void
*/
- public function __construct($params)
+ protected function _build_dsn()
{
- parent::__construct($params);
-
- if ( ! empty($this->dsn))
- {
- return;
- }
-
$this->dsn === '' OR $this->dsn = '';
if (strpos($this->hostname, '/') !== FALSE)
@@ -149,6 +139,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
public function db_connect($persistent = FALSE)
{
+ empty($this->dsn) && $this->_build_dsn();
$this->conn_id = ($persistent === TRUE)
? pg_pconnect($this->dsn)
: pg_connect($this->dsn);
@@ -428,7 +419,7 @@ class CI_DB_postgre_driver extends CI_DB {
{
return 'SELECT "column_name"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
}
// --------------------------------------------------------------------
@@ -443,7 +434,7 @@ class CI_DB_postgre_driver extends CI_DB {
{
$sql = 'SELECT "column_name", "data_type", "character_maximum_length", "numeric_precision", "column_default"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
if (($query = $this->query($sql)) === FALSE)
{
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index 481e222b8..6f214c665 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/database/
*/
class CI_DB_postgre_forge extends CI_DB_forge {
@@ -101,7 +101,7 @@ class CI_DB_postgre_forge extends CI_DB_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -149,7 +149,7 @@ class CI_DB_postgre_forge extends CI_DB_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php
index b0054ddae..a0a628f0a 100644
--- a/system/database/drivers/postgre/postgre_result.php
+++ b/system/database/drivers/postgre/postgre_result.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 450aa36e4..e6e7b28ba 100644
--- a/system/database/drivers/postgre/postgre_utility.php
+++ b/system/database/drivers/postgre/postgre_utility.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 aec3d748c..575ed2841 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 6aa9c61c4..118d77fd8 100644
--- a/system/database/drivers/sqlite/sqlite_forge.php
+++ b/system/database/drivers/sqlite/sqlite_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 30c93a26f..170e1b565 100644
--- a/system/database/drivers/sqlite/sqlite_result.php
+++ b/system/database/drivers/sqlite/sqlite_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 2c7f8099e..99b61227a 100644
--- a/system/database/drivers/sqlite/sqlite_utility.php
+++ b/system/database/drivers/sqlite/sqlite_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 5d057ba5a..d456250f2 100644
--- a/system/database/drivers/sqlite3/sqlite3_driver.php
+++ b/system/database/drivers/sqlite3/sqlite3_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 4019a9523..52894e857 100644
--- a/system/database/drivers/sqlite3/sqlite3_forge.php
+++ b/system/database/drivers/sqlite3/sqlite3_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 d656fed12..a48cbcf56 100644
--- a/system/database/drivers/sqlite3/sqlite3_result.php
+++ b/system/database/drivers/sqlite3/sqlite3_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 1bdf3ae37..c80dd4f97 100644
--- a/system/database/drivers/sqlite3/sqlite3_utility.php
+++ b/system/database/drivers/sqlite3/sqlite3_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 a22a8b316..33f971ff4 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 90c3120a5..610d2e426 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_forge.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 e2649c666..bf5884429 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_result.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_result.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 6dd01a990..bb2a67806 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_utility.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php
@@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*
* @category Database
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/database/
+ * @link https://codeigniter.com/userguide3/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 cb7eca68b..2c359240a 100644
--- a/system/helpers/array_helper.php
+++ b/system/helpers/array_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/array_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/array_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 37ef04b24..5e75594f3 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/captcha_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/captcha_helper.html
*/
// ------------------------------------------------------------------------
@@ -94,10 +94,21 @@ if ( ! function_exists('create_captcha'))
}
}
- if ($img_path === '' OR $img_url === ''
- OR ! is_dir($img_path) OR ! is_really_writable($img_path)
- OR ! extension_loaded('gd'))
+ if ( ! extension_loaded('gd'))
{
+ log_message('error', 'create_captcha(): GD extension is not loaded.');
+ return FALSE;
+ }
+
+ if ($img_path === '' OR $img_url === '')
+ {
+ log_message('error', 'create_captcha(): $img_path and $img_url are required.');
+ return FALSE;
+ }
+
+ if ( ! is_dir($img_path) OR ! is_really_writable($img_path))
+ {
+ log_message('error', "create_captcha(): '{$img_path}' is not a dir, nor is it writable.");
return FALSE;
}
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index b9c2cb68a..1d7c9dc1c 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/cookie_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/cookie_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 5c660e2ee..ba21870be 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/date_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/date_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index 73777bfb5..4732db57b 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/directory_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/directory_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index d8e30ae9f..1bdad54a5 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/download_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/download_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php
index b25875974..37f86b269 100644
--- a/system/helpers/email_helper.php
+++ b/system/helpers/email_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/email_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/email_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index cf00f6b56..612fb0834 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/file_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/file_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 5910d8e14..6c48e742d 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/form_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/form_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index 76adcb236..d0a0e7d48 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/html_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/html_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index 1c14f4a3e..33e6b13fb 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/inflector_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/inflector_helper.html
*/
// --------------------------------------------------------------------
diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php
index 2cefcc277..dff6a6b24 100644
--- a/system/helpers/language_helper.php
+++ b/system/helpers/language_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/language_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/language_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php
index 15a53ff72..55fa1e5a0 100644
--- a/system/helpers/number_helper.php
+++ b/system/helpers/number_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/number_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/number_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php
index 543e4c078..47d10c2f5 100644
--- a/system/helpers/path_helper.php
+++ b/system/helpers/path_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/path_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/path_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index b931c3393..f14d8f020 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/security_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/security_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 321e59cef..fb1b8ce57 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/smiley_helper.html
+ * @link https://codeigniter.com/userguide3/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 c7dd96977..2d936fdc6 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/string_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/string_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index e1c5e246e..5d5a958e2 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/text_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/text_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index d308a57d5..47617ffb2 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/typography_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/typography_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index bebfd2583..ca3239e3a 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/url_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/url_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php
index 2639956fe..f83f3f544 100644
--- a/system/helpers/xml_helper.php
+++ b/system/helpers/xml_helper.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/helpers/xml_helper.html
+ * @link https://codeigniter.com/userguide3/helpers/xml_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php
index 8da8854ee..c0527e665 100644
--- a/system/libraries/Cache/drivers/Cache_apc.php
+++ b/system/libraries/Cache/drivers/Cache_apc.php
@@ -160,10 +160,10 @@ class CI_Cache_apc extends CI_Driver {
* @param string user/filehits
* @return mixed array on success, false on failure
*/
- public function cache_info($type = NULL)
- {
- return apc_cache_info($type);
- }
+ public function cache_info($type = NULL)
+ {
+ return apc_cache_info($type);
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php
index fdb9042ef..0a90d0692 100644
--- a/system/libraries/Cache/drivers/Cache_dummy.php
+++ b/system/libraries/Cache/drivers/Cache_dummy.php
@@ -138,10 +138,10 @@ class CI_Cache_dummy extends CI_Driver {
* @param string user/filehits
* @return bool FALSE
*/
- public function cache_info($type = NULL)
- {
- return FALSE;
- }
+ public function cache_info($type = NULL)
+ {
+ return FALSE;
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index bff96fbfb..f0a72ee3c 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -83,6 +83,13 @@ class CI_Cache_redis extends CI_Driver
*/
protected static $_delete_name;
+ /**
+ * sRem()/sRemove() method name depending on phpRedis version
+ *
+ * @var string
+ */
+ protected static $_sRemove_name;
+
// ------------------------------------------------------------------------
/**
@@ -104,9 +111,19 @@ class CI_Cache_redis extends CI_Driver
return;
}
- isset(static::$_delete_name) OR static::$_delete_name = version_compare(phpversion('phpredis'), '5', '>=')
- ? 'del'
- : 'delete';
+ if ( ! isset(static::$_delete_name, static::$_sRemove_name))
+ {
+ if (version_compare(phpversion('redis'), '5', '>='))
+ {
+ static::$_delete_name = 'del';
+ static::$_sRemove_name = 'sRem';
+ }
+ else
+ {
+ static::$_delete_name = 'delete';
+ static::$_sRemove_name = 'sRemove';
+ }
+ }
$CI =& get_instance();
@@ -193,7 +210,7 @@ class CI_Cache_redis extends CI_Driver
}
else
{
- $this->_redis->sRemove('_ci_redis_serialized', $id);
+ $this->_redis->{static::$_sRemove_name}('_ci_redis_serialized', $id);
}
return $this->_redis->set($id, $data, $ttl);
@@ -214,7 +231,7 @@ class CI_Cache_redis extends CI_Driver
return FALSE;
}
- $this->_redis->sRemove('_ci_redis_serialized', $key);
+ $this->_redis->{static::$_sRemove_name}('_ci_redis_serialized', $key);
return TRUE;
}
diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php
index 1feaa158f..c20d0bc91 100644
--- a/system/libraries/Cache/drivers/Cache_wincache.php
+++ b/system/libraries/Cache/drivers/Cache_wincache.php
@@ -169,10 +169,10 @@ class CI_Cache_wincache extends CI_Driver {
*
* @return mixed array on success, false on failure
*/
- public function cache_info()
- {
- return wincache_ucache_info(TRUE);
- }
+ public function cache_info()
+ {
+ return wincache_ucache_info(TRUE);
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index a6bdae50a..fcfcf62ca 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/calendar.html
+ * @link https://codeigniter.com/userguide3/libraries/calendar.html
*/
class CI_Calendar {
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index 6a107752c..a4c73e5e7 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Shopping Cart
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/cart.html
+ * @link https://codeigniter.com/userguide3/libraries/cart.html
* @deprecated 3.0.0 This class is too specific for CI.
*/
class CI_Cart {
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 10b74777d..dcc4ca0d3 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/email.html
+ * @link https://codeigniter.com/userguide3/libraries/email.html
*/
class CI_Email {
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index 7ed185f1b..df1af4cf4 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/encryption.html
+ * @link https://codeigniter.com/userguide3/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 https://codeigniter.com/user_guide/installation/upgrade_200.html#encryption
+ * For more details, see https://codeigniter.com/userguide3/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 4c1973fee..cb8ad9de9 100644
--- a/system/libraries/Encryption.php
+++ b/system/libraries/Encryption.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/encryption.html
+ * @link https://codeigniter.com/userguide3/libraries/encryption.html
*/
class CI_Encryption {
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index fdf202010..9d976984e 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Validation
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/form_validation.html
+ * @link https://codeigniter.com/userguide3/libraries/form_validation.html
*/
class CI_Form_validation {
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 4f0f5dfb3..61fa80c0f 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/ftp.html
+ * @link https://codeigniter.com/userguide3/libraries/ftp.html
*/
class CI_FTP {
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index b89bc5b7e..7e7d4c85c 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Image_lib
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/image_lib.html
+ * @link https://codeigniter.com/userguide3/libraries/image_lib.html
*/
class CI_Image_lib {
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index c9103945b..c0cf676f2 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Javascript
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/javascript.html
+ * @link https://codeigniter.com/userguide3/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 485d1dc18..0649ee1ae 100644
--- a/system/libraries/Javascript/Jquery.php
+++ b/system/libraries/Javascript/Jquery.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Loader
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/javascript.html
+ * @link https://codeigniter.com/userguide3/libraries/javascript.html
*/
class CI_Jquery extends CI_Javascript {
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index 1b7808923..915d4e453 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -288,7 +288,7 @@ class CI_Migration {
$this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class);
return FALSE;
}
- elseif ( ! is_callable(array($class, $method)))
+ elseif ( ! method_exists($class, $method) OR ! (new ReflectionMethod($class, $method))->isPublic())
{
$this->_error_string = sprintf($this->lang->line('migration_missing_'.$method.'_method'), $class);
return FALSE;
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 5d501a966..69e00e266 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Pagination
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/pagination.html
+ * @link https://codeigniter.com/userguide3/libraries/pagination.html
*/
class CI_Pagination {
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php
index d3c6500ae..04476f1a2 100644
--- a/system/libraries/Parser.php
+++ b/system/libraries/Parser.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Parser
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/parser.html
+ * @link https://codeigniter.com/userguide3/libraries/parser.html
*/
class CI_Parser {
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index 77af7b99b..5531f3366 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/general/profiling.html
+ * @link https://codeigniter.com/userguide3/general/profiling.html
*/
class CI_Profiler {
@@ -105,7 +105,7 @@ class CI_Profiler {
{
if ( ! isset($config[$section]))
{
- $this->_compile_{$section} = TRUE;
+ $this->{'_compile_'.$section} = TRUE;
}
}
@@ -135,7 +135,7 @@ class CI_Profiler {
{
if (in_array($method, $this->_available_sections))
{
- $this->_compile_{$method} = ($enable !== FALSE);
+ $this->{'_compile_'.$method} = ($enable !== FALSE);
}
}
}
@@ -486,13 +486,13 @@ class CI_Profiler {
{
$pre = '';
$pre_close = '';
-
+
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
-
+
$pre = '<pre>' ;
- $pre_close = '</pre>';
+ $pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
@@ -524,13 +524,13 @@ class CI_Profiler {
{
$pre = '';
$pre_close = '';
-
+
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
-
+
$pre = '<pre>' ;
- $pre_close = '</pre>';
+ $pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
@@ -554,7 +554,7 @@ class CI_Profiler {
foreach ($this->_available_sections as $section)
{
- if ($this->_compile_{$section} !== FALSE)
+ if ($this->{'_compile_'.$section} !== FALSE)
{
$func = '_compile_'.$section;
$output .= $this->{$func}();
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 9b834f86a..06b953ab2 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
class CI_Session {
@@ -415,9 +415,7 @@ class CI_Session {
{
$_SESSION['__ci_vars'][$key] = 'old';
}
- // Hacky, but 'old' will (implicitly) always be less than time() ;)
- // DO NOT move this above the 'new' check!
- elseif ($value < $current_time)
+ elseif ($value === 'old' || $value < $current_time)
{
unset($_SESSION[$key], $_SESSION['__ci_vars'][$key]);
}
diff --git a/system/libraries/Session/SessionHandlerInterface.php b/system/libraries/Session/SessionHandlerInterface.php
index 240c5f54e..95d2488b4 100644
--- a/system/libraries/Session/SessionHandlerInterface.php
+++ b/system/libraries/Session/SessionHandlerInterface.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
interface SessionHandlerInterface {
diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php
index dbc833739..734b6e052 100644
--- a/system/libraries/Session/Session_driver.php
+++ b/system/libraries/Session/Session_driver.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
abstract class CI_Session_driver implements SessionHandlerInterface {
diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php
index 89afe3455..a3055af5e 100644
--- a/system/libraries/Session/drivers/Session_database_driver.php
+++ b/system/libraries/Session/drivers/Session_database_driver.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
class CI_Session_database_driver extends CI_Session_driver implements SessionHandlerInterface {
diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php
index 2899b7dec..49bf5b781 100644
--- a/system/libraries/Session/drivers/Session_files_driver.php
+++ b/system/libraries/Session/drivers/Session_files_driver.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
class CI_Session_files_driver extends CI_Session_driver implements SessionHandlerInterface {
@@ -196,6 +196,10 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
$this->_fingerprint = md5('');
return '';
}
+
+ // Prevent possible data corruption
+ // See https://github.com/bcit-ci/CodeIgniter/issues/5857
+ clearstatcache(TRUE, $this->_file_path.$session_id);
}
// We shouldn't need this, but apparently we do ...
// See https://github.com/bcit-ci/CodeIgniter/issues/4039
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php
index 854adf821..b4d3eb464 100644
--- a/system/libraries/Session/drivers/Session_memcached_driver.php
+++ b/system/libraries/Session/drivers/Session_memcached_driver.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
class CI_Session_memcached_driver extends CI_Session_driver implements SessionHandlerInterface {
diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php
index df38174b4..d65c6ee14 100644
--- a/system/libraries/Session/drivers/Session_redis_driver.php
+++ b/system/libraries/Session/drivers/Session_redis_driver.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
- * @link https://codeigniter.com/user_guide/libraries/sessions.html
+ * @link https://codeigniter.com/userguide3/libraries/sessions.html
*/
class CI_Session_redis_driver extends CI_Session_driver implements SessionHandlerInterface {
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 06e8d7098..46f66949b 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category HTML Tables
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/table.html
+ * @link https://codeigniter.com/userguide3/libraries/table.html
*/
class CI_Table {
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index 07f066d01..75ccae8f8 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Trackbacks
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/trackback.html
+ * @link https://codeigniter.com/userguide3/libraries/trackback.html
*/
class CI_Trackback {
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index e67138c1a..d919d484a 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Helpers
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/typography.html
+ * @link https://codeigniter.com/userguide3/libraries/typography.html
*/
class CI_Typography {
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index 631d583ba..55e3bfcb2 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category UnitTesting
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/unit_testing.html
+ * @link https://codeigniter.com/userguide3/libraries/unit_testing.html
*/
class CI_Unit_test {
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 29f9f5ff9..ae60f35af 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Uploads
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/file_uploading.html
+ * @link https://codeigniter.com/userguide3/libraries/file_uploading.html
*/
class CI_Upload {
@@ -867,7 +867,7 @@ class CI_Upload {
$this->file_type = 'image/jpeg';
}
- $img_mimes = array('image/gif', 'image/jpeg', 'image/png');
+ $img_mimes = array('image/gif', 'image/jpeg', 'image/png', 'image/webp');
return in_array($this->file_type, $img_mimes, TRUE);
}
@@ -901,7 +901,7 @@ class CI_Upload {
}
// Images get some additional checks
- if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png'), TRUE) && @getimagesize($this->file_temp) === FALSE)
+ if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png', 'webp'), TRUE) && @getimagesize($this->file_temp) === FALSE)
{
return FALSE;
}
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index a70511fc3..a42975b35 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category User Agent
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/user_agent.html
+ * @link https://codeigniter.com/userguide3/libraries/user_agent.html
*/
class CI_User_agent {
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index 690b245be..32b236b43 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -51,7 +51,7 @@ if ( ! function_exists('xml_parser_create'))
* @subpackage Libraries
* @category XML-RPC
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html
+ * @link https://codeigniter.com/userguide3/libraries/xmlrpc.html
*/
class CI_Xmlrpc {
@@ -559,7 +559,7 @@ class CI_Xmlrpc {
*
* @category XML-RPC
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html
+ * @link https://codeigniter.com/userguide3/libraries/xmlrpc.html
*/
class XML_RPC_Client extends CI_Xmlrpc
{
@@ -780,7 +780,7 @@ class XML_RPC_Client extends CI_Xmlrpc
*
* @category XML-RPC
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html
+ * @link https://codeigniter.com/userguide3/libraries/xmlrpc.html
*/
class XML_RPC_Response
{
@@ -1030,7 +1030,7 @@ class XML_RPC_Response
*
* @category XML-RPC
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html
+ * @link https://codeigniter.com/userguide3/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 https://codeigniter.com/user_guide/libraries/xmlrpc.html
+ * @link https://codeigniter.com/userguide3/libraries/xmlrpc.html
*/
class XML_RPC_Values extends CI_Xmlrpc
{
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index e70b80397..e20bf4836 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -56,7 +56,7 @@ if ( ! class_exists('CI_Xmlrpc', FALSE))
* @subpackage Libraries
* @category XML-RPC
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/xmlrpc.html
+ * @link https://codeigniter.com/userguide3/libraries/xmlrpc.html
*/
class CI_Xmlrpcs extends CI_Xmlrpc {
@@ -348,7 +348,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
}
}
- elseif (($objectCall && ! is_callable(array($method_parts[0], $method_parts[1])))
+ elseif (($objectCall && ( ! method_exists($method_parts[0], $method_parts[1]) OR ! (new ReflectionMethod($method_parts[0], $method_parts[1]))->isPublic()))
OR ( ! $objectCall && ! is_callable($this->methods[$methName]['function']))
)
{
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index c0a14023d..e99873ae7 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Encryption
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/zip.html
+ * @link https://codeigniter.com/userguide3/libraries/zip.html
*/
class CI_Zip {
@@ -406,13 +406,14 @@ class CI_Zip {
return FALSE;
}
- return $this->zipdata
- .$this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00"
+ // @see https://github.com/bcit-ci/CodeIgniter/issues/5864
+ $footer = $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00"
.pack('v', $this->entries) // total # of entries "on this disk"
.pack('v', $this->entries) // total # of entries overall
.pack('V', self::strlen($this->directory)) // size of central dir
.pack('V', self::strlen($this->zipdata)) // offset to start of central dir
."\x00\x00"; // .zip file comment length
+ return $this->zipdata.$footer;
}
// --------------------------------------------------------------------