Skip to content

Commit

Permalink
Fix Database/ from always being appended to the driver name.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 20, 2012
1 parent d12f50a commit 3dd82e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Cake/Console/Command/Task/DbConfigTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,11 @@ public function bake($configs) {
$config = array_merge($this->_defaultConfig, $config);
extract($config);

if (strpos($datasource, 'Database/') === false) {
$datasource = "Database/{$datasource}";
}
$out .= "\tpublic \${$name} = array(\n";
$out .= "\t\t'datasource' => 'Database/{$datasource}',\n";
$out .= "\t\t'datasource' => '{$datasource}',\n";
$out .= "\t\t'persistent' => {$persistent},\n";
$out .= "\t\t'host' => '{$host}',\n";

Expand Down

0 comments on commit 3dd82e6

Please sign in to comment.