From 0aef222d246da84c90e9a89f31f6677cbe6b4ddc Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 12 Oct 2006 18:00:22 +0000 Subject: --- system/database/DB.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'system/database/DB.php') diff --git a/system/database/DB.php b/system/database/DB.php index 62237440f..a148c9ffe 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -22,14 +22,8 @@ * @author Rick Ellis * @link http://www.codeigniter.com/user_guide/database/ */ -function DB($params = '', $return = FALSE, $active_record = FALSE) +function DB($params = '', $active_record = FALSE) { - // Do we even need to load the database class? - if (class_exists('CI_DB') AND $return == FALSE AND $active_record == FALSE) - { - return FALSE; - } - // Load the DB config file if a DSN string wasn't passed if (is_string($params) AND strpos($params, '://') === FALSE) { @@ -84,15 +78,8 @@ function DB($params = '', $return = FALSE, $active_record = FALSE) // Instantiate the DB adapter $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; - $DB = new $driver($params); - - if ($return === TRUE) - { - return $DB; - } - - $CI =& get_instance(); - $CI->db =& $DB; + $DB = new $driver($params); + return $DB; } -- cgit v1.2.3-24-g4f1b