You are here

function _filebrowser_safe_basename in Filebrowser 7.2

Same name and namespace in other branches
  1. 8 filebrowser.helpers.inc \_filebrowser_safe_basename()
  2. 6.2 includes/filesystem.inc \_filebrowser_safe_basename()
  3. 7.4 filebrowser.helpers.inc \_filebrowser_safe_basename()
  4. 7.3 filebrowser.helpers.inc \_filebrowser_safe_basename()

UTF8 bullet-proof basename replacement.

5 calls to _filebrowser_safe_basename()
filebrowser_filebrowser_download_manager_process in ./filebrowser.module
hook_filebrowser_download_manager_process implementation.
filebrowser_form_delete_confirm in ./filebrowser.module
File delete confirmation form CHECK: $node is used but not defined in this function
filebrowser_page_download in ./filebrowser.pages.inc
Callback for filebrowser_download/%node menu.
_filebrowser_match_path in ./filebrowser.helpers.inc
Helper function to match a pattern on the path
_filebrowser_read_description in ./filebrowser.common.inc

File

./filebrowser.helpers.inc, line 48
Misc helper functions.

Code

function _filebrowser_safe_basename($path) {
  $path = rtrim($path, '/');
  $path = explode('/', $path);
  return end($path);
}