Skip to content

Commit

Permalink
Changing import of Dispatcher to direct require.
Browse files Browse the repository at this point in the history
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
markstory committed Nov 7, 2009
1 parent 6db91b0 commit 82a2b1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cake/bootstrap.php
Expand Up @@ -48,5 +48,5 @@

$url = null;

App::import('Core', array('Dispatcher'));
require CAKE . 'dispatcher.php';
?>
9 changes: 5 additions & 4 deletions cake/libs/configure.php
Expand Up @@ -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');

Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 82a2b1a

Please sign in to comment.