cleaned up some redundant code in the Loader->library function
Elaborated on its functionality in the user guide.
diff --git a/system/core/Loader.php b/system/core/Loader.php
index ca2f016..72497c7 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -79,9 +79,9 @@
{
if (is_array($library))
{
- foreach($library as $read)
+ foreach($library as $class)
{
- $this->library($read);
+ $this->library($class, $params);
}
return;
@@ -97,17 +97,7 @@
$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);
}
// --------------------------------------------------------------------