Navigation Menu

Skip to content

Commit

Permalink
Fixing notice errors in bake all.
Browse files Browse the repository at this point in the history
Moving some message printing around.
  • Loading branch information
markstory committed Nov 21, 2010
1 parent 8a129ec commit d373dde
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cake/console/shells/bake.php
Expand Up @@ -40,7 +40,14 @@ class BakeShell extends Shell {
public $tasks = array('Project', 'DbConfig', 'Model', 'Controller', 'View', 'Plugin', 'Fixture', 'Test');

/**
* Override loadTasks() to handle paths
* The connection being used.
*
* @var string
*/
public $connection = 'default';

/**
* Assign $this->connection to the active task if a connection param is set.
*
*/
public function startup() {
Expand Down Expand Up @@ -121,7 +128,6 @@ public function main() {
*
*/
public function all() {
$this->hr();
$this->out('Bake All');
$this->hr();

Expand Down Expand Up @@ -157,6 +163,7 @@ public function all() {

if ($modelBaked && $modelExists === false) {
$this->out(sprintf(__('%s Model was baked.'), $model));

if ($this->_checkUnitTest()) {
$this->Model->bakeFixture($model);
$this->Model->bakeTest($model);
Expand All @@ -166,16 +173,16 @@ public function all() {

if ($modelExists === true) {
$controller = $this->_controllerName($name);
$this->out(sprintf(__('Baking %s Controller...', 1), $controller));
if ($this->Controller->bake($controller, $this->Controller->bakeActions($controller))) {
$this->out(sprintf(__('%s Controller was baked.'), $name));
if ($this->_checkUnitTest()) {
$this->Controller->bakeTest($controller);
}
}
if (App::import('Controller', $controller)) {
$this->View->args = array($controller);
$this->View->execute();
$this->out(sprintf(__('%s Views were baked.'), $name));
$this->out(sprintf(__('%s Views were baked.'), $controller));
}
$this->out(__('Bake All complete'));
array_shift($this->args);
Expand Down

0 comments on commit d373dde

Please sign in to comment.