trigger_unassign_submit

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

Code

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

<?php
function trigger_unassign_submit($form, &$form_state) {
  $form_values = $form_state['values'];
  if ($form_values['confirm'] == 1) {
    $aid = actions_function_lookup($form_values['aid']);
    db_query("DELETE FROM {trigger_assignments} WHERE hook = '%s' AND op = '%s' AND aid = '%s'", $form_values['hook'], $form_values['operation'], $aid);
    $actions = actions_get_all_actions();
    watchdog('actions', 'Action %action has been unassigned.',  array('%action' => check_plain($actions[$aid]['description'])));
    drupal_set_message(t('Action %action has been unassigned.', array('%action' => $actions[$aid]['description'])));
    $hook = $form_values['hook'] == 'nodeapi' ? 'node' : $form_values['hook'];
    $form_state['redirect'] = 'admin/build/trigger/'. $hook;
  }
  else {
    drupal_goto('admin/build/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.