Переглянути джерело

Adjust the login and index.php pages to use the check the new path for the config.php file.

Mark Crane 12 роки тому
батько
коміт
c5b07844c9
2 змінених файлів з 15 додано та 3 видалено
  1. 3 1
      index.php
  2. 12 2
      login.php

+ 3 - 1
index.php

@@ -26,12 +26,14 @@
 include "root.php";
 include "root.php";
 
 
 //if config.php file does not exist then redirect to the install page
 //if config.php file does not exist then redirect to the install page
-	if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) {
+	if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
 		//do nothing
 		//do nothing
 	} elseif (file_exists("/etc/fusionpbx/config.php")){
 	} elseif (file_exists("/etc/fusionpbx/config.php")){
 		//linux
 		//linux
 	} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
 	} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
 		//bsd
 		//bsd
+	} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){
+		//original directory
 	}
 	}
 	else {
 	else {
 		header("Location: ".PROJECT_PATH."/resources/install.php");
 		header("Location: ".PROJECT_PATH."/resources/install.php");

+ 12 - 2
login.php

@@ -24,8 +24,18 @@
 	Mark J Crane <[email protected]>
 	Mark J Crane <[email protected]>
 */
 */
 include "root.php";
 include "root.php";
-//if config.php does not exist then redirect to the install.php.
-	if (!file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){
+
+//if config.php file does not exist then redirect to the install page
+	if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
+		//do nothing
+	} elseif (file_exists("/etc/fusionpbx/config.php")){
+		//linux
+	} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
+		//bsd
+	} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){
+		//original directory
+	}
+	else {
 		header("Location: ".PROJECT_PATH."/resources/install.php");
 		header("Location: ".PROJECT_PATH."/resources/install.php");
 		exit;
 		exit;
 	}
 	}