function trigger_unassign_submit

cis7 trigger.admin.inc trigger_unassign_submit($form, &$form_state)
cle7 trigger.admin.inc trigger_unassign_submit($form, &$form_state)
elmsmedia7 trigger.admin.inc trigger_unassign_submit($form, &$form_state)
icor7 trigger.admin.inc trigger_unassign_submit($form, &$form_state)
meedjum_blog7 trigger.admin.inc trigger_unassign_submit($form, &$form_state)
mooc7 trigger.admin.inc trigger_unassign_submit($form, &$form_state)

Form submission handler for trigger_unassign().

File

modules/trigger/trigger.admin.inc, line 89
Admin page callbacks for the trigger module.

Code

function trigger_unassign_submit($form, &$form_state) {
  if ($form_state['values']['confirm'] == 1) {
    $aid = actions_function_lookup($form_state['values']['aid']);
    db_delete('trigger_assignments')->condition('hook', $form_state['values']['hook'])->condition('aid', $aid)->execute();
    drupal_static_reset('trigger_get_assigned_actions');
    $actions = actions_get_all_actions();
    watchdog('actions', 'Action %action has been unassigned.', array('%action' => $actions[$aid]['label']));
    drupal_set_message(t('Action %action has been unassigned.', array('%action' => $actions[$aid]['label'])));
    $form_state['redirect'] = 'admin/structure/trigger/' . $form_state['values']['module'];
  }
  else {
    drupal_goto('admin/structure/trigger');
  }
}