trigger_unassign_submit

Versions
6 – 7
trigger_unassign_submit($form, &$form_state)

Submit callback for trigger_unassign() form.

Code

modules/trigger/trigger.admin.inc, line 84

<?php
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();
    $actions = actions_get_all_actions();
    watchdog('actions', 'Action %action has been unassigned.',  array('%action' => check_plain($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');
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.