mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 08:52:45 +00:00
Allow driver to be changed in settings.php
This commit is contained in:
parent
c18750007d
commit
01b05bc715
@ -22,17 +22,18 @@ $limit_per_page = 20;
|
||||
// If you set a table prefix in config.yml, put it here too
|
||||
$table_prefix = "";
|
||||
|
||||
$driver = 'mysql';
|
||||
|
||||
/*****************************************************************************/
|
||||
function litebans_connect() {
|
||||
// imported
|
||||
global $dbhost, $username, $password, $database, $table_prefix, $show_inactive_bans;
|
||||
global $dbhost, $username, $password, $database, $table_prefix, $show_inactive_bans, $driver;
|
||||
|
||||
// exported
|
||||
global $conn, $active_query;
|
||||
global $table_bans, $table_mutes, $table_warnings, $table_history;
|
||||
|
||||
$dsn = 'mysql:dbname=' . $database . ';host=' . $dbhost . ';charset=utf8';
|
||||
$dsn = $driver . ':dbname=' . $database . ';host=' . $dbhost . ';charset=utf8';
|
||||
|
||||
try {
|
||||
$conn = new PDO($dsn, $username, $password);
|
||||
|
Loading…
x
Reference in New Issue
Block a user