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

This commit is contained in:
Mark Crane 2013-07-06 07:38:14 +00:00
parent 6a4a1f5265
commit d126a2bb95
2 changed files with 15 additions and 3 deletions

View File

@ -26,12 +26,14 @@
include "root.php";
//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
} 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");

View File

@ -24,8 +24,18 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
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");
exit;
}