|
|
@ -20,6 +20,8 @@ class PathValidator
|
|
|
|
$root_path = $this->ParsePath($root);
|
|
|
|
$root_path = $this->ParsePath($root);
|
|
|
|
|
|
|
|
|
|
|
|
if($root_path != null)
|
|
|
|
if($root_path != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if($this->RelativeDepth($root) >= 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$root_stack = explode("/", $root_path);
|
|
|
|
$root_stack = explode("/", $root_path);
|
|
|
|
$path_stack = explode("/", $this->path);
|
|
|
|
$path_stack = explode("/", $this->path);
|
|
|
@ -35,6 +37,11 @@ class PathValidator
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw new Exception("Specified root path is invalid.");
|
|
|
|
throw new Exception("Specified root path is invalid.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|