mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing constants being incorrect when calling cake console from the root of the source tree checkout.
This commit is contained in:
parent
a07094fd69
commit
a0660ffd9d
2 changed files with 14 additions and 15 deletions
|
@ -129,7 +129,6 @@ class ShellDispatcher {
|
||||||
if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) {
|
if (!is_dir(ROOT . DS . APP_DIR . DS . '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');
|
||||||
require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
|
require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
|
||||||
|
|
||||||
|
@ -230,7 +229,7 @@ class ShellDispatcher {
|
||||||
|
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'app' => 'app',
|
'app' => 'app',
|
||||||
'root' => dirname(dirname(dirname(__FILE__))),
|
'root' => dirname(dirname(dirname(dirname(__FILE__)))),
|
||||||
'working' => null,
|
'working' => null,
|
||||||
'webroot' => 'webroot'
|
'webroot' => 'webroot'
|
||||||
);
|
);
|
||||||
|
|
|
@ -154,8 +154,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'app' => 'app',
|
'app' => 'app',
|
||||||
'webroot' => 'webroot',
|
'webroot' => 'webroot',
|
||||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'app'),
|
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
|
||||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
|
||||||
);
|
);
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
$Dispatcher->parseParams($params);
|
$Dispatcher->parseParams($params);
|
||||||
|
@ -169,8 +169,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'app' => 'new',
|
'app' => 'new',
|
||||||
'webroot' => 'webroot',
|
'webroot' => 'webroot',
|
||||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
|
||||||
);
|
);
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
$Dispatcher->parseParams($params);
|
$Dispatcher->parseParams($params);
|
||||||
|
@ -188,8 +188,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'app' => 'new',
|
'app' => 'new',
|
||||||
'webroot' => 'webroot',
|
'webroot' => 'webroot',
|
||||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
|
||||||
);
|
);
|
||||||
|
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
|
@ -207,8 +207,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'app' => 'new',
|
'app' => 'new',
|
||||||
'webroot' => 'webroot',
|
'webroot' => 'webroot',
|
||||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
|
||||||
);
|
);
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
$Dispatcher->parseParams($params);
|
$Dispatcher->parseParams($params);
|
||||||
|
@ -225,8 +225,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
);
|
);
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'app' => 'new',
|
'app' => 'new',
|
||||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
|
||||||
'webroot' => 'webroot'
|
'webroot' => 'webroot'
|
||||||
);
|
);
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
|
@ -248,8 +248,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'app' => 'app',
|
'app' => 'app',
|
||||||
'webroot' => 'webroot',
|
'webroot' => 'webroot',
|
||||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'app'),
|
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
|
||||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
|
||||||
);
|
);
|
||||||
$Dispatcher->params = $Dispatcher->args = array();
|
$Dispatcher->params = $Dispatcher->args = array();
|
||||||
$Dispatcher->parseParams($params);
|
$Dispatcher->parseParams($params);
|
||||||
|
|
Loading…
Reference in a new issue