X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/17cca93a9bc277ea8a833e23d6b0b481cdfaaac3..53c3262154b4828643ec075a42c30b6decb01377:/settings/install.php diff --git a/settings/install.php b/settings/install.php index 649e338..d215ed9 100644 --- a/settings/install.php +++ b/settings/install.php @@ -96,11 +96,11 @@ $writable = (is_writable("../config/")) ? true: false; $auth_method_name = NULL; switch($auth_method) { - case "sql_auth": - $auth_method_name = "SQLAuth"; + case "sql_db": + $auth_method_name = "SQLDB"; break; - case "file_auth": - $auth_method_name = "FileAuth"; + case "file_db": + $auth_method_name = "FileDB"; break; } if ($auth_method) @@ -118,7 +118,7 @@ $writable = (is_writable("../config/")) ? true: false; $config["base_url"] = BASE_URL; $config["plugins"] = Array("$auth_method"); - if ($auth_method == "sql_auth") + if ($auth_method == "sql_db") { $config["mysql"] = [ "host" => $opts->sql_host, @@ -129,12 +129,20 @@ $writable = (is_writable("../config/")) ? true: false; ]; } + generate_secrets(); + /* First, write only the config file */ write_config_file(); - if ($auth_method == "sql_auth") - if (!sql_auth::create_tables()) + if ($auth_method == "sql_db") + { + sql_db::delete_tables(); + if (!sql_db::create_tables()) Message::Fail("Could not create SQL tables"); + } else if ($auth_method == "file_db") + { + file_db::delete_db(); + } $user = [ "user_name" => $opts->account_user, @@ -185,22 +193,22 @@ $writable = (is_writable("../config/")) ? true: false;
-
Authentication Backend
+
Database Backend

- Which authentication backend would you like to use? + Which database backend would you like to use?

Please choose from the available options:
- -
- -
@@ -277,6 +285,51 @@ $writable = (is_writable("../config/")) ? true: false;
+ + + + + + + \ No newline at end of file