Skip to content

Commit

Permalink
Fixing error when no connection is specified and
Browse files Browse the repository at this point in the history
bake fixture Foo is used.
  • Loading branch information
markstory committed May 8, 2009
1 parent 37d81cb commit fd5b422
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cake/console/libs/tasks/fixture.php
Expand Up @@ -79,11 +79,14 @@ function execute() {
}

if (isset($this->args[0])) {
if (!isset($this->connection)) {
$this->connection = 'default';
}
if (strtolower($this->args[0]) == 'all') {
return $this->all();
}
$model = Inflector::camelize($this->args[0]);
return $this->bake($model);
$this->bake($model);
}
}

Expand All @@ -94,9 +97,6 @@ function execute() {
* @return void
**/
function all() {
if (!isset($this->connection)) {
$this->connection = 'default';
}
$this->interactive = false;
$tables = $this->Model->listAll($this->connection, false);
foreach ($tables as $table) {
Expand Down

0 comments on commit fd5b422

Please sign in to comment.