Changeset 2683
- Timestamp:
- 05/21/2008 12:41:58 PM (6 months ago)
- Files:
-
- 1 modified
-
trunk/system/core/Config.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Config.php
r2627 r2683 31 31 if (self::$conf === NULL) 32 32 { 33 // Load the application configuration file 34 require APPPATH.'config/config'.EXT; 35 36 // Invalid config file 37 (isset($config) AND is_array($config)) or die 38 ( 39 'Your Kohana application configuration file is not valid.' 40 ); 41 42 // Load config into self 43 self::$conf['core'] = $config; 33 // Load core configuration 34 self::$conf['core'] = self::load('core'); 44 35 45 36 // Re-parse the include paths … … 80 71 if (Config::item('core.allow_config_set') == FALSE) 81 72 { 82 Log::add(' debug', 'Config::set was called, but your configuration file does not allow setting.');73 Log::add('error', 'Config::set was called, but your configuration file does not allow setting.'); 83 74 return FALSE; 84 75 } … … 131 122 132 123 /** 124 * Clears a config group from the cached configuration. 125 * 126 * @param string config group 127 * @return TRUE 128 */ 129 public function clear($key) 130 { 131 unset(self::$conf[$key]); 132 133 return TRUE; 134 } 135 136 /** 133 137 * Get all include paths. 134 138 * … … 168 172 public static function load($name, $required = TRUE) 169 173 { 174 if ($name === 'core') 175 { 176 // Load the application configuration file 177 include APPPATH.'config/config'.EXT; 178 179 if (empty($config['site_domain'])) 180 { 181 // Invalid config file 182 die('Your Kohana application configuration file is not valid.'); 183 } 184 185 return $config; 186 } 187 170 188 $configuration = array(); 171 189
