|
|
@@ -67,13 +67,7 @@ class Configure {
|
|
|
*/
|
|
|
public static function bootstrap($boot = true) {
|
|
|
if ($boot) {
|
|
|
- self::write('App', array(
|
|
|
- 'base' => false,
|
|
|
- 'baseUrl' => false,
|
|
|
- 'dir' => APP_DIR,
|
|
|
- 'webroot' => WEBROOT_DIR,
|
|
|
- 'www_root' => WWW_ROOT
|
|
|
- ));
|
|
|
+ self::_appDefaults();
|
|
|
|
|
|
if (!include APP . 'Config' . DS . 'core.php') {
|
|
|
trigger_error(__d('cake_dev', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
|
|
|
@@ -110,6 +104,20 @@ class Configure {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Set app's default configs
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ protected static function _appDefaults() {
|
|
|
+ self::write('App', (array)self::read('App') + array(
|
|
|
+ 'base' => false,
|
|
|
+ 'baseUrl' => false,
|
|
|
+ 'dir' => APP_DIR,
|
|
|
+ 'webroot' => WEBROOT_DIR,
|
|
|
+ 'www_root' => WWW_ROOT
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* Used to store a dynamic variable in Configure.
|
|
|
*
|
|
|
* Usage:
|