function pet_delete_confirm_submit in Previewable email templates 6
Process template delete form submission.
File
- ./
pet.admin.inc, line 252 - Contains administrative pages for creating, editing, and deleting previewable email templates (PETs).
Code
function pet_delete_confirm_submit($form, &$form_state) {
$pet = pet_load($form_state['values']['name']);
db_query("DELETE FROM {pets} WHERE pid = %d", $pet->pid);
drupal_set_message(t('Template %title has been deleted.', array(
'%title' => $pet->title,
)));
watchdog('mail', 'Template %title has been deleted.', array(
'%title' => $pet->title,
), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/build/pets';
}