You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: install/lib/installer_base.lib.php
+22-19Lines changed: 22 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -115,38 +115,41 @@ function request_language() {
115
115
116
116
}
117
117
118
-
/*
119
-
This function creates the database for ISPConfig
120
-
*/
121
-
122
-
functionconfigure_database() {
118
+
/** Create the database for ISPConfig */
119
+
publicfunctionconfigure_database()
120
+
{
123
121
global$conf;
124
-
125
-
// Create the database
126
-
if(!$this->db->query("CREATE DATABASE IF NOT EXISTS ".$conf["mysql"]["database"])) {
127
-
$this->error('Unable to create MySQL database: '.$conf["mysql"]["database"].';');
122
+
$cf = $conf['mysql']; // make $conf['mysql'] more accessible
123
+
//** Create the database
124
+
if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$cf['database'])) {
125
+
$this->error('Unable to create MySQL database: '.$cf['database'].'.');
128
126
}
129
127
130
-
// Create the ISPConfig database user
131
-
if(!$this->db->query("GRANT SELECT, INSERT, UPDATE, DELETE ON ".$conf["mysql"]["database"].".* TO '".$conf["mysql"]["ispconfig_user"]."'@'".$conf["mysql"]["host"]."' IDENTIFIED BY '".$conf["mysql"]["ispconfig_password"]."';")) {
132
-
$this->error('Unable to create database user: '.$conf["mysql"]["ispconfig_user"]);
128
+
//* Create the ISPConfig database user
129
+
$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$cf['database'].".* "
0 commit comments