diff options
Diffstat (limited to 'system/libraries/Model.php')
-rw-r--r-- | system/libraries/Model.php | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/system/libraries/Model.php b/system/libraries/Model.php index 48615e07c..017a9c6d8 100644 --- a/system/libraries/Model.php +++ b/system/libraries/Model.php @@ -33,10 +33,9 @@ class Model { */ function Model() { - $this->_assign_libraries(FALSE); + $this->_assign_libraries(); log_message('debug', "Model Class Initialized"); } - // END Model() /** * Assign Libraries @@ -47,26 +46,15 @@ class Model { * * @access private */ - function _assign_libraries($use_reference = TRUE) + function _assign_libraries() { - $CI =& get_instance(); - foreach (get_object_vars($CI) as $key => $var) - { - if ( ! isset($this->$key)) - { - if ($use_reference === TRUE) - { - $this->$key =& $CI->$key; - } - else - { - $this->$key = $CI->$key; - } - } - } - + $CI =& get_instance(); + + foreach (array_keys(get_object_vars($CI)) as $key) + { + $this->$key =& $CI->$key; + } } - // END _assign_libraries() } // END Model Class |