From 92e5511d9b7667314c2a292c889f283c2f70e22a Mon Sep 17 00:00:00 2001 From: dchill42 Date: Sun, 14 Oct 2012 18:16:16 -0400 Subject: Reverted autoloader change now that APPPATH is in VFS Signed-off-by: dchill42 --- system/core/Loader.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'system/core') diff --git a/system/core/Loader.php b/system/core/Loader.php index ed830e2dd..75e93608a 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -1140,16 +1140,13 @@ class CI_Loader { */ protected function _ci_autoloader() { - // 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')) + if (defined('ENVIRONMENT') && file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php')) { - include($path.ENVIRONMENT.'/autoload.php'); + include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'); } else { - include($path.'autoload.php'); + include(APPPATH.'config/autoload.php'); } if ( ! isset($autoload)) @@ -1169,6 +1166,7 @@ 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); @@ -1277,4 +1275,4 @@ class CI_Loader { } /* End of file Loader.php */ -/* Location: ./system/core/Loader.php */ +/* Location: ./system/core/Loader.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b