From 6180ca80c9ae24537463ed667ccfe05a58055894 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 3 May 2009 20:48:13 -0400 Subject: [PATCH] Adding common parameter handling for connection and plugin params. --- cake/console/libs/bake.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cake/console/libs/bake.php b/cake/console/libs/bake.php index 1a21780e8..6277342d5 100644 --- a/cake/console/libs/bake.php +++ b/cake/console/libs/bake.php @@ -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();