Use require instead of require_once on require.php

This commit is contained in:
markjcrane 2023-06-17 09:11:32 -06:00
parent d6cb17e5b9
commit c92872ab8f
1 changed files with 17 additions and 17 deletions

View File

@ -37,15 +37,15 @@ if (!class_exists('schema')) {
//class constructor
public function __construct() {
//includes files
require dirname(__DIR__, 2) . "/resources/require.php";
//connect to the database
require_once "resources/classes/database.php";
$database = new database;
$database->connect();
$this->db = $database->db;
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
//get the list of installed apps from the core and mod directories
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x=0;
@ -474,21 +474,21 @@ if (!class_exists('schema')) {
if ($format == '') $format = $output_format;
//get the db variables
require_once "resources/classes/config.php";
$config = new config;
$config_exists = $config->exists();
$config_path = $config->find();
$config->get();
$db_type = $config->db_type;
$db_name = $config->db_name;
$db_username = $config->db_username;
$db_password = $config->db_password;
$db_host = $config->db_host;
$db_path = $config->db_path;
$db_port = $config->db_port;
//require_once "resources/classes/config.php";
//$config = new config;
//$config_exists = $config->exists();
//$config_path = $config->find();
//$config->get();
//$db_type = $config->db_type;
//$db_name = $config->db_name;
//$db_username = $config->db_username;
//$db_password = $config->db_password;
//$db_host = $config->db_host;
//$db_path = $config->db_path;
//$db_port = $config->db_port;
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require dirname(__DIR__, 2) . "/resources/require.php";
//add multi-lingual support
if (!isset($text)) {