mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-05-01 19:59:22 +02:00
Fix #346 Uneccesary OTHire engine logic separation
There is no need to create a separate configs for OTHIRE when establishing an SQL connection, and is confusing for new users who are configurating their webserver.
This commit is contained in:
parent
44839d9cdb
commit
63357290a0
18
config.php
18
config.php
@ -29,9 +29,6 @@
|
|||||||
// MYSQL CONNECTION DETAILS \\
|
// MYSQL CONNECTION DETAILS \\
|
||||||
// ------------------------ \\
|
// ------------------------ \\
|
||||||
|
|
||||||
if ($config['ServerEngine'] !== 'OTHIRE') {
|
|
||||||
|
|
||||||
// TFS DATABASE CONFIGS
|
|
||||||
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
||||||
$config['sqlUser'] = 'tfs13';
|
$config['sqlUser'] = 'tfs13';
|
||||||
|
|
||||||
@ -43,21 +40,6 @@
|
|||||||
|
|
||||||
// Hostname is usually localhost or 127.0.0.1.
|
// Hostname is usually localhost or 127.0.0.1.
|
||||||
$config['sqlHost'] = '127.0.0.1';
|
$config['sqlHost'] = '127.0.0.1';
|
||||||
} else {
|
|
||||||
|
|
||||||
// OTHIRE DATABASE CONFIG
|
|
||||||
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
|
|
||||||
$config['sql_user'] = 'tfs13';
|
|
||||||
|
|
||||||
// phpmyadmin password for OT server:
|
|
||||||
$config['sql_pass'] = 'tfs13';
|
|
||||||
|
|
||||||
// The database name to connect to. (This is usually same as username).
|
|
||||||
$config['sql_db'] = 'tfs13';
|
|
||||||
|
|
||||||
// Hostname is usually localhost or 127.0.0.1.
|
|
||||||
$config['sql_host'] = '127.0.0.1';
|
|
||||||
}
|
|
||||||
|
|
||||||
// QR code authenticator Only works with TFS 1.2+
|
// QR code authenticator Only works with TFS 1.2+
|
||||||
$config['twoFactorAuthenticator'] = false;
|
$config['twoFactorAuthenticator'] = false;
|
||||||
|
@ -289,10 +289,8 @@ INSERT INTO `znote_forum` (`name`, `access`, `closed`, `hidden`, `guild_id`) VAL
|
|||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
";
|
";
|
||||||
if ($config['ServerEngine'] !== 'OTHIRE')
|
|
||||||
$connect = new mysqli($config['sqlHost'], $config['sqlUser'], $config['sqlPassword'], $config['sqlDatabase']);
|
$connect = new mysqli($config['sqlHost'], $config['sqlUser'], $config['sqlPassword'], $config['sqlDatabase']);
|
||||||
else
|
|
||||||
$connect = new mysqli($config['sql_host'], $config['sql_user'], $config['sql_pass'], $config['sql_db']);
|
|
||||||
|
|
||||||
if ($connect->connect_errno) {
|
if ($connect->connect_errno) {
|
||||||
die("Failed to connect to MySQL: (" . $connect->connect_errno . ") " . $connect->connect_error . $install);
|
die("Failed to connect to MySQL: (" . $connect->connect_errno . ") " . $connect->connect_error . $install);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user