summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-12 20:00:22 +0200
committeradmin <devnull@localhost>2006-10-12 20:00:22 +0200
commit0aef222d246da84c90e9a89f31f6677cbe6b4ddc (patch)
tree083195e23940c6ebdebb3076c0363286a8d07445 /system/database
parent606f99c043272f96f21911d89c21cd36c2ef59e4 (diff)
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB.php19
-rw-r--r--system/database/DB_driver.php19
2 files changed, 3 insertions, 35 deletions
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;
}
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index a4131fd73..848d4f1c6 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -155,26 +155,7 @@ class CI_DB_driver {
}
}
}
-
- // --------------------------------------------------------------------
-
- /**
- * Load the Utilities Class
- *
- * @access public
- * @return string
- */
- function load_utilities()
- {
- require_once(BASEPATH.'database/DB_utility'.EXT);
- require_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_utility'.EXT);
- $class = 'CI_DB_'.$this->dbdriver.'_utility';
- $CI =& get_instance();
- $CI->dbutil = new $class();
- $CI->_ci_assign_to_models();
- }
-
// --------------------------------------------------------------------
/**