mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-04 07:27:06 +03:00
Secure database tables prefix
This commit is contained in:
parent
0fc7477672
commit
255ac6220c
@ -169,13 +169,14 @@ Class Database{
|
||||
|
||||
// Create database instance
|
||||
$instance = new Database();
|
||||
|
||||
// Set database and connection properties
|
||||
$instance->dbHost = $host;
|
||||
$instance->dbLogin = $user;
|
||||
$instance->dbPass = $pass;
|
||||
$instance->dbName = $db;
|
||||
$instance->dbEncoding = $encoding;
|
||||
$instance->tablesPrefix = $prefix;
|
||||
$instance->tablesPrefix = preg_replace('/[^A-Za-z0-9_$]/', '', $prefix);
|
||||
$instance->forceCharsetInConnection = $force_charset;
|
||||
$instance->usePersistentConnection = $use_pconn;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user