function backup_migrate_prune_menu_submit in Backup and migrate prune 7
Same name and namespace in other branches
- 7.2 backup_migrate_prune.module \backup_migrate_prune_menu_submit()
1 string reference to 'backup_migrate_prune_menu_submit'
File
- ./
backup_migrate_prune.module, line 234 - 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_prune_menu_submit($form, &$form_state) {
backup_migrate_include('destinations');
$form_state['redirect'] = array(
BACKUP_MIGRATE_MENU_PATH . '/prune',
);
try {
// Create an empty gardener or a populated gardener
$gardener = new Gardener($form_state['values']['gardener_id']);
// Set the configuration for the gardener
$gardener
->setName($form_state['values']['name']);
$gardener
->setSettings($form_state['values']['settings']);
$gardener
->setCreated(time());
$gardener
->setDestination(backup_migrate_get_destination($form_state['values']['destination']));
// Save the gardener
$gardener
->save();
} catch (ErrorException $e) {
drupal_set_message($e
->getMessage(), 'error');
}
}