From a3b526ce8d2587fde84a654f83df552b594698ce Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 22 Mar 2014 01:25:55 +0000 Subject: [PATCH] When the config.php file exists disable the install. This change expands the directories where the config.php can be located. --- resources/install.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/install.php b/resources/install.php index 0f8278f997..68546ed37f 100644 --- a/resources/install.php +++ b/resources/install.php @@ -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;