summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/core/CodeIgniter.php6
-rw-r--r--system/core/Common.php4
-rw-r--r--system/core/Hooks.php2
-rw-r--r--system/core/Loader.php10
-rw-r--r--system/core/Output.php2
-rw-r--r--system/database/DB.php4
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/database/DB_query_builder.php1
-rw-r--r--system/database/drivers/pdo/pdo_driver.php7
-rw-r--r--system/libraries/Cache/drivers/Cache_memcached.php4
-rw-r--r--system/libraries/Migration.php2
-rw-r--r--system/libraries/Session/drivers/Session_cookie.php3
-rw-r--r--system/libraries/Xmlrpcs.php2
-rwxr-xr-xtests/mocks/database/ci_test.sqlitebin19456 -> 19456 bytes
-rw-r--r--tests/mocks/libraries/session.php4
-rw-r--r--user_guide_src/source/changelog.rst2
-rw-r--r--user_guide_src/source/tutorial/news_section.rst4
17 files changed, 29 insertions, 30 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index cb4b735d5..7f76977b5 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -263,7 +263,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$class = $RTR->fetch_class();
$method = $RTR->fetch_method();
- if ( ! class_exists($class) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
+ if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
{
if ( ! empty($RTR->routes['404_override']))
{
@@ -272,7 +272,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$method = 'index';
}
- if ( ! class_exists($class))
+ if ( ! class_exists($class, FALSE))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
@@ -310,7 +310,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$method = 'index';
}
- if ( ! class_exists($class))
+ if ( ! class_exists($class, FALSE))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
diff --git a/system/core/Common.php b/system/core/Common.php
index f8c1290f5..ee9bb2e87 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -149,7 +149,7 @@ if ( ! function_exists('load_class'))
{
$name = $prefix.$class;
- if (class_exists($name) === FALSE)
+ if (class_exists($name, FALSE) === FALSE)
{
require_once($path.$directory.'/'.$class.'.php');
}
@@ -163,7 +163,7 @@ if ( ! function_exists('load_class'))
{
$name = config_item('subclass_prefix').$class;
- if (class_exists($name) === FALSE)
+ if (class_exists($name, FALSE) === FALSE)
{
require_once(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php');
}
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 17f6a027e..b3b111991 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -195,7 +195,7 @@ class CI_Hooks {
// Call the requested class and/or function
if ($class !== FALSE)
{
- if ( ! class_exists($class))
+ if ( ! class_exists($class, FALSE))
{
require($filepath);
}
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 9306a09ef..6e5b58ba7 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -270,7 +270,7 @@ class CI_Loader {
continue;
}
- if ($db_conn !== FALSE && ! class_exists('CI_DB'))
+ if ($db_conn !== FALSE && ! class_exists('CI_DB', FALSE))
{
if ($db_conn === TRUE)
{
@@ -280,7 +280,7 @@ class CI_Loader {
$CI->load->database($db_conn, FALSE, TRUE);
}
- if ( ! class_exists('CI_Model'))
+ if ( ! class_exists('CI_Model', FALSE))
{
load_class('Model', 'core');
}
@@ -1091,11 +1091,11 @@ class CI_Loader {
if ($prefix === '')
{
- if (class_exists('CI_'.$class))
+ if (class_exists('CI_'.$class, FALSE))
{
$name = 'CI_'.$class;
}
- elseif (class_exists(config_item('subclass_prefix').$class))
+ elseif (class_exists(config_item('subclass_prefix').$class, FALSE))
{
$name = config_item('subclass_prefix').$class;
}
@@ -1110,7 +1110,7 @@ class CI_Loader {
}
// Is the class name valid?
- if ( ! class_exists($name))
+ if ( ! class_exists($name, FALSE))
{
log_message('error', 'Non-existent class: '.$name);
show_error('Non-existent class: '.$name);
diff --git a/system/core/Output.php b/system/core/Output.php
index a20841463..25ecd496c 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -395,7 +395,7 @@ class CI_Output {
global $BM, $CFG;
// Grab the super object if we can.
- if (class_exists('CI_Controller'))
+ if (class_exists('CI_Controller', FALSE))
{
$CI =& get_instance();
}
diff --git a/system/database/DB.php b/system/database/DB.php
index d9104747f..83d973304 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -149,7 +149,7 @@ function &DB($params = '', $query_builder_override = NULL)
if ( ! isset($query_builder) OR $query_builder === TRUE)
{
require_once(BASEPATH.'database/DB_query_builder.php');
- if ( ! class_exists('CI_DB'))
+ if ( ! class_exists('CI_DB', FALSE))
{
/**
* CI_DB
@@ -162,7 +162,7 @@ function &DB($params = '', $query_builder_override = NULL)
class CI_DB extends CI_DB_query_builder { }
}
}
- elseif ( ! class_exists('CI_DB'))
+ elseif ( ! class_exists('CI_DB', FALSE))
{
/**
* @ignore
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 05abd864b..ed0296d76 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1560,7 +1560,7 @@ abstract class CI_DB_driver {
*/
protected function _cache_init()
{
- if (class_exists('CI_DB_Cache'))
+ if (class_exists('CI_DB_Cache', FALSE))
{
if (is_object($this->CACHE))
{
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index c7bc4a699..85a233b50 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -2627,6 +2627,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$this->_reset_run(array(
'qb_set' => array(),
'qb_from' => array(),
+ 'qb_join' => array(),
'qb_where' => array(),
'qb_orderby' => array(),
'qb_keys' => array(),
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 34adf0f86..fa89661b1 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -49,13 +49,6 @@ class CI_DB_pdo_driver extends CI_DB {
public $dbdriver = 'pdo';
/**
- * Transaction enabled flag
- *
- * @var bool
- */
- public $trans_enabled = FALSE;
-
- /**
* PDO Options
*
* @var array
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php
index 8096b2650..246a7a264 100644
--- a/system/libraries/Cache/drivers/Cache_memcached.php
+++ b/system/libraries/Cache/drivers/Cache_memcached.php
@@ -182,11 +182,11 @@ class CI_Cache_memcached extends CI_Driver {
}
}
- if (class_exists('Memcached'))
+ if (class_exists('Memcached', FALSE))
{
$this->_memcached = new Memcached();
}
- elseif (class_exists('Memcache'))
+ elseif (class_exists('Memcache', FALSE))
{
$this->_memcached = new Memcache();
}
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index b673e9cb7..cc6fe48f0 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -228,7 +228,7 @@ class CI_Migration {
$class = 'Migration_'.ucfirst(strtolower($this->_get_migration_name(basename($file, '.php'))));
// Validate the migration file structure
- if ( ! class_exists($class))
+ if ( ! class_exists($class, FALSE))
{
$this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class);
return FALSE;
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php
index 11bb32fe0..057e5a1d1 100644
--- a/system/libraries/Session/drivers/Session_cookie.php
+++ b/system/libraries/Session/drivers/Session_cookie.php
@@ -602,6 +602,9 @@ class CI_Session_cookie extends CI_Session_driver {
$set['user_data'] = $this->_serialize($userdata);
}
+ // Reset query builder values.
+ $this->CI->db->reset_query();
+
// Run the update query
// Any time we change the session id, it gets updated immediately,
// so our where clause below is always safe
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index d4524d230..d263d789d 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -31,7 +31,7 @@ if ( ! function_exists('xml_parser_create'))
show_error('Your PHP installation does not support XML');
}
-if ( ! class_exists('CI_Xmlrpc'))
+if ( ! class_exists('CI_Xmlrpc', FALSE))
{
show_error('You must load the Xmlrpc class before loading the Xmlrpcs class in order to create a server.');
}
diff --git a/tests/mocks/database/ci_test.sqlite b/tests/mocks/database/ci_test.sqlite
index 44dcef9ec..574d3ae53 100755
--- a/tests/mocks/database/ci_test.sqlite
+++ b/tests/mocks/database/ci_test.sqlite
Binary files differ
diff --git a/tests/mocks/libraries/session.php b/tests/mocks/libraries/session.php
index 562033bbf..adbecb329 100644
--- a/tests/mocks/libraries/session.php
+++ b/tests/mocks/libraries/session.php
@@ -33,4 +33,6 @@ class Mock_Libraries_Session_cookie extends CI_Session_cookie {
$_COOKIE[$name] = $value;
}
}
-} \ No newline at end of file
+}
+
+class Mock_Libraries_Session_native extends CI_Session_native {} \ No newline at end of file
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 37bd2036a..216bf80bc 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -65,7 +65,6 @@ Release Date: Not Released
- Added an optional parameter to :php:func:`timezone_menu()` that allows more attributes to be added to the generated select tag.
- Deprecated ``standard_date()``, which now just uses the native ``date()`` with `DateTime constants <http://www.php.net/manual/en/class.datetime.php#datetime.constants.types>`_.
- Added function :php:func:`date_range()` that generates a list of dates between a specified period.
- - :doc:`Captcha Helper <helpers/captcha_helper>` :php:func:`create_captcha()` now accepts additional colors parameter, allowing for color customization.
- :doc:`URL Helper <helpers/url_helper>` changes include:
- Deprecated *separator* options **dash** and **underscore** for function :php:func:`url_title()` (they are only aliases for '-' and '_' respectively).
- :php:func:`url_title()` will now trim extra dashes from beginning and end.
@@ -487,6 +486,7 @@ Bug fixes for 3.0
- Fixed a bug (#2211) - :doc:`Migration Library <libraries/migration>` extensions couldn't execute ``CI_Migration::__construct()``.
- Fixed a bug (#2255) - :doc:`Email Library <libraries/email>` didn't apply ``smtp_timeout``to socket reads and writes.
- Fixed a bug (#2239) - :doc:`Email Library <libraries/email>` improperly handled the Subject when used with ``bcc_batch_mode`` resulting in E_WARNING messages and an empty Subject.
+- Fixed a bug (#2234) - :doc:`Query Builder <database/query_builder>` didn't reset JOIN cache for write-type queries.
Version 2.1.3
=============
diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst
index 833e34ead..d7754e9f3 100644
--- a/user_guide_src/source/tutorial/news_section.rst
+++ b/user_guide_src/source/tutorial/news_section.rst
@@ -162,7 +162,7 @@ The news overview page is now done, but a page to display individual
news items is still absent. The model created earlier is made in such
way that it can easily be used for this functionality. You only need to
add some code to the controller and create a new view. Go back to the
-news controller and add the following lines to the file.
+news controller and update ``view()`` with the following:
::
@@ -211,4 +211,4 @@ a slug to the view method in the news controller.
$route['default_controller'] = 'pages/view';
Point your browser to your document root, followed by index.php/news and
-watch your news page. \ No newline at end of file
+watch your news page.