function hosting_site_delete_site_task_submit in Hosting 7.4
Same name and namespace in other branches
- 7.3 site/hosting_site.backups.inc \hosting_site_delete_site_task_submit()
Submit handler for site delete form for deleting backups.
1 string reference to 'hosting_site_delete_site_task_submit'
- hosting_site_form_hosting_task_confirm_form_alter in site/
hosting_site.backups.inc - Implements hook_form_FORM_ID_alter().
File
- site/
hosting_site.backups.inc, line 155 - Site backup functions.
Code
function hosting_site_delete_site_task_submit($form, $form_state) {
$delete = isset($form_state['values']['delete_backups']) ? $form_state['values']['delete_backups'] : FALSE;
if ($delete || variable_get('hosting_delete_backups', 'never') == 'always') {
$nid = $form_state['values']['nid'];
$backups = hosting_site_get_backups($nid);
if (!empty($backups)) {
hosting_add_task($nid, 'backup-delete', $backups);
}
}
}