diff options
author | Kellas Reeves <kellas.reeves@gmail.com> | 2011-02-09 18:57:56 +0100 |
---|---|---|
committer | Kellas Reeves <kellas.reeves@gmail.com> | 2011-02-09 18:57:56 +0100 |
commit | 3c6e4851451cd62b02980821cccdd93290463795 (patch) | |
tree | b467074b9bda037ee84f59d6f2b11e70ef34159d /system | |
parent | ff5c948222d5985312be71b917594e5e438addc3 (diff) |
cleaned up some redundant code in the Loader->library function
Elaborated on its functionality in the user guide.
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Loader.php | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index ca2f016e7..72497c724 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -79,9 +79,9 @@ class CI_Loader { { if (is_array($library)) { - foreach($library as $read) + foreach($library as $class) { - $this->library($read); + $this->library($class, $params); } return; @@ -97,17 +97,7 @@ class CI_Loader { $params = NULL; } - if (is_array($library)) - { - foreach ($library as $class) - { - $this->_ci_load_class($class, $params, $object_name); - } - } - else - { - $this->_ci_load_class($library, $params, $object_name); - } + $this->_ci_load_class($library, $params, $object_name); } // -------------------------------------------------------------------- |