Browse Source

Add database and settings objects

FusionPBX 1 month ago
parent
commit
2474d06e1c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      resources/require.php

+ 8 - 0
resources/require.php

@@ -125,6 +125,14 @@
 		$autoload = new auto_loader();
 	}
 
+//connect to the database
+	global $database;
+	$database = database::new(['config' => $config]);
+
+//load settings
+	global $settings;
+	$settings = new settings(['database' => $database, 'domain_uuid' => $_SESSION['domain_uuid'] ?? '', 'user_uuid' => $_SESSION['user_uuid'] ?? '']);
+
 //additional includes
 	if (!defined('STDIN')) {
 		require_once "resources/php.php";