You are here

function notify_admin_defaults_submit in Notify 7

Submit for the notify_admin_defaults form.

File

./notify.admin.inc, line 705
Administrative pages callbacks for the Notify module.

Code

function notify_admin_defaults_submit($form, &$form_state) {
  variable_set('notify_reg_default', $form_state['values']['notify_reg_default']);
  variable_set('notify_def_node', $form_state['values']['node']);
  variable_set('notify_def_comment', $form_state['values']['comment']);
  variable_set('notify_def_teasers', $form_state['values']['teasers']);
  foreach (node_type_get_types() as $type => $object) {
    $ntype = NOTIFY_NODE_TYPE . $type;
    variable_set($ntype, $form_state['values'][$ntype]);
  }
  drupal_set_message(t('Notify default settings saved.'));
}