function _filebrowser_get_node_root in Filebrowser 7.2
Same name and namespace in other branches
- 8 filebrowser.common.inc \_filebrowser_get_node_root()
- 7.4 filebrowser.common.inc \_filebrowser_get_node_root()
- 7.3 filebrowser.common.inc \_filebrowser_get_node_root()
Helper function to get node folder with correct token replacements. Never use $node->folder_path directly !!!
Parameters
$node:
Return value
folder path
4 calls to _filebrowser_get_node_root()
- filebrowser_form_delete_confirm_submit in ./
filebrowser.module - File delete confirmation form submit
- filebrowser_page_download in ./
filebrowser.pages.inc - Callback for filebrowser_download/%node menu.
- filebrowser_validate in ./
filebrowser.module - Implements hook_validate().
- _filebrowser_load_files in ./
filebrowser.common.inc - Load data from current path.
File
- ./
filebrowser.common.inc, line 68 - Misc filebrowser common functions.
Code
function _filebrowser_get_node_root(&$node) {
$result = $node->folder_path;
// token_replace is in D7 core *** if (module_exists("token")) {
$result = token_replace($result, array(
'type' => 'global',
'object' => NULL,
'leading' => '[',
$trailing = ']',
));
return $result;
}