updating shell

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5068 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-05-13 01:36:56 +00:00
parent 51e78eac9f
commit 130d95bd5d
2 changed files with 4 additions and 7 deletions

View file

@ -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);
}
/**

View file

@ -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;
}