Skip to content

Commit d373dde

Browse files
committed
Fixing notice errors in bake all.
Moving some message printing around.
1 parent 8a129ec commit d373dde

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

cake/console/shells/bake.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ class BakeShell extends Shell {
4040
public $tasks = array('Project', 'DbConfig', 'Model', 'Controller', 'View', 'Plugin', 'Fixture', 'Test');
4141

4242
/**
43-
* Override loadTasks() to handle paths
43+
* The connection being used.
44+
*
45+
* @var string
46+
*/
47+
public $connection = 'default';
48+
49+
/**
50+
* Assign $this->connection to the active task if a connection param is set.
4451
*
4552
*/
4653
public function startup() {
@@ -121,7 +128,6 @@ public function main() {
121128
*
122129
*/
123130
public function all() {
124-
$this->hr();
125131
$this->out('Bake All');
126132
$this->hr();
127133

@@ -157,6 +163,7 @@ public function all() {
157163

158164
if ($modelBaked && $modelExists === false) {
159165
$this->out(sprintf(__('%s Model was baked.'), $model));
166+
160167
if ($this->_checkUnitTest()) {
161168
$this->Model->bakeFixture($model);
162169
$this->Model->bakeTest($model);
@@ -166,16 +173,16 @@ public function all() {
166173

167174
if ($modelExists === true) {
168175
$controller = $this->_controllerName($name);
176+
$this->out(sprintf(__('Baking %s Controller...', 1), $controller));
169177
if ($this->Controller->bake($controller, $this->Controller->bakeActions($controller))) {
170-
$this->out(sprintf(__('%s Controller was baked.'), $name));
171178
if ($this->_checkUnitTest()) {
172179
$this->Controller->bakeTest($controller);
173180
}
174181
}
175182
if (App::import('Controller', $controller)) {
176183
$this->View->args = array($controller);
177184
$this->View->execute();
178-
$this->out(sprintf(__('%s Views were baked.'), $name));
185+
$this->out(sprintf(__('%s Views were baked.'), $controller));
179186
}
180187
$this->out(__('Bake All complete'));
181188
array_shift($this->args);

0 commit comments

Comments
 (0)