function pm_block_user_settings_submit

1 pm_block_user.module pm_block_user_settings_submit($form, &$form_state)
7-1 pm_block_user.admin.inc pm_block_user_settings_submit($form, &$form_state)
7-2 pm_block_user.admin.inc pm_block_user_settings_submit($form, &$form_state)
6-2 pm_block_user.admin.inc pm_block_user_settings_submit($form, &$form_state)

Submit handler for admin form.

File

pm_block_user/pm_block_user.admin.inc, line 222
Administration menu callbacks for pm_block_user.module.

Code

function pm_block_user_settings_submit($form, &$form_state) {
  // We don't want it to submit when we're adding/removing actions.
  if ($form_state['clicked_button']['#id'] == 'edit-submit-form') {
    // If the form's 'block_actions' aren't set, the user has deleted all the
    // rows in the table, so we save an empty array to stop errors in the form
    // builder.
    if (isset($form_state['values']['block_actions'])) {
      variable_set('pm_block_user_actions', _pm_block_user_settings_filter($form_state['values']['block_actions']));
    }
    else {
      variable_set('pm_block_user_actions', array());
    }
    drupal_set_message(t('The configuration options have been saved.'));
  }
}