You are here

function webfm_tree in Web File Manager 5.2

Same name and namespace in other branches
  1. 5 webfm.module \webfm_tree()

Build directory tree

1 call to webfm_tree()
webfm_ajax in ./webfm.module
Ajax post requests

File

./webfm.module, line 1560

Code

function webfm_tree($rootpath) {
  if (!isset($_SESSION['tree_' . $rootpath])) {
    $tree = array();
    $rt = file_directory_path() . $rootpath;
    $tree[$rootpath] = recurse_build_tree($rt, false);
    $_SESSION['tree_' . $rootpath] = $tree;
    return $tree;
  }
  return $_SESSION['tree_' . $rootpath];
}