From d6ab7a297d26ab148d819ae7ca95c0e604abf188 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Wed, 4 Jul 2012 01:56:04 -0500 Subject: Moved redundant $check_locations definition out of loop. --- system/core/Config.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/core/Config.php') diff --git a/system/core/Config.php b/system/core/Config.php index 4b4e5a7ba..b21d7a588 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -102,13 +102,13 @@ class CI_Config { { $file = ($file === '') ? 'config' : str_replace('.php', '', $file); $found = $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'; -- cgit v1.2.3-24-g4f1b From aa141a5e20318608d42e3cda7ebcc0d69fa9b9b8 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Wed, 4 Jul 2012 02:13:56 -0500 Subject: Fix some whitespace, removed unnecessary string concatenation. --- system/core/Config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/core/Config.php') diff --git a/system/core/Config.php b/system/core/Config.php index b21d7a588..2f6a9e085 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -43,7 +43,7 @@ class CI_Config { * * @var array */ - public $config = array(); + public $config = array(); /** * List of all loaded config files @@ -172,7 +172,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; @@ -271,7 +271,7 @@ class CI_Config { */ public 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), '/'); } // ------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b