You are here

function filebrowser_filebrowser_action_process in Filebrowser 7.3

Same name and namespace in other branches
  1. 8 filebrowser.module \filebrowser_filebrowser_action_process()
  2. 6.2 filebrowser.module \filebrowser_filebrowser_action_process()
  3. 7.4 filebrowser.module \filebrowser_filebrowser_action_process()
  4. 7.2 filebrowser.module \filebrowser_filebrowser_action_process()

hook_filebrowser_action_process implementation When downloading files $fids will be configured as fid_of_root:fid,fid,fid etc.

Parameters

$node:

$action string action selected by dropdown list on download form.:

$fids string id's of files to retrieve:

File

./filebrowser.module, line 1097

Code

function filebrowser_filebrowser_action_process($node, $action, $fids) {
  switch ($action) {
    case 'download':
      $root_fid = $node->file_listing['.']['fid'];
      if (count($fids) > 0) {
        $root_fid .= ":" . implode(',', $fids);
      }
      require_once "filebrowser.pages.inc";
      filebrowser_page_download($root_fid);
      break;
    case 'delete':
      drupal_goto("filebrowser/delete/" . implode(',', $fids), array(
        'query' => drupal_get_destination(),
      ));
    case 'rename':
      drupal_goto("filebrowser/rename/" . implode(',', $fids), array(
        'query' => drupal_get_destination(),
      ));
  }
}