From d126a2bb959d54d897afd77f7d302013f329f5a3 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 6 Jul 2013 07:38:14 +0000 Subject: [PATCH] Adjust the login and index.php pages to use the check the new path for the config.php file. --- index.php | 4 +++- login.php | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 6c4370326b..caea25f597 100644 --- a/index.php +++ b/index.php @@ -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"); diff --git a/login.php b/login.php index d9b026c5ca..257088b361 100644 --- a/login.php +++ b/login.php @@ -24,8 +24,18 @@ Mark J Crane */ 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; }