From 606f99c043272f96f21911d89c21cd36c2ef59e4 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 11 Oct 2006 23:48:41 +0000 Subject: --- system/libraries/Loader.php | 11 +++-------- system/libraries/Table.php | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index 96ec0c919..7a6637ac0 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -171,10 +171,7 @@ class CI_Loader { $CI->$name = new $model(); foreach (get_object_vars($CI) as $key => $var) { - if ( ! isset($CI->$name->$key)) - { - $CI->$name->$key =& $CI->$key; - } + $CI->$name->$key =& $CI->$key; } } else @@ -182,14 +179,12 @@ class CI_Loader { $this->$name = new $model(); foreach (get_object_vars($this) as $key => $var) { - if ( ! isset($this->$name->$key)) - { - $this->$name->$key =& $CI->$key; - } + $this->$name->$key =& $this->$key; } } $this->_ci_models[] = $name; + $this->_ci_assign_to_models(); } diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 61d04eef5..758676e27 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -202,12 +202,12 @@ class CI_Table { // First generate the headings from the table column names if (count($this->heading) == 0) { - if ( ! method_exists($query, 'field_names')) + if ( ! method_exists($query, 'list_fields')) { return FALSE; } - $this->heading = $query->field_names(); + $this->heading = $query->list_fields(); } // Next blast through the result array and build out the rows -- cgit v1.2.3-24-g4f1b