Permalink
Browse files

Reverted autoloader change now that APPPATH is in VFS

Signed-off-by: dchill42 <dchill42@gmail.com>
  • Loading branch information...
1 parent e9435dc commit 92e5511d9b7667314c2a292c889f283c2f70e22a @dchill42 committed Oct 14, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 system/core/Loader.php
View
@@ -1140,16 +1140,13 @@ protected function _ci_init_class($class, $prefix = '', $config = FALSE, $object
*/
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 @@ protected function _ci_autoloader()
// 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 @@ protected function _ci_prep_filename($filename, $extension)
}
/* End of file Loader.php */
-/* Location: ./system/core/Loader.php */
+/* Location: ./system/core/Loader.php */

0 comments on commit 92e5511

Please sign in to comment.