From 15e11da84bdff9f6023bcc284aac1e8f31a3e85e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 9 May 2023 22:27:09 -0600 Subject: [PATCH] Redirect to login login.php has been deprecated. --- index.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 6025e0d694..b87c2052e6 100644 --- a/index.php +++ b/index.php @@ -35,9 +35,11 @@ //if config.conf file does not exist then redirect to the install page if (file_exists("/usr/local/etc/fusionpbx/config.conf")) { //BSD - } elseif (file_exists("/etc/fusionpbx/config.conf")) { + } + elseif (file_exists("/etc/fusionpbx/config.conf")) { //Linux - } else { + } + else { header("Location: /core/install/install.php"); exit; } @@ -49,7 +51,8 @@ if (isset($_SESSION["username"])) { if (isset($_SESSION['login']['destination']['text'])) { header("Location: ".$_SESSION['login']['destination']['text']); - } elseif (file_exists($_SERVER["PROJECT_ROOT"]."/core/dashboard/app_config.php")) { + } + elseif (file_exists($_SERVER["PROJECT_ROOT"]."/core/dashboard/app_config.php")) { header("Location: ".PROJECT_PATH."/core/dashboard/"); } else { @@ -61,11 +64,9 @@ //use custom index, if present, otherwise use custom login, if present, otherwise use default login if (file_exists($_SERVER["PROJECT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/index.php")) { require_once "themes/".$_SESSION['domain']['template']['name']."/index.php"; - } else if (file_exists($_SERVER["PROJECT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/login.php")) { - require_once "themes/".$_SESSION['domain']['template']['name']."/login.php"; } else { - require_once "resources/login.php"; + header("Location: ".PROJECT_PATH."/core/dashboard/"); } }