diff --git a/install/install.php b/install/install.php index 2e7ba60d7b3679c724dec93739cf2a3fdf4f534b..95e7f5bb174616bf6174b9fdec2c5032310efc15 100644 --- a/install/install.php +++ b/install/install.php @@ -100,13 +100,14 @@ do { $tmp_mysql_server_host = $inst->free_query('MySQL server hostname', $conf['mysql']['host']); $tmp_mysql_server_admin_user = $inst->free_query('MySQL root username', $conf['mysql']['admin_user']); $tmp_mysql_server_admin_password = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']); - //TODO: it does not ask for which database ? + $tmp_mysql_server_database = $inst->free_query('MySQL database to create', $conf['mysql']['database']); //* Initialize the MySQL server connection if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { $conf['mysql']['host'] = $tmp_mysql_server_host; $conf['mysql']['admin_user'] = $tmp_mysql_server_admin_user; $conf['mysql']['admin_password'] = $tmp_mysql_server_admin_password; + $conf['mysql']['database'] = $tmp_mysql_server_database; $finished = true; } else { swriteln($inst->lng('Unable to connect to mysql server').' '.mysql_error()); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 12904096bcf8befebda8e13810fdabccbb0f392b..9c5d12ca77aa39ba88cc0cac37be30e595313dc5 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -33,13 +33,14 @@ class installer_base { var $wb = array(); var $language = 'en'; var $db; - + private $conf; /* */ - function contstruct() + function __construct() { - die('ere'); + global $conf; //TODO: maybe $conf should be passed to constructor + $this->conf = $conf; }