You are here

function filebrowser_form_actions_submit in Filebrowser 6.2

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

File

./filebrowser.form.actions.inc, line 57

Code

function filebrowser_form_actions_submit($form, $form_state) {
  if (!empty($form_state['values']['action'])) {
    $fids = array();
    foreach ($form['#node']->file_listing as $file_name => $data) {
      if ($form_state['values']["select_{$data['fid']}"]) {
        $fids[] = $data['fid'];
      }
    }
    $result = module_invoke_all('filebrowser_action_process', $form['#node'], $form_state['values']['action'], $fids);
    if ($result) {
      return $result;
    }
  }
  header('Location: ' . request_uri(), TRUE, 302);
  exit;
}