You are here

function pm_block_user_remove_submit in Privatemsg 6

Same name and namespace in other branches
  1. 6.2 pm_block_user/pm_block_user.admin.inc \pm_block_user_remove_submit()
  2. 7.2 pm_block_user/pm_block_user.admin.inc \pm_block_user_remove_submit()
  3. 7 pm_block_user/pm_block_user.admin.inc \pm_block_user_remove_submit()

Submit handler for 'Remove' button, removes an action.

See also

pm_block_user_more_submit()

1 string reference to 'pm_block_user_remove_submit'
_pm_block_user_actions_form in pm_block_user/pm_block_user.module
Builds row of sending, receiving roles and actions that go with them.

File

pm_block_user/pm_block_user.module, line 220
Allows users to block other users from sending them any messages

Code

function pm_block_user_remove_submit($form, &$form_state) {
  unset($form_state['submit_handlers']);
  form_execute_handlers('submit', $form, $form_state);
  $submitted_values = $form_state['values'];

  // Remove the requested action.
  $delta = $form_state['clicked_button']['#parents'][1];
  unset($submitted_values['block_actions'][$delta]);
  $form_state['pm_block_user'] = $submitted_values;
  $form_state['rebuild'] = TRUE;
}