summaryrefslogtreecommitdiffstats
path: root/system/libraries/Driver.php
diff options
context:
space:
mode:
authorDaniel Hunsaker <danhunsaker@gmail.com>2013-02-22 21:49:33 +0100
committerDaniel Hunsaker <danhunsaker@gmail.com>2013-02-22 21:49:33 +0100
commit44a6d1da2be916fe0f23a3ea4d5fcb391d7f65dd (patch)
tree31549ebf6ea5ea98e4347eb640d1caa685316f3e /system/libraries/Driver.php
parent353f9834adf3f44c6c7a0f924089bb2b43360404 (diff)
parenteb291c1d1e1116a4420fa30e587adeea0451eeb7 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/exit-status
Diffstat (limited to 'system/libraries/Driver.php')
-rw-r--r--system/libraries/Driver.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index bb7318991..ba15f81df 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -80,8 +80,7 @@ class CI_Driver_Library {
public function load_driver($child)
{
// Get CodeIgniter instance and subclass prefix
- $CI = get_instance();
- $prefix = (string) $CI->config->item('subclass_prefix');
+ $prefix = config_item('subclass_prefix');
if ( ! isset($this->lib_name))
{
@@ -102,11 +101,12 @@ class CI_Driver_Library {
}
// Get package paths and filename case variations to search
+ $CI = get_instance();
$paths = $CI->load->get_package_paths(TRUE);
// Is there an extension?
$class_name = $prefix.$child_name;
- $found = class_exists($class_name);
+ $found = class_exists($class_name, FALSE);
if ( ! $found)
{
// Check for subclass file
@@ -126,8 +126,8 @@ class CI_Driver_Library {
}
// Include both sources and mark found
- include($basepath);
- include($file);
+ include_once($basepath);
+ include_once($file);
$found = TRUE;
break;
}
@@ -139,8 +139,7 @@ class CI_Driver_Library {
{
// Use standard class name
$class_name = 'CI_'.$child_name;
- $found = class_exists($class_name);
- if ( ! $found)
+ if ( ! class_exists($class_name, FALSE))
{
// Check package paths
foreach ($paths as $path)
@@ -150,7 +149,7 @@ class CI_Driver_Library {
if (file_exists($file))
{
// Include source
- include($file);
+ include_once($file);
break;
}
}
@@ -158,9 +157,9 @@ class CI_Driver_Library {
}
// Did we finally find the class?
- if ( ! class_exists($class_name))
+ if ( ! class_exists($class_name, FALSE))
{
- if (class_exists($child_name))
+ if (class_exists($child_name, FALSE))
{
$class_name = $child_name;
}