mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding common parameter handling for connection
and plugin params.
This commit is contained in:
parent
1cc3a6ecfb
commit
6180ca80c9
1 changed files with 6 additions and 0 deletions
|
@ -52,6 +52,12 @@ class BakeShell extends Shell {
|
|||
if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig', 'Fixture'))) {
|
||||
$path = Inflector::underscore(Inflector::pluralize($this->command));
|
||||
$this->{$task}->path = $this->params['working'] . DS . $path . DS;
|
||||
if (isset($this->params['connection'])) {
|
||||
$this->{$task}->connection = $this->params['connection'];
|
||||
}
|
||||
if (isset($this->params['plugin'])) {
|
||||
$this->{$task}->plugin = $this->params['plugin'];
|
||||
}
|
||||
if (!is_dir($this->{$task}->path)) {
|
||||
$this->err(sprintf(__("%s directory could not be found.\nBe sure you have created %s", true), $task, $this->{$task}->path));
|
||||
$this->_stop();
|
||||
|
|
Loading…
Reference in a new issue