From 0ea04149bbae0fdcde92b7362e7cbd76f0df3865 Mon Sep 17 00:00:00 2001 From: bubbafoley Date: Thu, 17 Mar 2011 14:55:41 -0500 Subject: load config files from environment specific locations in core classes, helpers and libraries --- system/core/Loader.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'system/core/Loader.php') diff --git a/system/core/Loader.php b/system/core/Loader.php index 7003318ee..75c09435d 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -975,7 +975,15 @@ class CI_Loader { */ function _ci_autoloader() { - include_once(APPPATH.'config/autoload'.EXT); + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT)) + { + include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT); + } + else + { + include_once(APPPATH.'config/autoload'.EXT); + } + if ( ! isset($autoload)) { -- cgit v1.2.3-24-g4f1b