From 5b42ca43555015f0a118d1423d5dd34d2e224d85 Mon Sep 17 00:00:00 2001 From: gwoo Date: Sat, 12 May 2007 22:53:32 +0000 Subject: [PATCH] updating paths for shell git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5061 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/cake.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/console/cake.php b/cake/console/cake.php index b0d7c8898..810dddba6 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -383,10 +383,10 @@ class ShellDispatcher { $this->args[] = $params[$i]; } } - if(!empty($this->params['working'])) { $app = basename($this->params['working']); - } else { + $this->params['working'] = dirname($this->params['working']) . DS . basename($this->params['working']); + } else { $app = 'app'; } if(isset($this->params['app'])) { @@ -398,7 +398,7 @@ class ShellDispatcher { } if(in_array($app, array('cake', 'console', 'app'))){ $app = 'app'; - $this->params['working'] = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . $app; + $this->params['working'] = dirname(dirname(__FILE__)); } $this->params = array_merge(array('app'=> $app, 'root'=> dirname($this->params['working'])), $this->params); } @@ -423,8 +423,8 @@ class ShellDispatcher { function help() { $this->stdout("\nPaths:"); $this->stdout(" -working: " . $this->params['working']); - $this->stdout(" -app: ". APP_DIR); $this->stdout(" -root: " . ROOT); + $this->stdout(" -app: ". APP); $this->stdout(" -core: " . CORE_PATH); $this->stdout("\nAvailable Scripts:");