Replace config.php with config.conf
This commit is contained in:
parent
93ec88629b
commit
09427c23ba
25
index.php
25
index.php
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
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";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue