Эх сурвалжийг харах

Get the DOCUMENT_ROOT and PROJECT_PATH

FusionPBX 2 жил өмнө
parent
commit
559b0d2a19

+ 9 - 1
resources/classes/schema.php

@@ -45,6 +45,13 @@ if (!class_exists('schema')) {
 					$this->db = $database->db;
 				}
 
+				//set the include path
+				$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
+				set_include_path(parse_ini_file($conf[0])['document.root']);
+
+				//includes files
+				include "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;
@@ -491,7 +498,7 @@ if (!class_exists('schema')) {
 					set_include_path(parse_ini_file($conf[0])['document.root']);
 
 				//includes files
-					require_once "resources/require.php";
+					include "resources/require.php";
 
 				//add multi-lingual support
 					if (!isset($text)) {
@@ -560,6 +567,7 @@ if (!class_exists('schema')) {
 								}
 							}
 							if (strlen($table_name) > 0) {
+
 								//check if the table exists
 									if ($this->db_table_exists($db_type, $db_name, $table_name)) {
 										$apps[$x]['db'][$y]['exists'] = 'true';