Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reverted autoloader change now that APPPATH is in VFS
Signed-off-by: dchill42 <dchill42@gmail.com>
  • Loading branch information
dchill42 committed Oct 14, 2012
1 parent e9435dc commit 92e5511
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions system/core/Loader.php
Expand Up @@ -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))
Expand All @@ -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);
Expand Down Expand Up @@ -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.