function backup_migrate_ui_schedule_form_submit in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.3 backup_migrate.module \backup_migrate_ui_schedule_form_submit()
- 6.3 backup_migrate.module \backup_migrate_ui_schedule_form_submit()
Submit the quick schedule form.
File
- ./
backup_migrate.module, line 777 - Backup and restore databases for Drupal.
Code
function backup_migrate_ui_schedule_form_submit($form, &$form_state) {
require_once dirname(__FILE__) . '/includes/schedules.inc';
if (user_access('adminsiter backup and migrate')) {
// Override the backups.
foreach ($form_state['values']['quickschedule'] as $key => $values) {
$id = $values['id'];
if ($schedule = backup_migrate_get_schedule($id)) {
$schedule
->from_array($values);
$schedule
->save();
}
}
drupal_set_message(t('Your schedules have been saved'));
}
}