Permalink
Browse files

Fix Database/ from always being appended to the driver name.

Fixes #3223
  • Loading branch information...
1 parent d12f50a commit 3dd82e6d88abb88f931103b9732504b761702ea4 @markstory markstory committed Sep 20, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Cake/Console/Command/Task/DbConfigTask.php
@@ -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";

0 comments on commit 3dd82e6

Please sign in to comment.