mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Allow setting path constants in app/Console/cake.php as you can in webroot/index.php
This commit is contained in:
parent
f63aa922f6
commit
8150b89aba
1 changed files with 4 additions and 2 deletions
|
@ -122,8 +122,10 @@ class ShellDispatcher {
|
||||||
define('ROOT', $this->params['root']);
|
define('ROOT', $this->params['root']);
|
||||||
define('APP_DIR', $this->params['app']);
|
define('APP_DIR', $this->params['app']);
|
||||||
define('APP', $this->params['working'] . DS);
|
define('APP', $this->params['working'] . DS);
|
||||||
|
if (!defined('WWW_ROOT')) {
|
||||||
define('WWW_ROOT', APP . $this->params['webroot'] . DS);
|
define('WWW_ROOT', APP . $this->params['webroot'] . DS);
|
||||||
if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) {
|
}
|
||||||
|
if (!defined('TMP') && !is_dir(APP . 'tmp')) {
|
||||||
define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'tmp' . DS);
|
define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'tmp' . DS);
|
||||||
}
|
}
|
||||||
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');
|
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');
|
||||||
|
|
Loading…
Reference in a new issue