Reduced database connections on startup

This commit is contained in:
Frank Schubert
2024-02-06 18:42:55 +01:00
parent 01f41c9eaa
commit afac1ff9c9
3 changed files with 4 additions and 4 deletions

View File

@@ -7,9 +7,9 @@ class WorkerFlag {
private $name = null;
private $value = null;
private $user = null;
public function __construct($worker_id, $name) {
$this->db = new FronkDB();
$this->db = FronkDB::singleton();
$user = new User($worker_id);
$this->user = $user;

View File

@@ -14,7 +14,7 @@ class mfConfig {
private $me;
public function __construct($name) {
$this->db = new FronkDB();
$this->db = FronkDB::singleton();
$name = $this->db->escape($name);
$this->name = $name;

View File

@@ -118,7 +118,7 @@ class mfLoginController extends mfBaseController
public static function isLoggedIn()
{
$db = new FronkDB();
$db = FronkDB::singleton();
if (!defined("MFAPPNAME")) define("MFAPPNAME", "mvcfronk");
if (!defined("MFUSERTABLE")) define("MFUSERTABLE", "mfWorker");