When the config.php file exists disable the install. This change expands the directories where the config.php can be located.

This commit is contained in:
Mark Crane 2014-03-22 01:25:55 +00:00
parent f6b5bae661
commit a3b526ce8d
1 changed files with 13 additions and 1 deletions

View File

@ -46,7 +46,19 @@ require_once "resources/functions.php";
$domain_name = $domain_array[0];
//if the config file exists then disable the install page
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/config.php")) {
$config_exists = false;
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
$config_exists = true;
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
//original directory
$config_exists = true;
} elseif (file_exists("/etc/fusionpbx/config.php")){
//linux
$config_exists = true;
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
$config_exists = true;
}
if ($config_exists) {
$msg .= "Already Installed";
header("Location: ".PROJECT_PATH."/index.php?msg=".urlencode($msg));
exit;