function imce_directory_info in IMCE 7
Same name and namespace in other branches
- 6.2 inc/imce.page.inc \imce_directory_info()
- 6 inc/page.inc \imce_directory_info()
Return the permissions.
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/
imce.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/
imce.page.inc - Return an available directory for the profile.
File
- inc/
imce.page.inc, line 1038 - Implements the file browser.
Code
function imce_directory_info($dirname, $imce) {
if (isset($imce['directories'][$dirname])) {
return $imce['directories'][$dirname];
}
$info = FALSE;
if (imce_reg_dir($dirname)) {
$diruri = imce_dir_uri($imce, $dirname);
if (file_prepare_directory($diruri)) {
foreach ($imce['directories'] as $name => $prop) {
if ($prop['subnav'] && ($name === '.' || strpos($dirname . '/', $name . '/') === 0)) {
$info = $prop;
$info['name'] = $dirname;
}
}
}
}
return $info;
}