mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
effbbeca33
commit
dc8f49feda
1 changed files with 1 additions and 12 deletions
|
@ -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
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue