Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 5bdcb8e

Browse files
bug fix database prefix in Qrcode class
1 parent 98ae82a commit 5bdcb8e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/config/environment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
define('DATABASE_NAME', Getenv('DATABASE_NAME'));
1212
define('DATABASE_USER', Getenv('DATABASE_USER'));
1313
define('DATABASE_PASSWORD', Getenv('DATABASE_PASSWORD'));
14-
define('DATABASE_PREFIX', Getenv('DATABASE_PREFIX')); // This must have a trailing underscore. Example: qr_
14+
define('DATABASE_PREFIX', Getenv('DATABASE_PREFIX'));
1515
define('DATABASE_CHARSET', Getenv('DATABASE_CHARSET'));
1616
define('TYPE', Getenv('TYPE'));
1717
define('BASE_URL', Getenv('BASE_URL'));
@@ -21,7 +21,7 @@
2121
define('DATABASE_NAME', "qrcode");
2222
define('DATABASE_USER', "root");
2323
define('DATABASE_PASSWORD', "root");
24-
define('DATABASE_PREFIX', ""); // This must have a trailing underscore. Example: qr_
24+
define('DATABASE_PREFIX', "qr_");
2525
define('DATABASE_CHARSET', "utf8");
2626
}
2727
/*

src/lib/Qrcode/Qrcode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class Qrcode {
1010
*/
1111
public function __construct($type) {
1212
if($type === "static") {
13-
$this->table = DATABASE_PREFIX."static_qrcodes";
13+
$this->table = "static_qrcodes";
1414
$this->redirect_url = "static_qrcodes.php";
1515
} else if($type === "dynamic") {
16-
$this->table = DATABASE_PREFIX."dynamic_qrcodes";
16+
$this->table = "dynamic_qrcodes";
1717
$this->redirect_url = "dynamic_qrcodes.php";
1818
} else {
1919
$this->redirect_url = "index.php";

0 commit comments

Comments
 (0)