function _filebrowser_safe_dirname in Filebrowser 7.4
Same name and namespace in other branches
- 8 filebrowser.helpers.inc \_filebrowser_safe_dirname()
- 6.2 includes/filesystem.inc \_filebrowser_safe_dirname()
- 7.2 filebrowser.helpers.inc \_filebrowser_safe_dirname()
- 7.3 filebrowser.helpers.inc \_filebrowser_safe_dirname()
UTF8 bullet-proof dirname replacement.
5 calls to _filebrowser_safe_dirname()
- filebrowser_filebrowser_metadata_set in ./
filebrowser.module - filebrowser_page_download in ./
filebrowser.pages.inc - Callback for filebrowser_download/%node menu.
- s3_create_archive in modules/
s3_fb.module - We cannot use regular PHP file functions to create the archive files so we use AWS SDK
- _filebrowser_load_files in ./
filebrowser.common.inc - _filebrowser_read_description in ./
filebrowser.common.inc
File
- ./
filebrowser.helpers.inc, line 57 - Misc helper functions.
Code
function _filebrowser_safe_dirname($path) {
$path = rtrim($path, '/');
$path = explode('/', $path);
array_pop($path);
$result = implode("/", $path);
if ($result == '') {
return '/';
}
return $result;
}