From b0a1cc4ca5fc5d3811c86d238a0f08600a86604d Mon Sep 17 00:00:00 2001 From: pedro_morgan <pedro_morgan@ispconfig3> Date: Mon, 20 Aug 2007 02:25:07 +0000 Subject: [PATCH] Added the mysql database to use --- install/install.php | 3 ++- install/lib/installer_base.lib.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/install/install.php b/install/install.php index 2e7ba60d7b..95e7f5bb17 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 12904096bc..9c5d12ca77 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; } -- GitLab