summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-03-09 11:08:36 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-03-09 11:08:36 +0100
commit93ca71552d9a3e28eeaa00dd10755d20b2cbf32e (patch)
tree660233f2ec631e5730731491d2fd244fe15f7df8 /system/core/Common.php
parenta9924b8352aa18869677bea0182c45e2a7e2ce37 (diff)
parent2f8b27efeb0a39c24eddf89cf31ea0fd113a6b71 (diff)
Merged recent Core changes and fixed conflict.
Diffstat (limited to 'system/core/Common.php')
-rw-r--r--system/core/Common.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index b5adfacb3..cd6b93355 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/config'.EXT))
- {
- exit('The configuration file does not exist.');
- }
- else
+ if ( ! file_exists($file_path))
{
- require(APPPATH.'config/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))