diff --git a/cake/console/libs/tasks/fixture.php b/cake/console/libs/tasks/fixture.php index 05123438595..8ae1534f372 100644 --- a/cake/console/libs/tasks/fixture.php +++ b/cake/console/libs/tasks/fixture.php @@ -42,7 +42,7 @@ class FixtureTask extends Shell { * @var array * @access public */ - var $tasks = array('Model'); + var $tasks = array('DbConfig', 'Model'); /** * path to fixtures directory * @@ -107,7 +107,12 @@ function all() { * @access private */ function __interactive($modelName = false) { - + $this->interactive = true; + $this->hr(); + $this->out(sprintf("Bake Fixture\nPath: %s", $this->path)); + $this->hr(); + + $useDbConfig = $this->DbConfig->getConfig(); } /** diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index baffcd72476..b8bfcb7d2e7 100644 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -117,18 +117,8 @@ function __interactive() { $primaryKey = 'id'; $validate = array(); $associations = array('belongsTo'=> array(), 'hasOne'=> array(), 'hasMany' => array(), 'hasAndBelongsToMany'=> array()); - - $useDbConfig = 'default'; - $configs = get_class_vars('DATABASE_CONFIG'); - - if (!is_array($configs)) { - return $this->DbConfig->execute(); - } - - $connections = array_keys($configs); - if (count($connections) > 1) { - $useDbConfig = $this->in(__('Use Database Config', true) .':', $connections, 'default'); - } + + $useDbConfig = $this->DbConfig->getConfig(); $currentModelName = $this->getName($useDbConfig); $db =& ConnectionManager::getDataSource($useDbConfig);