From 09427c23ba2abaabd2a2c5f5b6fdc20e8fd7a1d0 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 10 Oct 2022 19:34:55 -0600 Subject: [PATCH] Replace config.php with config.conf --- index.php | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/index.php b/index.php index f914cded24..99043aed86 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2021 + Portions created by the Initial Developer are Copyright (C) 2008-2022 the Initial Developer. All Rights Reserved. Contributor(s): @@ -28,35 +28,20 @@ $conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE); set_include_path(parse_ini_file($conf[0])['document.root']); -//includes files - //start the session ini_set("session.cookie_httponly", True); if (!isset($_SESSION)) { session_start(); } //if config.php file does not exist then redirect to the install page - if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) { - //do nothing - } elseif (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) { - //original directory - } elseif (file_exists($_SERVER["PROJECT_ROOT"]."/includes/config.php")) { - //move config.php from the includes to resources directory. - rename($_SERVER["PROJECT_ROOT"]."/includes/config.php", $_SERVER["PROJECT_ROOT"]."/resources/config.php"); - } elseif (file_exists("/etc/fusionpbx/config.php")) { - //linux - } elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) { - //bsd + if (file_exists("/usr/local/etc/fusionpbx/config.conf")){ + //BSD + } elseif (file_exists("/etc/fusionpbx/config.conf")){ + //Linux } else { header("Location: ".PROJECT_PATH."/core/install/install.php"); exit; } -//if not logged in, clear the session variables - //if (strlen($_SESSION["username"]) == 0) { - // session_unset(); - // session_destroy(); - //} - //adds multiple includes require_once "resources/require.php";