mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 08:52:45 +00:00
Refactor settings + documentation
This commit is contained in:
parent
982b2dec0d
commit
003293c527
@ -2,19 +2,18 @@
|
|||||||
|
|
||||||
final class Settings {
|
final class Settings {
|
||||||
public function __construct($connect = true) {
|
public function __construct($connect = true) {
|
||||||
// Server name
|
// Server name, shown on the main page and on the header
|
||||||
$this->name = 'LiteBans';
|
$this->name = 'LiteBans';
|
||||||
|
|
||||||
// Server host
|
// Database information
|
||||||
$dbhost = 'localhost';
|
$host = 'localhost';
|
||||||
$dbport = 3306;
|
$port = 3306;
|
||||||
|
|
||||||
|
$database = 'litebans';
|
||||||
|
|
||||||
$username = 'root';
|
$username = 'root';
|
||||||
$password = 'password';
|
$password = 'password';
|
||||||
|
|
||||||
// Database name
|
|
||||||
$database = 'litebans';
|
|
||||||
|
|
||||||
// Show inactive bans? Removed bans will show (Unbanned), mutes will show (Unmuted), warnings will show (Expired).
|
// Show inactive bans? Removed bans will show (Unbanned), mutes will show (Unmuted), warnings will show (Expired).
|
||||||
$this->show_inactive_bans = true;
|
$this->show_inactive_bans = true;
|
||||||
|
|
||||||
@ -47,7 +46,7 @@ final class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($connect) {
|
if ($connect) {
|
||||||
$dsn = "$driver:dbname=$database;host=$dbhost;port=$dbport;charset=utf8";
|
$dsn = "$driver:dbname=$database;host=$host;port=$port;charset=utf8";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->conn = new PDO($dsn, $username, $password);
|
$this->conn = new PDO($dsn, $username, $password);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user