Redirect to login

login.php has been deprecated.
This commit is contained in:
FusionPBX 2023-05-09 22:27:09 -06:00 committed by GitHub
parent 2d3f623174
commit 15e11da84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -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/");
}
}