From 1b5cc91262236bb75daa9c344d70084a1630efec Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 23 Oct 2010 00:35:30 -0400 Subject: [PATCH] Reformatting default values. Fixing issue with undefined variables caused by missing extract(). --- cake/console/shells/tasks/db_config.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cake/console/shells/tasks/db_config.php b/cake/console/shells/tasks/db_config.php index 1e9dc6bbc..d640dd796 100644 --- a/cake/console/shells/tasks/db_config.php +++ b/cake/console/shells/tasks/db_config.php @@ -30,7 +30,6 @@ class DbConfigTask extends Shell { * path to CONFIG directory * * @var string - * @access public */ public $path = null; @@ -38,12 +37,19 @@ class DbConfigTask extends Shell { * Default configuration settings to use * * @var array - * @access private */ protected $_defaultConfig = array( - 'name' => 'default', 'driver'=> 'mysql', 'persistent'=> 'false', 'host'=> 'localhost', - 'login'=> 'root', 'password'=> 'password', 'database'=> 'project_name', - 'schema'=> null, 'prefix'=> null, 'encoding' => null, 'port' => null + 'name' => 'default', + 'driver'=> 'mysql', + 'persistent'=> 'false', + 'host'=> 'localhost', + 'login'=> 'root', + 'password'=> 'password', + 'database'=> 'project_name', + 'schema'=> null, + 'prefix'=> null, + 'encoding' => null, + 'port' => null ); /** @@ -306,6 +312,7 @@ class DbConfigTask extends Shell { foreach ($configs as $config) { $config = array_merge($this->_defaultConfig, $config); + extract($config); $out .= "\tpublic \${$name} = array(\n"; $out .= "\t\t'driver' => '{$driver}',\n";