diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-07-04 09:37:57 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-07-04 09:37:57 +0200 |
commit | a8126b18a37d211240df254a82031e736eb98daf (patch) | |
tree | 07b6a9b40249efb2e82784a683321ada6f07454e /system | |
parent | bd0b4b306fd9995e19c333eb9b55806e9b56f34c (diff) |
Backport CI_Config::load() optimization from pull #1571
Diffstat (limited to 'system')
-rwxr-xr-x | system/core/Config.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/system/core/Config.php b/system/core/Config.php index 714c4667b..5dffbf3f2 100755 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -99,12 +99,12 @@ class CI_Config { $found = FALSE; $loaded = FALSE; + $check_locations = defined('ENVIRONMENT') + ? array(ENVIRONMENT.'/'.$file, $file) + : array($file); + foreach ($this->_config_paths as $path) { - $check_locations = defined('ENVIRONMENT') - ? array(ENVIRONMENT.'/'.$file, $file) - : array($file); - foreach ($check_locations as $location) { $file_path = $path.'config/'.$location.'.php'; @@ -168,7 +168,7 @@ class CI_Config { { return FALSE; } - show_error('The configuration file '.$file.'.php'.' does not exist.'); + show_error('The configuration file '.$file.'.php does not exist.'); } return TRUE; @@ -279,7 +279,7 @@ class CI_Config { */ function base_url($uri = '') { - return $this->slash_item('base_url').ltrim($this->_uri_string($uri),'/'); + return $this->slash_item('base_url').ltrim($this->_uri_string($uri), '/'); } // ------------------------------------------------------------- |