function webfm_check_path in Web File Manager 5.2
Same name and namespace in other branches
- 5 webfm.module \webfm_check_path()
Helper function to check for root path at base of input path
1 call to webfm_check_path()
- webfm_ajax in ./
webfm.module - Ajax post requests
File
- ./
webfm.module, line 1446
Code
function webfm_check_path($path, $root) {
if (strncmp($path, $root, strlen($root)) == 0) {
if (strlen($path) == strlen($root) || substr($path, strlen($root), 1) == '/') {
return $path;
}
}
return '';
}