Prechádzať zdrojové kódy

Update install.php (#6861)

Added an options for Windows ProgramData folder
jrmcclean 1 rok pred
rodič
commit
3e353e349e
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 8 0
      core/install/install.php

+ 8 - 0
core/install/install.php

@@ -81,6 +81,10 @@
 		//linux
 		$config_exists = true;
 	}
+	elseif (file_exists(getenv('SystemDrive') . DIRECTORY_SEPARATOR . 'ProgramData' . DIRECTORY_SEPARATOR . 'fusionpbx' . DIRECTORY_SEPARATOR . 'config.conf')) {
+		//Windows
+		$config_exists = true;
+	}
 	if ($config_exists) {
 		$msg = "Already Installed";
 		//report to user
@@ -100,6 +104,10 @@
 			//linux
 			$config_path = "/etc/fusionpbx";
 		}
+		elseif (file_exists(getenv('SystemDrive') . DIRECTORY_SEPARATOR . 'ProgramData' . DIRECTORY_SEPARATOR . 'fusionpbx' . DIRECTORY_SEPARATOR . 'config.php')) {
+			//Windows
+			$config_path =  getenv('SystemDrive') . DIRECTORY_SEPARATOR . 'ProgramData' . DIRECTORY_SEPARATOR . 'fusionpbx' ;
+		}
 		if (isset($config_path)) {
 			if (is_writable($config_path)) {
 				//include the config.php file