Restructure connect()

This commit is contained in:
Ruan 2015-03-12 08:13:22 +02:00
parent 15d5e9706a
commit 82231518a4

View File

@ -34,15 +34,15 @@ function connect() {
$conn = new mysqli($dbhost, $username, $password, $database);
if ($conn->connect_errno > 0) {
die('Unable to connect to database: ' . $conn->connect_error);
}
$table_bans = $table_prefix . "bans";
$table_mutes = $table_prefix . "mutes";
$table_warnings = $table_prefix . "warnings";
$table_history = $table_prefix . "history";
if ($conn->connect_errno > 0) {
die('Unable to connect to database: ' . $conn->connect_error);
}
$active_query = "WHERE active=1";
if ($show_inactive_bans) {
$active_query = "";