Permalink
Browse files

Changing import of Dispatcher to direct require.

Modifying order of operations in Configure::__loadBootstrap()
moving inclusion of app/config/bootstrap.php after the creation of core cache configs.  This allows App::import() to be used in the bootstrap file with cached paths.
  • Loading branch information...
1 parent 6db91b0 commit 82a2b1a01957ccbfd3a6abe31133f49b9005bced @markstory markstory committed Nov 7, 2009
Showing with 6 additions and 5 deletions.
  1. +1 −1 cake/bootstrap.php
  2. +5 −4 cake/libs/configure.php
View
@@ -48,5 +48,5 @@
$url = null;
- App::import('Core', array('Dispatcher'));
+ require CAKE . 'dispatcher.php';
?>
View
@@ -652,10 +652,6 @@ function __loadBootstrap($boot) {
trigger_error(sprintf(__("Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR);
}
- if (!include(CONFIGS . 'bootstrap.php')) {
- trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR);
- }
-
if (Configure::read('Cache.disable') !== true) {
$cache = Cache::config('default');
@@ -692,6 +688,11 @@ function __loadBootstrap($boot) {
}
Cache::config('default');
}
+
+ if (!include(CONFIGS . 'bootstrap.php')) {
+ trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR);
+ }
+
Configure::buildPaths(compact(
'modelPaths', 'viewPaths', 'controllerPaths', 'helperPaths', 'componentPaths',
'behaviorPaths', 'pluginPaths', 'vendorPaths', 'localePaths', 'shellPaths'

0 comments on commit 82a2b1a

Please sign in to comment.