From 130d95bd5de81ffd82affbb8642f19b342767671 Mon Sep 17 00:00:00 2001 From: gwoo Date: Sun, 13 May 2007 01:36:56 +0000 Subject: [PATCH] updating shell git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5068 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/cake.php | 6 +----- cake/console/libs/shell.php | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cake/console/cake.php b/cake/console/cake.php index cf56508fc..9f33b7fc7 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -233,9 +233,6 @@ class ShellDispatcher { function dispatch() { $this->stdout("\nWelcome to CakePHP v" . Configure::version() . " Console"); - if (!isset($this->args[0]) || (isset($this->args[0]) && $this->args[0] != 'help')) { - $this->stdout("Type 'cake help' for help\n"); - } $protectedCommands = array('initialize', 'main','in','out','err','hr', 'createFile', 'isDir','copyDir','Object','toString', 'requestAction','log','cakeError', 'ShellDispatcher', @@ -402,10 +399,9 @@ class ShellDispatcher { $this->params['working'] = dirname(dirname(__FILE__)); } - if($this->params['working'] !== dirname(dirname(__FILE__))) { + if($app !== basename($this->params['working']) && $this->params['working'] !== dirname(dirname(__FILE__))) { $this->params['root'] = $this->params['working']; } - $this->params = array_merge(array('app'=> $app, 'root'=> dirname($this->params['working'])), $this->params); } /** diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index 333c0f49a..005b53d05 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -84,7 +84,7 @@ class Shell extends Object { */ function initialize() { if($this->_loadDbConfig()) { - //$this->_loadModel(); + $this->_loadModel(); } $this->hr(); $this->out('Name: '. APP_DIR); @@ -105,6 +105,7 @@ class Shell extends Object { } } $this->err('Database config could not be loaded'); + $this->out('Run \'bake\' to create the database configuration'); return false; } /** @@ -119,7 +120,7 @@ class Shell extends Object { ); if(loadModel()) { - $this->AppModel = & new AppModel(); + $this->AppModel = & new AppModel(false, false, false); return true; }