From 7cdef03633cf8cc40678fc837ccec2d2164caade Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Tue, 26 Aug 2008 18:44:54 +0000 Subject: Made a Loader changes so that the new validation class will work. Made some doc style changes --- system/libraries/Loader.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'system') diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index 1d88841dd..b870ffbae 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -35,6 +35,7 @@ class CI_Loader { var $_ci_is_instance = FALSE; // Whether we should use $this or $CI =& get_instance() var $_ci_cached_vars = array(); var $_ci_classes = array(); + var $_ci_loaded_files = array(); var $_ci_models = array(); var $_ci_helpers = array(); var $_ci_plugins = array(); @@ -809,7 +810,7 @@ class CI_Loader { } // Safety: Was the class already loaded by a previous call? - if (in_array($subclass, $this->_ci_classes)) + if (in_array($subclass, $this->_ci_loaded_files)) { // Before we deem this to be a duplicate request, let's see // if a custom object name is being supplied. If so, we'll @@ -830,7 +831,7 @@ class CI_Loader { include_once($baseclass); include_once($subclass); - $this->_ci_classes[] = $subclass; + $this->_ci_loaded_files[] = $subclass; return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name); } @@ -849,7 +850,7 @@ class CI_Loader { } // Safety: Was the class already loaded by a previous call? - if (in_array($filepath, $this->_ci_classes)) + if (in_array($filepath, $this->_ci_loaded_files)) { // Before we deem this to be a duplicate request, let's see // if a custom object name is being supplied. If so, we'll @@ -869,7 +870,7 @@ class CI_Loader { } include_once($filepath); - $this->_ci_classes[] = $filepath; + $this->_ci_loaded_files[] = $filepath; return $this->_ci_init_class($class, '', $params, $object_name); } } // END FOREACH @@ -933,7 +934,10 @@ class CI_Loader { { $classvar = $object_name; } - + + // Save the class name and object name + $this->_ci_classes[$class] = $object_name; + // Instantiate the class $CI =& get_instance(); if ($config !== NULL) -- cgit v1.2.3-24-g4f1b