You are here

public function backup_migrate_schedule::edit_form_submit in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/schedules.inc \backup_migrate_schedule::edit_form_submit()
  2. 8.3 includes/schedules.inc \backup_migrate_schedule::edit_form_submit()
  3. 6.3 includes/schedules.inc \backup_migrate_schedule::edit_form_submit()
  4. 6.2 includes/schedules.inc \backup_migrate_schedule::edit_form_submit()
  5. 7.2 includes/schedules.inc \backup_migrate_schedule::edit_form_submit()

Submit the edit form.

Overrides backup_migrate_item::edit_form_submit

File

includes/schedules.inc, line 624
All of the schedule handling code needed for Backup and Migrate.

Class

backup_migrate_schedule
A schedule class for crud operations.

Code

public function edit_form_submit($form, &$form_state) {
  variable_set('backup_migrate_smart_keep_hourly', $form_state['values']['keep_hourly']);
  variable_set('backup_migrate_smart_keep_daily', $form_state['values']['keep_daily']);
  variable_set('backup_migrate_smart_keep_weekly', $form_state['values']['keep_weekly']);
  $periods = $this
    ->frequency_periods();
  $period = $periods[$form_state['values']['period']['type']];
  $form_state['values']['period'] = $form_state['values']['period']['number'] * $period['seconds'];
  parent::edit_form_submit($form, $form_state);
}