From 4add005baa807239b9d48d4469f92a9130551751 Mon Sep 17 00:00:00 2001 From: Sonny Gauran Date: Sat, 30 Apr 2011 02:12:15 +0800 Subject: [PATCH] Fixed baked database.php constants --- lib/Cake/Console/Command/Task/DbConfigTask.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Console/Command/Task/DbConfigTask.php b/lib/Cake/Console/Command/Task/DbConfigTask.php index 9067a247f..73959f099 100644 --- a/lib/Cake/Console/Command/Task/DbConfigTask.php +++ b/lib/Cake/Console/Command/Task/DbConfigTask.php @@ -38,7 +38,7 @@ class DbConfigTask extends Shell { */ protected $_defaultConfig = array( 'name' => 'default', - 'driver'=> 'mysql', + 'datasource'=> 'Database/Mysql', 'persistent'=> 'false', 'host'=> 'localhost', 'login'=> 'root', @@ -104,7 +104,7 @@ class DbConfigTask extends Shell { } } - $driver = $this->in(__d('cake_console', 'Driver:'), array('mssql', 'mysql', 'oracle', 'postgres', 'sqlite'), 'mysql'); + $driver = $this->in(__d('cake_console', 'Driver:'), array('Mssql', 'Mysql', 'Oracle', 'Postgres', 'Sqlite'), 'Mysql'); $persistent = $this->in(__d('cake_console', 'Persistent Connection?'), array('y', 'n'), 'n'); if (strtolower($persistent) == 'n') { @@ -313,7 +313,7 @@ class DbConfigTask extends Shell { extract($config); $out .= "\tpublic \${$name} = array(\n"; - $out .= "\t\t'driver' => '{$driver}',\n"; + $out .= "\t\t'datasource' => 'Database/{$driver}',\n"; $out .= "\t\t'persistent' => {$persistent},\n"; $out .= "\t\t'host' => '{$host}',\n";