Commit b0a1cc4c authored by pedro_morgan's avatar pedro_morgan
Browse files

Added the mysql database to use

parent 5133cc8b
......@@ -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());
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment