Modifying the bootstrap process, to match the documented changes. $pluginPaths style variables will no longer work. You need to use App::build() to set paths in the bootstrap file. Added a build() call before the bootstrap is included. This allows cold cache import() calls to work from bootstrap.php.

This commit is contained in:
Mark Story 2010-02-13 19:39:11 -05:00
parent effbbeca33
commit dc8f49feda

View file

@ -384,8 +384,6 @@ class Configure extends Object {
* @access private * @access private
*/ */
function __loadBootstrap($boot) { function __loadBootstrap($boot) {
$libPaths = $modelPaths = $behaviorPaths = $controllerPaths = $componentPaths = $viewPaths = $helperPaths = $pluginPaths = $vendorPaths = $localePaths = $shellPaths = null;
if ($boot) { if ($boot) {
Configure::write('App', array('base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => WEBROOT_DIR, 'www_root' => WWW_ROOT)); Configure::write('App', array('base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => WEBROOT_DIR, 'www_root' => WWW_ROOT));
@ -429,19 +427,10 @@ class Configure extends Object {
} }
Cache::config('default'); Cache::config('default');
} }
App::build();
if (!include(CONFIGS . 'bootstrap.php')) { 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); 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 (App::path('controllers') == array()) {
App::build(array(
'models' => $modelPaths, 'views' => $viewPaths, 'controllers' => $controllerPaths,
'helpers' => $helperPaths, 'components' => $componentPaths, 'behaviors' => $behaviorPaths,
'plugins' => $pluginPaths, 'vendors' => $vendorPaths, 'locales' => $localePaths,
'shells' => $shellPaths, 'libs' => $libPaths
));
}
} }
} }
} }