You are here

function subscriptions_intervals_submit in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions.admin.inc \subscriptions_intervals_submit()
  2. 7 subscriptions.admin.inc \subscriptions_intervals_submit()
  3. 2.0.x subscriptions.admin.old.php \subscriptions_intervals_submit()

Sending intervals settings form submit handler.

File

./subscriptions.admin.inc, line 818
Subscriptions module (load-on-demand admin functions).

Code

function subscriptions_intervals_submit($form, &$form_state) {
  $intervals = array();
  foreach (explode("\n", $form_state['values']['intervals']) as $line) {
    if ($line) {
      $v = explode('|', $line);
      $intervals[$v[0]] = $v[1];
    }
  }
  variable_set('subscriptions_send_intervals', $intervals);
  drupal_set_message(t('The changes have been saved.'));
}