You are here

function filebrowser_filebrowser_action_process in Filebrowser 8

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

hook_filebrowser_action_process implementation

File

./filebrowser.module, line 816
Validates file path input on node form

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(),
      ));
  }
}