mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Use __dir__ to find resources/require.php
This commit is contained in:
@@ -29,9 +29,9 @@ class events {
|
||||
*/
|
||||
public function __construct() {
|
||||
//create the database connection
|
||||
//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
|
||||
require_once dirname(__DIR__, 4) . "/resources/require.php";
|
||||
|
||||
//includes files
|
||||
require_once "resources/classes/database.php";
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
|
||||
//check permisions
|
||||
if (empty($included) || !$included) {
|
||||
//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
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
@@ -164,11 +164,6 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//set the include path
|
||||
$config_glob = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
|
||||
$conf = parse_ini_file($config_glob[0]);
|
||||
set_include_path($conf['document.root']);
|
||||
|
||||
//add the database schema
|
||||
$output = shell_exec('cd '.$_SERVER["DOCUMENT_ROOT"].' && php /var/www/fusionpbx/core/upgrade/upgrade_schema.php');
|
||||
|
||||
|
||||
@@ -17,19 +17,15 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//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
|
||||
require_once "resources/require.php";
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
|
||||
//check permissions
|
||||
if(!defined('STDIN')) {
|
||||
//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
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
@@ -37,12 +37,8 @@
|
||||
$format = 'text'; //html, text
|
||||
}
|
||||
else if (!$included) {
|
||||
//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
|
||||
require_once "resources/require.php";
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('upgrade_schema') || if_group("superadmin")) {
|
||||
//echo "access granted";
|
||||
|
||||
Reference in New Issue
Block a user