function backup_migrate_ui_manual_backup_form_submit in Backup and Migrate 8.3
Same name and namespace in other branches
- 8.2 backup_migrate.module \backup_migrate_ui_manual_backup_form_submit()
- 5.2 backup_migrate.module \backup_migrate_ui_manual_backup_form_submit()
- 6.3 backup_migrate.module \backup_migrate_ui_manual_backup_form_submit()
- 6.2 backup_migrate.module \backup_migrate_ui_manual_backup_form_submit()
- 7.3 backup_migrate.module \backup_migrate_ui_manual_backup_form_submit()
- 7.2 backup_migrate.module \backup_migrate_ui_manual_backup_form_submit()
Submit the form. Save the values as defaults if desired and output the backup file.
1 string reference to 'backup_migrate_ui_manual_backup_form_submit'
- backup_migrate_ui_manual_backup_form in ./
backup_migrate.module - The backup/export form.
File
- ./
backup_migrate.module, line 1090 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)
Code
function backup_migrate_ui_manual_backup_form_submit($form, &$form_state) {
// Create a profile with the given settings.
$profile = $form_state['profile'];
$profile
->from_array($form_state['values']);
// Save the settings profile if the save box is checked.
if ($form_state['values']['save_settings'] && user_access('administer backup and migrate')) {
if (@$form_state['values']['create_new']) {
// Reset the id and storage so a new item will be saved.
$profile
->set_id(NULL);
$profile->storage = BACKUP_MIGRATE_STORAGE_NONE;
}
$profile
->save();
variable_set("backup_migrate_profile_id", $profile
->get_id());
variable_set("backup_migrate_destination_id", $form_state['values']['destination_id']);
}
// Perform the actual backup if that is what was selected.
if ($form_state['values']['op'] !== t('Save Without Backing Up') && user_access('perform backup')) {
backup_migrate_ui_manual_backup_perform($profile);
}
$form_state['redirect'] = BACKUP_MIGRATE_MENU_PATH . "/export/advanced";
}