summaryrefslogtreecommitdiffstats
path: root/system/libraries/Model.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-26 05:52:45 +0200
committeradmin <devnull@localhost>2006-09-26 05:52:45 +0200
commite79dc7130a0003a07833609487b8ebb5ebcf31c8 (patch)
tree8400c41761ddcd7a9338637eefc9429d501d87ff /system/libraries/Model.php
parent30c3b9709a12b7346c7057e656a491ffb9168f55 (diff)
Diffstat (limited to 'system/libraries/Model.php')
-rw-r--r--system/libraries/Model.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/system/libraries/Model.php b/system/libraries/Model.php
index 9834f8278..55c995636 100644
--- a/system/libraries/Model.php
+++ b/system/libraries/Model.php
@@ -50,20 +50,21 @@ class Model {
function _assign_libraries($use_reference = TRUE)
{
$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) AND ! isset($this->$key))
{
if ($use_reference === TRUE)
{
- $this->$val =& $obj->$val;
+ $this->$key =& $obj->$key;
}
else
{
- $this->$val = $obj->$val;
+ $this->$key = $obj->$key;
}
}
}
+
}
// END _assign_libraries()