瀏覽代碼

Merge pull request #1396 from mafoo/Enhance-BugFix

Enhance root.php
FusionPBX 9 年之前
父節點
當前提交
13c7d08ebc

+ 3 - 0
core/databases/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/default_settings/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/domain_settings/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/install/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/menu/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/upgrade/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/user_settings/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
core/users/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
resources/captcha/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
resources/classes/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
resources/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
themes/accessible/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
themes/enhanced/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}

+ 3 - 0
themes/minimized/root.php

@@ -74,6 +74,9 @@
 				}
 				$i++;
 			}
+			if(!file_exists($path. '/.project.ROOT')){
+				throw new Exception("Failed to locate the Project Root by searching for .project.ROOT please contact support for assistance");
+			}
 			$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
 			define('PROJECT_PATH', $project_path);
 		}