From e79dc7130a0003a07833609487b8ebb5ebcf31c8 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 26 Sep 2006 03:52:45 +0000 Subject: --- system/libraries/Loader.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'system/libraries/Loader.php') diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index 833e37640..7449fa34a 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -136,15 +136,9 @@ class CI_Loader { * @param bool whether to return the DB object * @return object */ - function dbutil($db = '', $return = FALSE) + function dbutil() { $obj =& get_instance(); - - if ( ! is_bool($return)) - { - $return = FALSE; - } - return $obj->_ci_init_dbutil($db, $return); } // END dbutils() @@ -484,14 +478,14 @@ class CI_Loader { // This allows anything loaded using $this->load (viwes, files, etc.) // to become accessible from within the Controller and Model functions. $obj =& get_instance(); - foreach ($obj->ci_is_loaded as $val) + foreach (get_object_vars($obj) as $key => $var) { - if ( ! isset($this->$val)) + if (is_object($var)) { - $this->$val =& $obj->$val; - } - } - + $this->$key =& $obj->$key; + } + } + // Set the default data variables foreach (array('view', 'vars', 'path', 'return') as $val) { -- cgit v1.2.3-24-g4f1b