bug fix database prefix in Qrcode class
This commit is contained in:
@@ -11,7 +11,7 @@ if(is_string(Getenv('TYPE')) && Getenv('TYPE') == "docker") {
|
|||||||
define('DATABASE_NAME', Getenv('DATABASE_NAME'));
|
define('DATABASE_NAME', Getenv('DATABASE_NAME'));
|
||||||
define('DATABASE_USER', Getenv('DATABASE_USER'));
|
define('DATABASE_USER', Getenv('DATABASE_USER'));
|
||||||
define('DATABASE_PASSWORD', Getenv('DATABASE_PASSWORD'));
|
define('DATABASE_PASSWORD', Getenv('DATABASE_PASSWORD'));
|
||||||
define('DATABASE_PREFIX', Getenv('DATABASE_PREFIX')); // This must have a trailing underscore. Example: qr_
|
define('DATABASE_PREFIX', Getenv('DATABASE_PREFIX'));
|
||||||
define('DATABASE_CHARSET', Getenv('DATABASE_CHARSET'));
|
define('DATABASE_CHARSET', Getenv('DATABASE_CHARSET'));
|
||||||
define('TYPE', Getenv('TYPE'));
|
define('TYPE', Getenv('TYPE'));
|
||||||
define('BASE_URL', Getenv('BASE_URL'));
|
define('BASE_URL', Getenv('BASE_URL'));
|
||||||
@@ -21,7 +21,7 @@ if(is_string(Getenv('TYPE')) && Getenv('TYPE') == "docker") {
|
|||||||
define('DATABASE_NAME', "qrcode");
|
define('DATABASE_NAME', "qrcode");
|
||||||
define('DATABASE_USER', "root");
|
define('DATABASE_USER', "root");
|
||||||
define('DATABASE_PASSWORD', "root");
|
define('DATABASE_PASSWORD', "root");
|
||||||
define('DATABASE_PREFIX', ""); // This must have a trailing underscore. Example: qr_
|
define('DATABASE_PREFIX', "qr_");
|
||||||
define('DATABASE_CHARSET', "utf8");
|
define('DATABASE_CHARSET', "utf8");
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ class Qrcode {
|
|||||||
*/
|
*/
|
||||||
public function __construct($type) {
|
public function __construct($type) {
|
||||||
if($type === "static") {
|
if($type === "static") {
|
||||||
$this->table = DATABASE_PREFIX."static_qrcodes";
|
$this->table = "static_qrcodes";
|
||||||
$this->redirect_url = "static_qrcodes.php";
|
$this->redirect_url = "static_qrcodes.php";
|
||||||
} else if($type === "dynamic") {
|
} else if($type === "dynamic") {
|
||||||
$this->table = DATABASE_PREFIX."dynamic_qrcodes";
|
$this->table = "dynamic_qrcodes";
|
||||||
$this->redirect_url = "dynamic_qrcodes.php";
|
$this->redirect_url = "dynamic_qrcodes.php";
|
||||||
} else {
|
} else {
|
||||||
$this->redirect_url = "index.php";
|
$this->redirect_url = "index.php";
|
||||||
|
|||||||
Reference in New Issue
Block a user