Added check for if .project.ROOT is missing

If a installation is missing the .project.ROOT previously it would just use the last search path as the project root (wrong) this will cause a Exception should it be unable to find it
This commit is contained in:
Mafoo 2016-01-17 20:06:13 +00:00 committed by Matthew Vale
parent fa081456b1
commit 87dbd6b428
69 changed files with 207 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}