Commit
Fixing a typo in index.php.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -122,15 +122,15 @@ protected function _initEnvironment() { | |||
private function __bootstrap() { | ||||
define('ROOT', $this->params['root']); | ||||
define('APP_DIR', $this->params['app']); | ||||
define('APP_PATH', $this->params['working'] . DS); | ||||
define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS); | ||||
define('APP', $this->params['working'] . DS); | ||||
define('WWW_ROOT', APP . $this->params['webroot'] . DS); | ||||
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); | ||||
} | ||||
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php'); | ||||
require CORE_PATH . 'Cake' . DS . 'bootstrap.php'; | ||||
|
||||
if (!file_exists(APP_PATH . 'Config' . DS . 'core.php')) { | ||||
if (!file_exists(APP . 'Config' . DS . 'core.php')) { | ||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gBokiau
|
$params['working'] = rtrim($params['root'], '/'); |
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
gBokiau
Dec 30, 2012
I bumped into this while trying to have the webroot directory on the same level as the app directory, e.g.
ROOT
APP
WEBROOT
I figured using the root as working directory and manually defining params['app']
and params['webroot']
would be a solution, even though this could lead to problems further down the road, with APP not being correctly defined.
Not only is this currently impossible, but there is room for two conflicting definitions of the same folder without one taking precedence over the other.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
shama
Dec 30, 2012
Contributor
You're missing the point. How is APP_PATH
different than APP
in this commit?
I believe this should actually have been (ROOT . DS . APP_DIR . DS . 'Config' . DS . 'core.php') as in preceding lookups for bootstrap and tmp