summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-23 11:57:57 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-23 11:57:57 +0200
commitb3f774bbbb81293326136e3e13297c3b8d49dfa4 (patch)
tree3d785ff5048f4a865564813bda84dc272f0edd8b
parentae8f50ac7637c6705e78062d5313461cc0edd2ab (diff)
Fix issue #1265
-rwxr-xr-xsystem/core/CodeIgniter.php16
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 9 insertions, 8 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 4885f310c..92187fa16 100755
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -275,12 +275,12 @@
{
$x = explode('/', $RTR->routes['404_override'], 2);
$class = $x[0];
- $method = (isset($x[1]) ? $x[1] : 'index');
+ $method = isset($x[1]) ? $x[1] : 'index';
if ( ! class_exists($class))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
@@ -288,7 +288,7 @@
}
else
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
}
@@ -337,12 +337,12 @@
{
$x = explode('/', $RTR->routes['404_override'], 2);
$class = $x[0];
- $method = (isset($x[1]) ? $x[1] : 'index');
+ $method = isset($x[1]) ? $x[1] : 'index';
if ( ! class_exists($class))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
@@ -352,7 +352,7 @@
}
else
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
}
@@ -393,10 +393,10 @@
* Close the DB connection if one exists
* ------------------------------------------------------
*/
- if (class_exists('CI_DB') && isset($CI->db))
+ if (class_exists('CI_DB') && isset($CI->db) && ! $CI->db->pconnect)
{
$CI->db->close();
}
/* End of file CodeIgniter.php */
-/* Location: ./system/core/CodeIgniter.php */
+/* Location: ./system/core/CodeIgniter.php */ \ No newline at end of file
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 0cac8aea0..f9b087e83 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -207,6 +207,7 @@ Bug fixes for 3.0
- Fixed a bug (#798) - update() used to ignore LIKE conditions that were set with like().
- Fixed a bug in Oracle's and MSSQL's delete() methods where an erroneous SQL statement was generated when used with limit().
- Fixed a bug in SQLSRV's delete() method where like() and limit() conditions were ignored.
+- Fixed a bug (#1265) - Database connections were always closed, regardless of the 'pconnect' option value.
Version 2.1.1
=============