You are here

function imce_directory_info in IMCE 6

Same name and namespace in other branches
  1. 6.2 inc/imce.page.inc \imce_directory_info()
  2. 7 inc/imce.page.inc \imce_directory_info()

Return the permissions for a directory that is accessed directly or indirectly. A child of a predefined directory in the directory list takes its parent's properties. If it has multiple parents, it gets the properties of the latter in the list.

2 calls to imce_directory_info()
imce_tree_html in inc/page.inc
Return tree html. This is not themable because it is complex and needs to be in a proper format for js processing.
imce_working_directory in inc/page.inc
Return an avaliable directory for the profile.

File

inc/page.inc, line 826

Code

function imce_directory_info($dirname, $imce) {
  if (isset($imce['directories'][$dirname])) {
    return $imce['directories'][$dirname];
  }
  $info = FALSE;
  $root = file_directory_path();
  $dirpath = $root . '/' . $dirname;
  if (imce_reg_dir($dirname) && file_check_directory($dirpath)) {
    foreach ($imce['directories'] as $name => $prop) {
      if ($prop['subnav'] && file_check_location($dirpath, $root . '/' . $name)) {
        $info = $prop;
        $info['name'] = $dirname;
      }
    }
  }
  return $info;
}