function agenda_admin_delete_submit in Agenda 6.2
Same name and namespace in other branches
- 6 agenda.admin.php \agenda_admin_delete_submit()
- 7.2 agenda.admin.php \agenda_admin_delete_submit()
- 7 agenda.admin.php \agenda_admin_delete_submit()
Delete an agenda action
File
- ./
agenda.admin.php, line 76 - Administration interface for the agenda module
Code
function agenda_admin_delete_submit($form, $form_state) {
// Clear the agenda variables table
db_delete('agenda')
->condition('bid', $form_state['values']['agenda_admin_delete_bid'])
->execute();
// Also clear the block table
db_delete('block')
->condition('delta', $form_state['values']['agenda_admin_delete_bid'])
->condition('module', 'agenda')
->execute();
drupal_set_message('Agenda block was deleted');
drupal_goto('admin/settings/agenda');
}