You are here

function webfm_check_path in Web File Manager 5

Same name and namespace in other branches
  1. 5.2 webfm.module \webfm_check_path()

Helper function to check for root path at base of input path

2 calls to webfm_check_path()
webfm_ajax in ./webfm.module
Ajax post requests
webfm_path_access in ./webfm.module
Helper function to determine if a path is accessible by a user with 'access webfm'

File

./webfm.module, line 1917

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 '';
}