You are here

function hosting_task_confirm_form_submit in Hosting 7.4

Same name and namespace in other branches
  1. 5 task/hosting_task.module \hosting_task_confirm_form_submit()
  2. 6.2 task/hosting_task.module \hosting_task_confirm_form_submit()
  3. 7.3 task/hosting_task.module \hosting_task_confirm_form_submit()

Generic form submit handler for tasks confirmation.

This handler gets called after any task has been confirmed by the user. It will inject a new task in the queue and redirect the user to the originating node.

See also

hosting_add_task()

File

task/hosting_task.module, line 713
Web server node type is defined here.

Code

function hosting_task_confirm_form_submit($form, &$form_state) {
  $values = $form_state['values'];
  $parameters = isset($values['parameters']) ? $values['parameters'] : array();
  hosting_add_task($values['nid'], $values['task'], $parameters);
  $form_state['redirect'] = 'node/' . $values['nid'];
  if (module_exists('overlay')) {
    overlay_close_dialog();
  }
}