diff options
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Loader.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index e2420a0c0..b760d67a1 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -895,11 +895,7 @@ class CI_Loader { }
}
- // Autoload models
- if (isset($autoload['model']))
- {
- $this->model($autoload['model']);
- }
+
// A little tweak to remain backward compatible
// The $autoload['core'] item was deprecated
@@ -930,14 +926,14 @@ class CI_Loader { {
$this->library($item);
}
-
- // Load the model class.
- if (in_array('model', $autoload['libraries']))
- {
- $this->model();
- $autoload['libraries'] = array_diff($autoload['libraries'], array('model'));
- }
}
+
+ // Autoload models
+ if (isset($autoload['model']))
+ {
+ $this->model($autoload['model']);
+ }
+
}
// --------------------------------------------------------------------
|