]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - plugins/sql_auth/sql_auth.php
Minimize config/config.php and put settings in DB. This is work in progress.
[irc/unrealircd/unrealircd-webpanel.git] / plugins / sql_auth / sql_auth.php
index 1daa6f651e758bbc8f8deb29f988142767264533..8f48fa34120cdd7a36aee94a6b29f1d6eb817acc 100644 (file)
@@ -116,7 +116,7 @@ class sql_auth
                        meta_value VARCHAR(255),
                        PRIMARY KEY (meta_id)
                )");
-               $conn->query("CREATE TABLE IF NOT EXISTS " . get_config("mysql::table_prefix") . "auth_settings (
+               $conn->query("CREATE TABLE IF NOT EXISTS " . get_config("mysql::table_prefix") . "settings (
                        id int AUTO_INCREMENT NOT NULL,
                        setting_key VARCHAR(255) NOT NULL,
                        setting_value VARCHAR(255),
@@ -135,11 +135,11 @@ class sql_auth
                        $conn->query("ALTER TABLE `".get_config("mysql::table_prefix")."user_meta` CHANGE `meta_value` `meta_value` VARCHAR(5000) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NULL DEFAULT NULL");
 
 
-               new SQLAuthSettings();
+               new DbSettings();
                
 
                /* make sure everything went well */
-               $tables = ["users", "user_meta", "fail2ban", "auth_settings"];
+               $tables = ["users", "user_meta", "fail2ban", "settings"];
                $errors = 0; // counter
                $error_messages = "";
                foreach($tables as $table)