function imce_dir_uri in IMCE 7
Return the uri of the active directory
8 calls to imce_dir_uri()
- imce_check_directory in inc/
imce.page.inc - Create a writable directory(any level) under file system directory.
- imce_delete_file in inc/
imce.page.inc - Deletes a file in the file list.
- imce_directory_info in inc/
imce.page.inc - Return the permissions.
- imce_fileop_form_validate in inc/
imce.page.inc - Validate file operations form.
- imce_inaccessible_directory in inc/
imce.page.inc - Generate and log a directory access error.
File
- inc/
imce.page.inc, line 1232 - Implements the file browser.
Code
function imce_dir_uri($imce, $dir = NULL) {
if (!isset($dir)) {
$dir = $imce['dir'];
}
$target = $dir === '.' ? '' : $dir;
$uri = $imce['scheme'] . '://' . $target;
// Uri is already normalized. Call alterers.
drupal_alter('file_stream_wrapper_uri_normalize', $uri, $imce['scheme'], $target);
// Add the slash.
if (substr($uri, -1) !== '/') {
$uri .= '/';
}
return $uri;
}