瀏覽代碼

Redirect to login

login.php has been deprecated.
FusionPBX 2 年之前
父節點
當前提交
1cf53d52a0
共有 1 個文件被更改,包括 7 次插入6 次删除
  1. 7 6
      index.php

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