summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 75e93608a..ed830e2dd 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -1140,13 +1140,16 @@ class CI_Loader {
*/
protected function _ci_autoloader()
{
- if (defined('ENVIRONMENT') && file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'))
+ // Get autoloader file from config path
+ $CI =& get_instance();
+ $path = reset($CI->config->_config_paths).'config/';
+ if (defined('ENVIRONMENT') && file_exists($path.ENVIRONMENT.'/autoload.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
+ include($path.ENVIRONMENT.'/autoload.php');
}
else
{
- include(APPPATH.'config/autoload.php');
+ include($path.'autoload.php');
}
if ( ! isset($autoload))
@@ -1166,7 +1169,6 @@ class CI_Loader {
// Load any custom config file
if (count($autoload['config']) > 0)
{
- $CI =& get_instance();
foreach ($autoload['config'] as $key => $val)
{
$CI->config->load($val);
@@ -1275,4 +1277,4 @@ class CI_Loader {
}
/* End of file Loader.php */
-/* Location: ./system/core/Loader.php */ \ No newline at end of file
+/* Location: ./system/core/Loader.php */