mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
updating shell task handling, removing bake2
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5076 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e8292ec7fd
commit
1875d74e4a
4 changed files with 16 additions and 115 deletions
|
@ -272,16 +272,15 @@ class ShellDispatcher {
|
|||
if(isset($this->args[0])) {
|
||||
$command = $this->args[0];
|
||||
}
|
||||
|
||||
|
||||
$task = Inflector::camelize($command);
|
||||
if(in_array($task, $shell->taskNames)) {
|
||||
$shell->initialize();
|
||||
$task = Inflector::camelize($command);
|
||||
$shell->{$task}->initialize();
|
||||
$shell->{$task}->execute();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$classMethods = get_class_methods($shell);
|
||||
|
||||
$privateMethod = $missingCommand = false;
|
||||
|
@ -296,7 +295,7 @@ class ShellDispatcher {
|
|||
if (in_array(strtolower($command), $protectedCommands)) {
|
||||
$missingCommand = true;
|
||||
}
|
||||
|
||||
|
||||
if($command == 'help') {
|
||||
if(method_exists($shell, 'help')) {
|
||||
$shell->command = $command;
|
||||
|
@ -408,12 +407,12 @@ class ShellDispatcher {
|
|||
$app = $this->params['app'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(empty($this->params['app']) && in_array($app, array('cake', 'console', 'app'))){
|
||||
$app = 'app';
|
||||
$this->params['working'] = dirname(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
if($app !== basename($this->params['working']) && $this->params['working'] !== dirname(dirname(__FILE__))) {
|
||||
$this->params['root'] = $this->params['working'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue