You are here

function _filebrowser_get_node_root in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.common.inc \_filebrowser_get_node_root()
  2. 7.2 filebrowser.common.inc \_filebrowser_get_node_root()
  3. 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

6 calls to _filebrowser_get_node_root()
filebrowser_form_delete_confirm in ./filebrowser.module
File delete confirmation form CHECK: $node is used but not defined in this function
filebrowser_form_rename in ./filebrowser.module
_state
filebrowser_page_download in ./filebrowser.pages.inc
Callback for filebrowser_download/%node menu.
filebrowser_validate in ./filebrowser.module
Implements hook_validate(). @inheritdoc
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

... See full list

File

./filebrowser.common.inc, line 70
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;
}