diff --git a/install/includes/core_class.php b/install/includes/core_class.php index 09cc9ee15..208587ec7 100644 --- a/install/includes/core_class.php +++ b/install/includes/core_class.php @@ -9,19 +9,19 @@ class Core { $counter = 0; // Validate the hostname - if(isset($data['hostname']) AND !empty($data['hostname'])) { + if(isset($data['db_hostname']) AND !empty($data['db_hostname'])) { $counter++; } // Validate the username - if(isset($data['username']) AND !empty($data['username'])) { + if(isset($data['db_username']) AND !empty($data['db_username'])) { $counter++; } // Validate the password - if(isset($data['password']) AND !empty($data['password'])) { + if(isset($data['db_password']) AND !empty($data['db_password'])) { // pass } // Validate the database - if(isset($data['database']) AND !empty($data['database'])) { + if(isset($data['db_name']) AND !empty($data['db_name'])) { $counter++; } @@ -61,10 +61,10 @@ class Core { // Open the file $database_file = file_get_contents($template_path); - $new = str_replace("%HOSTNAME%",$data['hostname'],$database_file); - $new = str_replace("%USERNAME%",$data['username'],$new); - $new = str_replace("%PASSWORD%",$data['password'],$new); - $new = str_replace("%DATABASE%",$data['database'],$new); + $new = str_replace("%HOSTNAME%",$data['db_hostname'],$database_file); + $new = str_replace("%USERNAME%",$data['db_username'],$new); + $new = str_replace("%PASSWORD%",$data['db_password'],$new); + $new = str_replace("%DATABASE%",$data['db_name'],$new); // Write the new database.php file $handle = fopen($output_path,'w+'); diff --git a/install/includes/database_class.php b/install/includes/database_class.php index 313c87ef7..0e2aeb2b3 100644 --- a/install/includes/database_class.php +++ b/install/includes/database_class.php @@ -6,14 +6,14 @@ class Database { function create_database($data) { // Connect to the database - $mysqli = new mysqli($data['hostname'],$data['username'],$data['password'],''); + $mysqli = new mysqli($data['db_hostname'],$data['db_username'],$data['db_password'],''); // Check for errors if(mysqli_connect_errno()) return false; // Create the prepared statement - $mysqli->query("CREATE DATABASE IF NOT EXISTS ".$data['database']); + $mysqli->query("CREATE DATABASE IF NOT EXISTS ".$data['db_name']); // Close the connection $mysqli->close(); @@ -25,7 +25,7 @@ class Database { function create_tables($data) { // Connect to the database - $mysqli = new mysqli($data['hostname'],$data['username'],$data['password'],$data['database']); + $mysqli = new mysqli($data['db_hostname'],$data['db_username'],$data['db_password'],$data['db_name']); // Check for errors if(mysqli_connect_errno())