diff options
author | joelcox <joel@mickly.com> | 2011-01-16 16:50:36 +0100 |
---|---|---|
committer | joelcox <joel@mickly.com> | 2011-01-16 16:50:36 +0100 |
commit | 2035fd8f700c12ca6b21cacf9d1bbb111995a1af (patch) | |
tree | a21dc16cd3fcc0c91d3a578aac8166cabfe14cfb /system | |
parent | bf2b912ec37cde3bb809437c0763bac860665915 (diff) |
Removed configs from environments and corrected for fallback
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Common.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index 48de161d2..5c441a56e 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -208,15 +208,20 @@ return $_config[0]; } + $file_path = APPPATH.'config/'.ENVIRONMENT.'/config'.EXT; + // Fetch the config file - if ( ! file_exists(APPPATH.'config/'.ENVIRONMENT.'/config'.EXT)) - { - exit('The configuration file does not exist.'); - } - else + if ( ! file_exists($file_path)) { - require(APPPATH.'config/'.ENVIRONMENT.'/config'.EXT); + $file_path = APPPATH.'config/config'.EXT; + + if ( ! file_exists($file_path)) + { + exit('The configuration file does not exist.'); + } } + + require($file_path); // Does the $config array exist in the file? if ( ! isset($config) OR ! is_array($config)) |