Replace root.php
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
Errol Samuels <voiptology@gmail.com>
|
||||
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the call_forward class
|
||||
class call_forward {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the dnd class
|
||||
class do_not_disturb {
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
KonradSC <konrd@yahoo.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the feature_event_notify class
|
||||
class feature_event_notify {
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
Riccardo Granchi <riccardo.granchi@nems.it>
|
||||
Errol Samuels <voiptology@gmail.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the follow me class
|
||||
class follow_me {
|
||||
|
||||
@@ -24,8 +24,11 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
//require_once "root.php";
|
||||
//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 "resources/check_auth.php";
|
||||
|
||||
|
||||
@@ -2,20 +2,15 @@
|
||||
|
||||
//check the permission
|
||||
if (defined('STDIN')) {
|
||||
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
|
||||
preg_match("/^(.*)\/app\/.*$/", $document_root, $matches);
|
||||
if (isset($matches[1])) {
|
||||
$document_root = $matches[1];
|
||||
set_include_path($document_root);
|
||||
$_SERVER["DOCUMENT_ROOT"] = $document_root;
|
||||
}
|
||||
//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";
|
||||
}
|
||||
else {
|
||||
exit;
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/pdo.php";
|
||||
}
|
||||
|
||||
//increase limits
|
||||
|
||||
Reference in New Issue
Block a user