diff options
author | admin <devnull@localhost> | 2006-09-27 02:31:22 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-27 02:31:22 +0200 |
commit | e5bb936f808bfd39a6ba8cbe1fc2ddbcf9bf502f (patch) | |
tree | 20dd6d9775c9c2a4e097278f3cf659c42e8507f5 /system/libraries/Controller.php | |
parent | e1770339a3c89d53b99529ae6a639e5c3dd0fd66 (diff) |
Diffstat (limited to 'system/libraries/Controller.php')
-rw-r--r-- | system/libraries/Controller.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php index 23c050e18..56b4d6f90 100644 --- a/system/libraries/Controller.php +++ b/system/libraries/Controller.php @@ -468,10 +468,22 @@ class Controller extends CI_Base { */ function _ci_init_dbextra($class) { - $map = array('dbutil' => 'DB_utility', 'dbexport' => 'DB_export'); - require_once(BASEPATH.'database/'.$map[$class].EXT); - - $this->init_class('CI_'.$map[$class], $class); + if ( ! $this->_ci_is_loaded('db')) + { + $this->_init_database(); + } + + if ($class == 'dbutil') + { + require_once(BASEPATH.'database/DB_utility'.EXT); + require_once(BASEPATH.'database/drivers/'.$this->db->dbdriver.'/'.$this->db->dbdriver.'_utility'.EXT); + $this->init_class('CI_DB_'.$this->db->dbdriver.'_utility', 'dbutil'); + } + elseif ($class == 'dbexport') + { + require_once(BASEPATH.'database/DB_export'.EXT); + $this->init_class('CI_DB_export', 'dbexport'); + } } // -------------------------------------------------------------------- |